You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Reid <dr...@jetnet.co.uk> on 2001/11/10 01:33:16 UTC
[PATCH] Change Build to allow BSD/OS to work
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 \
Re: [PATCH] Change Build to allow BSD/OS to work
Posted by Sascha Schumann <sa...@schumann.cx>.
Hi David,
> Basically we decide on the settings of INCLUDE and INCLUDE_QUOT so that on a
> "standard" system we have what we always had, namely
>
> In making the change I moved the makefiles into the standard AC_OUTPUT line
> so that configure does those substitions
Why? Which problem are you addressing?
> and them added a routine that will
> add the directory stuff at the top of the file.
see above :)
> If this goes in I'll fix
> the remaining Makefiles and commit it mid next week when I get back from
> Barbados.
As far as I can tell, this patch basically does not achieve
anything substantially different from what we have right now,
while at the same time slowing down the Makefile generation
process and making configure.in look more complex. The
decision which kind of include-directive to use is already
made at configure-time and then passed to fastgen.sh, so in
that regard there is nothing new. Converting Makefiles after
generating them with the slow AC_OUTPUT does not make it fly
either.
In the long-term, use of include-directives might be
eliminated. In the short-term, we could supply some kind of
auto-detection for BSD/OS users which is performed in the
top Makefile and which causes a conversion process to be
started, if the make in use differs from the current Makefile
state.
- Sascha Experience IRCG
http://schumann.cx/ http://schumann.cx/ircg