I promised to handle this at the admin meeting.  Little did I know how
much time it was going to eat up from my life as it was worse to
implement than I thought (though the patch size doesn't reflect this;
eval of eval of evals just sucks to figure out in you head for sh).

Anyway, enclosed is the patch.  It's a more major change than I'd
ideally like for a last minute change, but it was something we agreed
upon and thus I should at least offer it.  I'm voting +1, but barely.


Is there someone with a broken sed machine that could verify this
fixes the problem?  (it should).


Index: configure.in
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/configure.in,v
retrieving revision 5.289
diff -u -p -r5.289 configure.in
--- configure.in        26 Oct 2006 11:14:02 -0000      5.289
+++ configure.in        30 Oct 2006 16:05:35 -0000
@@ -1819,11 +1819,8 @@ if test "x$enable_mfd_rewrites" = "xyes"
 fi
 
 module_list=""
-module_list_code=""
 mib_module_list=""
-mib_module_list_code=""
 agent_module_list=""
-agent_module_list_code=""
 new_with_mib_modules=`echo $with_mib_modules | sed 's/,/ /g;'`
 new_with_out_mib_modules=`echo $with_out_mib_modules | sed 's/,/ /g;'`
 
@@ -1853,7 +1850,6 @@ fi
 
 test_modules="$new_module_list"
 new_module_list=""
-module_list_h=""
 
 # remove modules that were explicity excluded
 for i in $test_modules
@@ -1888,16 +1884,37 @@ else
    module_debug=0
 fi
 first_pass=1
-
 output_to=normal
-module_rules=module_rules.mk
+
+if test ! -d mk ; then
+  mkdir mk
+fi
+
+
+module_rules=mk/module_rules.mk
 echo "# contents below built automatically by configure; do not edit by hand" 
> $module_rules
 
+#
+# make file sub-pieces
+#
 for i in module_list_deps mib_module_list_deps agent_module_list_deps ; do
-  eval "$i=${i}.mk"
-  echo "# contents below built automatically by configure; do not edit by 
hand" > ${i}.mk
+  eval "$i=mk/${i}.mk"
+  echo "# contents below built automatically by configure; do not edit by 
hand" > mk/${i}.mk
+done
+
+#
+# variable settings sub-pieces
+#
+for i in module_list_code mib_module_list_code agent_module_list_code 
module_list mib_module_list agent_module_list ; do
+  eval "$i=mk/${i}.mk"
+  echo "# contents below built automatically by configure; do not edit by 
hand" > mk/${i}.mk
+  echo "$i= \\" >> mk/${i}.mk
 done
 
+echo $ECHO_N "echo " $ECHO_C > mk/MODULE_LIST.mk
+MODULE_LIST=mk/MODULE_LIST.mk
+
+
 #---------------------
 # until we have an empty module list...
 #   (modules may add new modules, and until all dependencies are done...)
@@ -1996,8 +2013,10 @@ while test "x$new_module_list" != "x"; d
            echo "mib_modules.lo: mibgroup/$i.h" >> $mib_module_list_deps
         fi
         eval ${module_type}_list="\"\$${module_type}_list $i\""
-        module_list_code="$module_list_code $i"
-        eval ${module_type}_list_code="\"\$${module_type}_list_code $i\""
+       echo "  $i \\" >> $module_list_code
+       echo $ECHO_N " $i" $ECHO_C >> $MODULE_LIST
+        eval tmpfilevar=\$`echo ${module_type}_list_code`
+        echo " $i \\" >> $tmpfilevar
 
        # XXX: add this to the main init list; this is possible not
        # quite in the right spot any longer but we're stuck with it.
@@ -2223,8 +2242,10 @@ while test "x$new_module_list" != "x"; d
       has_c_code=no
       if test -f $srcdir/$mibdir/$i.c; then
         if test "x$output_to" = "xnormal" ; then
-          module_list_code="$module_list_code $i"
-          eval ${module_type}_list_code="\"\$${module_type}_list_code $i\""
+         echo "        $i \\" >> $module_list_code
+         echo $ECHO_N " $i" $ECHO_C >> $MODULE_LIST
+          eval tmpfilevar=\$`echo ${module_type}_list_code`
+          echo "       $i \\" >> $tmpfilevar
         else
           eval "dl_${dl_name}_files=\"\$dl_${dl_name}_files $i\""
           saved_sublist_code="$saved_sublist_code $i"
