httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <reli...@teleport.com>
Subject Configure(modules/Makefile)
Date Tue, 02 Feb 1999 19:44:34 GMT
For testing purposes I configured a server with no modules.
(I commented out all of the 'AddModule' lines in Configuration)
This caused the 'make' to fail when $(MODULES) became empty.
The shell gives an error when it tries to parse the following
line: @for i in $(MODULES); do \
To correct this I made the following change:
     @for i in $(MODULES) ""; do \
        if [ "x\$\$i" != "x" ]; then \
        ...
	fi; \
     done
This generalizes the code so that it handles the edge
condition of no modules being selected.

Would it be possible to have this code change included with
the next patch/release?

The affected setion of the Configure script is included below.
-chaz

####################################################################
## Now create the modules/Makefile
##
./helpers/mfhead modules $file > modules/Makefile
$CAT Makefile.config | sed -e 's:^SRCDIR=.*:SRCDIR=..:' >>
modules/Makefile

$CAT << EOF >> modules/Makefile
MODULES=$MODDIRS
CFLAGS=\$(OPTIM) \$(CFLAGS1) \$(EXTRA_CFLAGS)

default: all

all clean distclean depend ::
        @for i in \$(MODULES) ""; do \\
           if [ "x\$\$i" != "x" ]; then \\
              echo "===> \$(SDP)modules/\$\$i"; \\
              (cd \$\$i && \$(MAKE) \$(MFLAGS_STATIC) \\
                           SDP='\$(SDP)' CC='\$(CC)' \\
                           AUX_CFLAGS='\$(CFLAGS)' \\
                           RANLIB='\$(RANLIB)' \$@) || exit 1; \\
              echo "<=== \$(SDP)modules/\$\$i"; \\
           fi; \\
        done

EOF


Mime
View raw message