httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: how to add extra dependencies
Date Fri, 29 May 1998 06:21:57 GMT

In article <Pine.BSF.3.95q.980528200403.11077w-100000@valis.worldgate.com> you wrote:

> I am linking httpd against a whack of other libraries that change often. 
> Without changing anything other than Configuration, is there any way for
> me to add the dependencies of these libraries to the Apache Makefile?

> If a $(EXTRADEPS) or something was added to the httpd dependency line in
> Makefile.tmpl I could do it.

> If there was a way around Configure insisting on having an = or a Module
> ... in each line I could do it.

> I can't figure out any way in the current source tree.  Suggestions, or
> will I have to add the above suggestion to the httpd dependency line?

I think the EXTRADEPS is the best solution. Because I think this is a good
idea (which I wanted some time ago, too) I propose the attached patch.
This way one can say

$ LDFLAGS="-L/path/to/ -ldb" DEPS="/path/to/libdb.a" ./configure ...

How about this?
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Index: configure
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/configure,v
retrieving revision 1.27
diff -u -r1.27 configure
--- configure   1998/05/28 09:41:21 1.27
+++ configure   1998/05/29 06:19:09
@@ -227,7 +227,7 @@
 #   parameter names to the canonical Autoconf-style shell
 #   variable names.
 OIFS="$IFS" IFS="$DIFS"
-for var in CFLAGS LDFLAGS LIBS INCLUDES; do
+for var in CFLAGS LDFLAGS LIBS INCLUDES DEPS; do
     eval "val=\$EXTRA_$var"
     if [ ".$val" != . ]; then
         eval "$var=\$val"
@@ -860,11 +860,11 @@
 #   generate settings from imported environment variables
 OIFS="$IFS" IFS="$DIFS"
 for var in CC OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
-           LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB; do
+           LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB DEPS; do
     eval "val=\"\$$var\"";
     if [ ".$val" != . ]; then
         case $var in 
-            CFLAGS|LDFLAGS|LIBS|INCLUDES) 
+            CFLAGS|LDFLAGS|LIBS|INCLUDES|DEPS) 
                 echo "s%^#*\\(EXTRA_$var=\\).*%\\1$val%g" >>$sedsubst
                 ;;
             *)
Index: src/Configuration.tmpl
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/Configuration.tmpl,v
retrieving revision 1.104
diff -u -r1.104 Configuration.tmpl
--- Configuration.tmpl  1998/05/12 12:13:50 1.104
+++ Configuration.tmpl  1998/05/29 06:17:47
@@ -47,10 +47,15 @@
 # these for compiling Apache is risky. If you don't want to see Apache dumping
 # core regularly then at most use -O or -O2.
 #
+# The EXTRA_DEPS can be used to add extra Makefile dependencies to external
+# files (for instance third-party libraries) for the httpd target. The effect
+# is that httpd is relinked when those files are changed.
+#
 EXTRA_CFLAGS=
 EXTRA_LDFLAGS=
 EXTRA_LIBS=
 EXTRA_INCLUDES=
+EXTRA_DEPS=
 
 #CC=
 #OPTIM=
Index: src/Makefile.tmpl
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/Makefile.tmpl,v
retrieving revision 1.96
diff -u -r1.96 Makefile.tmpl
--- Makefile.tmpl   1998/05/22 06:56:56 1.96
+++ Makefile.tmpl   1998/05/29 06:15:35
@@ -23,7 +23,7 @@
    @echo "++ If not, you will at least have to touch '@@Configuration@@'."
    @false
 
-$(TARGET): $(SUBTARGET)
+$(TARGET): $(EXTRA_DEPS) $(SUBTARGET)
 
 target_static: subdirs modules.o
    $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c

Mime
View raw message