@@ -2395,25 +2416,38 @@ done
 # cleanup
 rm -f module_tmp_header.h
 
+for i in module_list_code agent_module_list_code mib_module_list_code 
mib_module_list agent_module_list ; do
+       echo "" >> mk/$i.mk
+       echo "# end configure generated code" >> mk/$i.mk
+done
+
 #-------------------
 # build module lists for Makefiles
 #
 changequote(, )
-module_list_o=`echo "$module_list_code " | sed 's/\([^ ]\) /\1.o /g'`
-module_list_lo=`echo "$module_list_code " | sed 's/\([^ ]\) /\1.lo /g'`
-module_list_c=`echo "$module_list_code " | sed 's/\([^ ]\) /\1.c /g'`
-
-mib_module_list_o=`echo "$mib_module_list_code " | sed 's/\([^ ]\) /\1.o /g'`
-mib_module_list_lo=`echo "$mib_module_list_code " | sed 's/\([^ ]\) /\1.lo /g'`
-mib_module_list_c=`echo "$mib_module_list_code " | sed 's/\([^ ]\) /\1.c /g'`
-mibgroup_list_o=`echo " $mib_module_list_o " | sed 's@ \([^ ]*\)\.o@ 
mibgroup/\1.o @g'`
-mibgroup_list_lo=`echo " $mib_module_list_lo " | sed 's@ \([^ ]*\)\.lo@ 
mibgroup/\1.lo @g'`
-
-agent_module_list_o=`echo "$agent_module_list_code " | sed 's/\([^ ]\) /\1.o 
/g'`
-agent_module_list_lo=`echo "$agent_module_list_code " | sed 's/\([^ ]\) /\1.lo 
/g'`
-agent_module_list_c=`echo "$agent_module_list_code " | sed 's/\([^ ]\) /\1.c 
/g'`
-agentgroup_list_o=`echo " $agent_module_list_o " | sed 's@ \([^ ]*\)\.o@ 
mibgroup/\1.o @g'`
-agentgroup_list_lo=`echo " $agent_module_list_lo " | sed 's@ \([^ ]*\)\.lo@ 
mibgroup/\1.lo @g'`
+
+for i in module_list_o module_list_c module_list_lo mib_module_list_o 
mib_module_list_c mib_module_list_lo mibgroup_list_o mibgroup_list_lo 
agent_module_list_o agent_module_list_c agent_module_list_lo agentgroup_list_o 
agentgroup_list_lo ; do
+  eval "$i=mk/${i}.mk"
+done
+
+sed 's/^module_list_code/module_list_o/;s/\([^=]\)  *\\/\1.o \\/g'  < 
$module_list_code  > $module_list_o
+sed 's/^module_list_code/module_list_c/;s/\([^=]\)  *\\/\1.c \\/g'  < 
$module_list_code  > $module_list_c
+sed 's/^module_list_code/module_list_lo/;s/\([^=]\)  *\\/\1.lo \\/g' < 
$module_list_code  > $module_list_lo
+
+sed 's/^mib_module_list_code/mib_module_list_o/;s/\([^=]\)  *\\/\1.o \\/g'  < 
$mib_module_list_code  > $mib_module_list_o
+sed 's/^mib_module_list_code/mib_module_list_c/;s/\([^=]\)  *\\/\1.c \\/g'  < 
$mib_module_list_code  > $mib_module_list_c
+sed 's/^mib_module_list_code/mib_module_list_lo/;s/\([^=]\)  *\\/\1.lo \\/g' < 
$mib_module_list_code  > $mib_module_list_lo
+
+sed 's/^mib_module_list_o/mibgroup_list_o/;[EMAIL PROTECTED]([^        
]*\)[EMAIL PROTECTED]/[EMAIL PROTECTED]' < $mib_module_list_o > $mibgroup_list_o
+sed 's/^mib_module_list_lo/mibgroup_list_lo/;[EMAIL PROTECTED]([^      
]*\)[EMAIL PROTECTED]/[EMAIL PROTECTED]' < $mib_module_list_lo > 
$mibgroup_list_lo
+
+sed 's/^agent_module_list_code/agent_module_list_o/;s/\([^=]\)  *\\/\1.o \\/g' 
 < $agent_module_list_code  > $agent_module_list_o
