jim 97/08/10 14:37:28
Modified: src Configure
Log:
Be a little paranoid: have Configure print out the lines between
a module's ConfigStart/ConfigEnd lines. Also, don't bother creating
and running those lines if they don't exist
Revision Changes Path
1.130 +12 -7 apachen/src/Configure
Index: Configure
===================================================================
RCS file: /export/home/cvs/apachen/src/Configure,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- Configure 1997/08/10 20:28:02 1.129
+++ Configure 1997/08/10 21:37:27 1.130
@@ -1,5 +1,5 @@
#!/bin/sh
-trap 'rm -f $tmpfile $tmpfile.2 $tmpfile.3; exit' 0 1 2 3 15
+trap 'rm -f $tmpfile $tmpfile2 $tmpfile3; exit' 0 1 2 3 15
# Apache configuration script, first cut --- rst.
# Dont like it? Inspired to do something better? Go for it.
@@ -766,7 +766,7 @@
sed 's/^module.*[ ][ ]*//' | \
sed 's/[ ]*;[ ]*$//'`
# Get any module definition part
- if fgrep "MODULE-DEFINITION-" $modbase.c > /dev/null; then
+ if grep "MODULE-DEFINITION-" $modbase.c > /dev/null; then
cat $modbase.c | \
sed '1,/MODULE-DEFINITION-START/d;/MODULE-DEFINITION-END/,$d' \
> $tmpfile2
@@ -774,14 +774,19 @@
fi
if [ -r $tmpfile2 ] ; then
# Read a module definition from .module or .c
- modname=`fgrep "Name:" $tmpfile2 | sed 's/^.*Name:[ ]*//'`
- cat $tmpfile2 | sed '1,/ConfigStart/d;/ConfigEnd/,$d' > \
- $tmpfile3
- . ./$tmpfile3
+ modname=`grep "Name:" $tmpfile2 | sed 's/^.*Name:[ ]*//'`
+ if grep "ConfigStart" $tmpfile2 > /dev/null \
+ && grep "ConfigEnd" $tmpfile2 > /dev/null; then
+ echo " o $modname runs:"
+ sed '1,/ConfigStart/d;/ConfigEnd/,$d' $tmpfile2 > \
+ $tmpfile3
+ sed 's/^/>> /' $tmpfile3
+ . ./$tmpfile3
+ fi
rm -f $tmpfile2 $tmpfile3
ext=o
fi
- if [ -z "$modname" ] ; then
+ if [ "x$modname" = "x" ] ; then
modname=`echo $modbase | sed 's/^.*\///' | \
sed 's/^mod_//' | sed 's/^lib//' | sed 's/$/_module/'`
fi