You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by re...@teleport.com on 1999/02/02 20:44:34 UTC

Configure(modules/Makefile)

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