httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: Still doesn't work...
Date Fri, 05 Sep 1997 22:25:09 GMT
Alexei Kosut wrote:
> 
> $ ./Configure
> Using config file: Configuration
> Creating Makefile
>  + configured for Solaris 251 platform
>  + Adding selected modules
>     o status_module uses ConfigStart/End:
> awk: syntax error near line 1
> awk: illegal statement near line 1
> awk: syntax error near line 8
> awk: illegal statement near line 8
> awk: syntax error near line 10
> awk: illegal statement near line 10
> awk: syntax error near line 11
> awk: illegal statement near line 11
> awk: syntax error near line 14
> awk: bailing out near line 14

This is weird....

Can you try this? This cleans up a lot of the awk stuff
and may be a start:

--- OConfigure	Fri Sep  5 18:18:26 1997
+++ Configure	Fri Sep  5 18:22:32 1997
@@ -109,12 +109,15 @@
 # Now we create a stub file, called Makefile.config, which
 # just includes those assignments (eg: CC=gcc) in Configuration
 #
-awk >Makefile.config <$tmpfile '\
-    BEGIN { print "# Makefile options inherited from Configure"; \
-	    print "###############"; \
-	  } \
-    /\=/ { print } \
-    END { print "###############"; }'
+awk >Makefile.config <$tmpfile '
+    BEGIN {
+	print "# Makefile options inherited from Configure"
+	print "###############"
+    } 
+    /\=/ { print } 
+    END {
+	print "###############"
+    }'
 
 ####################################################################
 # Extract the rules.
@@ -733,16 +736,21 @@
 echo " + Adding selected modules"
 
 MODFILES=`awk <$tmpfile '$1 == "AddModule" { printf "%s ", $2 }'`
-MODDIRS=`awk < $tmpfile '\
-	($1 == "Module" && $3 ~ /^modules\//) { \
-	    split ($3, pp, "/"); \
-	if (! SEEN[pp[2]]) { printf "%s ", pp[2]; SEEN[pp[2]] = 1; } \
-    	} \
-	($1 == "AddModule" && $2 ~ /^modules\//) { \
-	    split ($2, pp, "/"); \
-	if (! SEEN[pp[2]]) { printf "%s ", pp[2]; SEEN[pp[2]] = 1; } \
-    	} \
-'`
+MODDIRS=`awk < $tmpfile '
+	($1 == "Module" && $3 ~ /^modules\//) {
+	    split ($3, pp, "/")
+	    if (! SEEN[pp[2]]) {
+		printf "%s ", pp[2]
+		SEEN[pp[2]] = 1
+	    }
+    	}
+	($1 == "AddModule" && $2 ~ /^modules\//) { 
+	    split ($2, pp, "/")
+	    if (! SEEN[pp[2]]) {
+		printf "%s ", pp[2]
+		SEEN[pp[2]] = 1
+	    } 
+    	}'`
 
 #
 # Now autoconfigure each of the modules specified by AddModule.
@@ -808,34 +816,38 @@
 
 # create modules.c
 
-sed -e 's/_module//' $tmpfile | awk >modules.c '\
-   BEGIN { modules[n++] = "core" ; pmodules[pn++] = "core"} \
-   /^Module/ { modules[n++] = $2 ; pmodules[pn++] = $2 } \
-   /^%Module/ { pmodules[pn++] = $2 } \
-   END { print "/* modules.c --- automatically generated by Apache"; \
-	 print " * configuration script.  DO NOT HAND EDIT!!!!!"; \
-	 print " */"; \
-	 print ""; \
-	 print "#include \"httpd.h\""; \
-	 print "#include \"http_config.h\""; \
-	 print ""; \
-	 for (i = 0; i < pn; ++i) { \
-	     printf ("extern module %s_module;\n", pmodules[i]); \
-	 } \
-	 print ""; \
-	 print "module *prelinked_modules[] = {"; \
-	 for (i = 0; i < n; ++i) { \
-	     printf "  &%s_module,\n", modules[i]; \
-	 } \
-	 print "  NULL"; \
-	 print "};"; \
-	 print "module *preloaded_modules[] = {"; \
-	 for (i = 0; i < pn; ++i) { \
-	     printf "  &%s_module,\n", pmodules[i]; \
-	 } \
-	 print "  NULL"; \
-	 print "};"; \
-   }'
+sed -e 's/_module//' $tmpfile | awk >modules.c '
+    BEGIN {
+	modules[n++] = "core"
+	pmodules[pn++] = "core"
+    } 
+    /^Module/ { modules[n++] = $2 ; pmodules[pn++] = $2 } 
+    /^%Module/ { pmodules[pn++] = $2 } 
+    END {
+	print "/* modules.c --- automatically generated by Apache"
+	print " * configuration script.  DO NOT HAND EDIT!!!!!"
+	print " */"
+	print ""
+	print "#include \"httpd.h\""
+	print "#include \"http_config.h\""
+	print ""
+	for (i = 0; i < pn; ++i) {
+	    printf ("extern module %s_module;\n", pmodules[i])
+	}
+	print ""
+	print "module *prelinked_modules[] = {"
+	for (i = 0; i < n; ++i) {
+	    printf "  &%s_module,\n", modules[i]
+	}
+	print "  NULL"
+	print "};"
+	print "module *preloaded_modules[] = {"
+	for (i = 0; i < pn; ++i) {
+	    printf "  &%s_module,\n", pmodules[i]
+	}
+	print "  NULL"
+	print "};"
+    }'
 
 # figure out which module dir require use to autocreate a Makefile.
 # for these dirs we must not list the object files from the AddModule