+sed 's/^agent_module_list_code/agent_module_list_c/;s/\([^=]\)  *\\/\1.c \\/g' 
 < $agent_module_list_code  > $agent_module_list_c
+sed 's/^agent_module_list_code/agent_module_list_lo/;s/\([^=]\)  *\\/\1.lo 
\\/g' < $agent_module_list_code  > $agent_module_list_lo
+
+sed 's/^agent_module_list_o/agentgroup_list_o/;[EMAIL PROTECTED]([^    
]*\)[EMAIL PROTECTED]/[EMAIL PROTECTED]' < $agent_module_list_o > 
$agentgroup_list_o
+sed 's/^agent_module_list_lo/agentgroup_list_lo/;[EMAIL PROTECTED]([^  
]*\)[EMAIL PROTECTED]/[EMAIL PROTECTED]' < $agent_module_list_lo > 
$agentgroup_list_lo
+
 changequote([, ])
 
 if test $module_debug -eq 1; then
@@ -2423,27 +2457,24 @@ fi
 if test "x$with_mib_cfg_checks" = "xyes"; then
   AC_MSG_CACHE_ADD([Agent Module list: $module_list_code])
 fi
-MODULE_LIST=$module_list_code
-AC_SUBST(MODULE_LIST)
-AC_SUBST(module_list_c)
-#AC_SUBST(module_list_h)
-AC_SUBST(module_list_o)
-AC_SUBST(module_list_lo)
-AC_SUBST(mib_module_list_c)
-#AC_SUBST(mib_module_list_h)
-AC_SUBST(mib_module_list_o)
-AC_SUBST(mib_module_list_lo)
-AC_SUBST(agent_module_list_c)
-#AC_SUBST(agent_module_list_h)
-AC_SUBST(agent_module_list_o)
-AC_SUBST(agent_module_list_lo)
-AC_SUBST(mibgroup_list_o)
-AC_SUBST(mibgroup_list_lo)
-AC_SUBST(agentgroup_list_o)
-AC_SUBST(agentgroup_list_lo)
-AC_SUBST(module_list)
-AC_SUBST(mib_module_list)
-AC_SUBST(agent_module_list)
+AC_SUBST_FILE(MODULE_LIST)
+AC_SUBST_FILE(module_list_c)
+AC_SUBST_FILE(module_list_o)
+AC_SUBST_FILE(module_list_lo)
+AC_SUBST_FILE(mib_module_list_c)
+AC_SUBST_FILE(mib_module_list_o)
+AC_SUBST_FILE(mib_module_list_lo)
+AC_SUBST_FILE(agent_module_list_c)
+AC_SUBST_FILE(agent_module_list_o)
+AC_SUBST_FILE(agent_module_list_lo)
+AC_SUBST_FILE(mibgroup_list_o)
+AC_SUBST_FILE(mibgroup_list_lo)
+AC_SUBST_FILE(agentgroup_list_o)
+AC_SUBST_FILE(agentgroup_list_lo)
+AC_SUBST_FILE(agent_module_list)
+
+#AC_SUBST_FILE(mib_module_list)
+#AC_SUBST(module_list)
 AC_SUBST(default_mibs_install)
 AC_SUBST(dllcleans)
 AC_SUBST_FILE(module_rules)
@@ -3407,7 +3438,6 @@ if test "x$useopenssl" != "xno" ; then
         encrmodes="[disabled]"
     fi
     AC_DEFINE(NETSNMP_USE_OPENSSL)
-       echo "here"
     if test "x$enable_as_needed" = "xyes" ; then
         LIBCRYPTO="-lcrypto" ;
     else
Index: Makefile.in
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/Makefile.in,v
retrieving revision 5.72
diff -u -p -r5.72 Makefile.in
--- Makefile.in 17 Oct 2006 23:05:40 -0000      5.72
+++ Makefile.in 30 Oct 2006 16:05:35 -0000
@@ -257,8 +257,7 @@ configclean: makefileclean
                agent/mibgroup/mib_module_inits.h       \
                agent/mibgroup/mib_module_shutdown.h    \
                agent/mibgroup/mib_module_dot_conf.h
