httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject [PATCH] Change Build to allow BSD/OS to work
Date Sat, 10 Nov 2001 00:33:16 GMT
This patch is only a very small proof as I didn't bother amending all the
Makefiles

Basically we decide on the settings of INCLUDE and INCLUDE_QUOT so that on a
"standard" system we have what we always had, namely

include $(top_builddir)/...

but on BSD/OS we have

.include "$(top_builddir)/..."

In making the change I moved the makefiles into the standard AC_OUTPUT line
so that configure does those substitions and them added a routine that will
add the directory stuff at the top of the file.  If this goes in I'll fix
the remaining Makefiles and commit it mid next week when I get back from
Barbados.

Thanks to Sascha for sorting out my sed :)

david

Index: configure.in
===================================================================
RCS file: /home/cvs/httpd-2.0/configure.in,v
retrieving revision 1.185
diff -u -r1.185 configure.in
--- configure.in        2001/10/16 05:18:39     1.185
+++ configure.in        2001/11/10 00:13:54
@@ -420,19 +420,53 @@

 dnl If we are running on BSD/OS, we need to use the BSD .include syntax.

-BSD_MAKEFILE=no
+dnl
+dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles
+dnl
 case $host in
 *bsdi*)
     # Check whether they've installed GNU make
     if make --version > /dev/null 2>&1; then
-        true
+        INCLUDE='include'
+        INCLUDE_QUOT=""
     else
-        BSD_MAKEFILE=yes
+        # BSDi make
+        INCLUDE='.include'
+        INCLUDE_QUOT='"'
     fi
     ;;
+*)
+    INCLUDE='include'
+    INCLUDE_QUOT=""
+    ;;
 esac
+AC_SUBST(INCLUDE)
+AC_SUBST(INCLUDE_QUOT)
+
+AC_OUTPUT($APACHE_OUTPUT_FILES $APACHE_FAST_OUTPUT_FILES support/apxs
support/apachectl s
upport/dbmmanage support/log_server_status support/logresolve.pl
support/phf_abuse_log.cgi
 support/split-logfile build/rules.mk)
+
+dnl Fix build paths...
+  for makefile in $APACHE_FAST_OUTPUT_FILES; do
+    thedir=`echo $abs_srcdir/$makefile | sed 's%/*Makefile$%%'`
+    echo "Fixing $makefile"
+    echo "    ->$thedir"
+    (cat <<EOF
+top_srcdir   = @TOP_SRCDIR@
+top_builddir = @TOP_BLDDIR@
+srcdir       = @SRCDIR@
+builddir     = @BUILDDIR@
+VPATH        = @VPATHDIR@
-AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs support/apachectl
support/dbmmanage support/l
og_server_status support/logresolve.pl support/phf_abuse_log.cgi
support/split-logfile bui
ld/rules.mk,,[
-  APACHE_GEN_MAKEFILES
-])
+EOF
+)    |  cat  - $makefile | \
+        sed \
+                -e "s,@TOP_SRCDIR@,$abs_srcdir," \
+                -e "s,@TOP_BLDDIR@,$abs_builddir," \
+                -e "s,@SRCDIR@,$thedir," \
+                -e "s,@BUILDDIR@,$thedir," \
+                -e "s,@VPATHDIR@,$thedir," \
+                > tmp
+    cp tmp $makefile
+  done
+  rm -f tmp

Index: Makefile.in
===================================================================
RCS file: /home/cvs/httpd-2.0/Makefile.in,v
retrieving revision 1.91
diff -u -r1.91 Makefile.in
--- Makefile.in 2001/10/22 12:46:29     1.91
+++ Makefile.in 2001/11/10 00:13:55
@@ -24,8 +24,8 @@
        modules.c config.cache config.log config.status config_vars.mk
 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists

-include $(top_builddir)/build/rules.mk
-include $(top_srcdir)/build/program.mk
+@INCLUDE@ @INCLUDE_QUOT@$(top_builddir)/build/rules.mk@INCLUDE_QUOT@
+@INCLUDE@ @INCLUDE_QUOT@$(top_builddir)/build/program.mk@INCLUDE_QUOT@

 install-conf:
        @echo Installing configuration files
@@ -169,4 +169,4 @@
 suexec:
        cd support && make suexec

-include $(top_srcdir)/os/os2/core.mk
+@INCLUDE@ @INCLUDE_QUOT@$(top_srcdir)/os/os2/core.mk@INCLUDE_QUOT@
Index: build/rules.mk.in
===================================================================
RCS file: /home/cvs/httpd-2.0/build/rules.mk.in,v
retrieving revision 1.4
diff -u -r1.4 rules.mk.in
--- build/rules.mk.in   2001/09/03 03:27:48     1.4
+++ build/rules.mk.in   2001/11/10 00:13:55
@@ -54,7 +54,7 @@
 # The build environment was originally provided by Sascha Schumann.
 #

-include $(top_builddir)/config_vars.mk
+@INCLUDE@ @INCLUDE_QUOT@$(top_builddir)/config_vars.mk@INCLUDE_QUOT@

 # Combine all of the flags together in the proper order so that
 # the user-defined flags can always override the configure ones, if needed.
@@ -252,7 +252,7 @@
 #
 # Dependencies
 #
-include $(builddir)/.deps
+@INCLUDE@ @INCLUDE_QUOT@$(builddir)/.deps@INCLUDE_QUOT@

 .PHONY: all all-recursive install-recursive local-all $(PHONY_TARGETS) \
        shared-build shared-build-recursive local-shared-build \





Mime
View raw message