@@ -859,21 +871,27 @@
 # targets for auto-generated directories.
 
 cat > $awkfile <<EOF1
-   BEGIN { split ( "$AUTODIRS", tmp, / / );
+    BEGIN {
+	split ("$AUTODIRS", tmp, " ")
 EOF1
 cat >> $awkfile <<'EOF2'
-	   for ( key in tmp ) { autodirs[tmp[key]] = 1; }
-	 }
-   /^Module/ { modules[n++] = $3 }
-   /^%Module/ { modules[n++] = $3 }
-   END { print "MODULES= \\";
-	 for (i = 0; i < n; ++i) {
-	     split ( modules[i], pp, /\//);
-	     dir = pp[1] "/" pp[2] ;
-	     if ( dir in autodirs ) { continue; }
-	     else printf ("  %s \\\n", modules[i]);
-	 }
-       }
+	for ( key in tmp ) {
+	    autodirs[tmp[key]] = 1
+	}
+     }
+    /^Module/ { modules[n++] = $3 }
+    /^%Module/ { modules[n++] = $3 }
+    END {
+	print "MODULES= \\"
+	for (i = 0; i < n; ++i) {
+	    split (modules[i], pp, "/")
+	    dir = pp[1] "/" pp[2] 
+	    if ( dir in autodirs )
+		continue
+	    else
+		printf ("  %s \\\n", modules[i]);
+	}
+    }
 EOF2
 awk -f $awkfile >>Makefile <$tmpfile
 
@@ -881,18 +899,20 @@
 # don't hang a continuation on the last line.
 
 cat > $awkfile <<EOF3
-    BEGIN { split ( "$AUTOLIBS", libs );
+    BEGIN {
+	split ("$AUTOLIBS", libs)
 EOF3
 cat >> $awkfile <<'EOF4'
 	z = 0;
 	for ( lib in libs ) {
-	    if (z != 0) { printf (" \\\n"); }
-	    z++;
-	    printf ("  %s", libs[lib]);
+	    if (z != 0)
+		printf (" \\\n")
+	    z++
+	    printf ("  %s", libs[lib])
 	}
     }
     END {
-	printf ("\n");
+	printf ("\n")
     }
 EOF4
 awk -f $awkfile >>Makefile </dev/null
@@ -940,8 +960,10 @@
 #
 cat Makefile.config >> Makefile
 sed -e "s#@@Configuration@@#$file#" "Makefile.tmpl" >>Makefile
-awk >>Makefile <$tmpfile \
-   '($1 == "Module" && $3 ~ /modules\//) { printf "%s: modules/last-built ; @cat
/dev/null\n\n", $3, $3}'
+awk >>Makefile <$tmpfile '
+    ($1 == "Module" && $3 ~ /modules\//) {
+	printf "%s: modules/last-built ; @cat /dev/null\n\n", $3, $3
+    }'
 
 #
 # directories to create makefiles in
@@ -1004,13 +1026,17 @@
 
 	cat Makefile.config > $moddir/Makefile
 	basedir=`echo $moddir | sed 's|^[^/]*/||g'`
-	awk >> $moddir/Makefile < $tmpfile '\
-	    BEGIN { printf "OBJS=" }\
-	    ($1 == "Module" && $3 ~ /^modules\/'$basedir'\//) { \
-		split ($3, pp, "/"); \
-		printf "%s ", pp[3]; \
-	    	} \
-	   END {printf "\n"}'
+	awk >> $moddir/Makefile < $tmpfile '
+	    BEGIN {
+		printf "OBJS="
+	    }
+	    ($1 == "Module" && $3 ~ /^modules\/'$basedir'\//) { 
+		split ($3, pp, "/")
+		printf "%s ", pp[3] 
+	    } 
+	    END {
+		printf "\n"
+	    }'
 
 	echo "LIB=lib$basedir.a" >> $moddir/Makefile
 	cat << 'EOF' >> $moddir/Makefile

Mime
View raw message