-       rm -f module_rules.mk mib_module_list_deps.mk module_list_deps.mk \
-               agent_module_list_deps.mk
+       rm -f mk
        rm -f *.core
 
 #
Index: net-snmp-config.in
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/net-snmp-config.in,v
retrieving revision 5.47
diff -u -p -r5.47 net-snmp-config.in
--- net-snmp-config.in  10 Oct 2006 10:52:29 -0000      5.47
+++ net-snmp-config.in  30 Oct 2006 16:05:35 -0000
@@ -85,7 +85,7 @@ else
       echo @CONFIGURE_OPTIONS@
       ;;
     --snmpd-module-list|--mod*)
-      echo @MODULE_LIST@
+      @MODULE_LIST@
       ;;
     --default-mibs|--mibs|--MIBS)
       echo @DEFAULT_MIBS@
Index: agent/Makefile.in
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/Makefile.in,v
retrieving revision 5.23
diff -u -p -r5.23 Makefile.in
--- agent/Makefile.in   19 Oct 2006 15:50:07 -0000      5.23
+++ agent/Makefile.in   30 Oct 2006 16:05:35 -0000
@@ -89,16 +89,20 @@ CPPFLAGS    = $(TOP_INCLUDES) -I. $(AGENT_I
 #
 
 # libnetsnmpmib objects.
-LMIBOBJS       = @mibgroup_list_lo@ mib_modules.lo auto_nlist.lo
-MIBOBJS                = @mibgroup_list_o@ mib_modules.o auto_nlist.o
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+LMIBOBJS       = $(mibgroup_list_lo) mib_modules.lo auto_nlist.lo
+MIBOBJS                = $(mibgroup_list_o) mib_modules.o auto_nlist.o
 
 # libnetsnmpagent objects
 LIBAGENTOBJS=snmp_agent.o snmp_vars.o agent_read_config.o \
        agent_registry.o agent_index.o agent_trap.o kernel.o \
-        agent_handler.o @agentgroup_list_o@ @OTHERAGENTLIBOBJS@
+        agent_handler.o $(agentgroup_list_o) @OTHERAGENTLIBOBJS@
 LLIBAGENTOBJS=snmp_agent.lo snmp_vars.lo agent_read_config.lo \
        agent_registry.lo agent_index.lo agent_trap.lo kernel.lo \
-       agent_handler.lo @agentgroup_list_lo@ @OTHERAGENTLIBLOBJS@
+       agent_handler.lo $(agentgroup_list_lo) @OTHERAGENTLIBLOBJS@
 
 # The agent objects.
 AGENTOBJS=snmpd.o @other_agentobjs@
@@ -170,9 +174,7 @@ installmibgroupheaders:
 @agent_module_list_deps@
 @mib_module_list_deps@
 
-#snmp_vars.lo: @agent_module_list_h@
-#mib_modules.lo: @mib_module_list_h@ mibgroup/mib_module_inits.h
+mib_modules.lo: mibgroup/mib_module_inits.h
 #
 # dependency for snmplib object. it's here because the headers listed
 # are relative to the agent directory.
-#read_config.lo: @module_list_h@
Index: agent/mibgroup/Makefile.in
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/Makefile.in,v
retrieving revision 5.3
diff -u -p -r5.3 Makefile.in
--- agent/mibgroup/Makefile.in  13 Sep 2006 17:00:27 -0000      5.3
+++ agent/mibgroup/Makefile.in  30 Oct 2006 16:05:35 -0000
@@ -22,9 +22,12 @@ [EMAIL PROTECTED]@
 .c.o:
        $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
 
-OBJS  = @mib_module_list_o@
-LOBJS = @mib_module_list_lo@
-SRCS  = @mib_module_list_c@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+OBJS  = $(mib_module_list_o)
+LOBJS = $(mib_module_list_lo)
+SRCS  = $(mib_module_list_c)
 
 all: standardall $(LOBJS)
 


-- 
Wes Hardaker
Sparta, Inc.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to