httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@apple.com>
Subject [PATCH] Build outside of source tree
Date Fri, 02 Oct 1998 02:51:40 GMT
  The following patch makes it possible to build Apache completely outside
of the source tree.  It extends the --shadow option to configure so that you
can specify where the shadow tree should be placed, and you can then
cd to that tree and type make.  For example:

[joliet-jake:Work/apache-1.3.2/apache] wsanchez% ./configure \
	--shadow=/tmp/apache/Build -enable-shared=max --enable-module=most
Configuring for Apache, Version 1.3.2
mkdir /tmp/apache/Build
 + creating Makefile (shadow wrapper)
 + create shadow tree (/tmp/apache/Build/src.powerpc-apple-rhapsody5.2)
    /tmp/apache/Build/src.powerpc-apple-rhapsody5.2/ap/Makefile.tmpl
    /tmp/apache/Build/src.powerpc-apple-rhapsody5.2/ap/ap.dsp
...
[joliet-jake:local/Work/apache-1.3.2] wsanchez% cd /tmp/apache/Build
[joliet-jake:/tmp/apache/Build] wsanchez% ls
Makefile                            config.status
Makefile.powerpc-apple-rhapsody5.2  src.powerpc-apple-rhapsody5.2
[joliet-jake:/tmp/apache/Build] wsanchez% make
===> /tmp/apache/Build/src.powerpc-apple-rhapsody5.2
...
<=== /tmp/apache/Build/src.powerpc-apple-rhapsody5.2

  I've tested this change on powerpc-apple-rhapsody5.2 and on
0025F7AE4C00-ibm-aix4.1.  (That's AIX on powerpc; no clue why uname
spews such a skanky string out, except that it's AIX).  Both built
without problems.

  The summary of the changes is:

	INSTALL:
	 - Document --shadow=DIR.

	Makefile.tmpl:
	 - Get rid of $(TOP).

	configure:
	 - Move creation of config.status to after the arguments
	   parsing, so we can put it in the specified shadow tree.
	 - Add --shadow=path option.
	   - Prepend some paths with "$shadow/".

	src/helpers/mkshadow.sh:
	 - delete './' at start of paths.

  This looks pretty huge, but the vast majority of the diffs are in
getting rid of $(TOP) and moving the config.status code down. It's
really not as drastic as it looks. Honest.

  The other makefile changes I have made for Rhapsody involve adding
more options for where to put things, since we don't install Apache
in the BSD hierarchy, and need some more flexibility.  Those were
tricky to extract from these diffs, and would be a pain to apply
separately (mostly due to losing $(TOP) in Makefile.tmpl), so I'll
wait until this gets sorted out, update my code to the result, and
give you the next batch of diffs based on that, which should be a
lot simpler.

	-Fred


Index: CoreOS/Services/apache/apache/INSTALL
diff -u CoreOS/Services/apache/apache/INSTALL:1.1.1.3 CoreOS/Services/apache/apache/INSTALL:1.1.1.3.2.1
--- CoreOS/Services/apache/apache/INSTALL:1.1.1.3	Thu Oct  1 16:00:11 1998
+++ CoreOS/Services/apache/apache/INSTALL	Thu Oct  1 19:48:20 1998
@@ -141,25 +141,25 @@
        [INCLUDES=...]  [LDFLAGS_SHLIB_EXPORT=...]
        [LDFLAGS=...]   [RANLIB=...]
        [LIBS=...]
-       ./configure [--quiet]   [--prefix=DIR]         [--enable-rule=NAME]
-                   [--verbose] [--exec-prefix=PREFIX] [--disable-rule=NAME]
-                   [--shadow]  [--bindir=EPREFIX]     [--add-module=FILE]
-                   [--help]    [--sbindir=DIR]        [--activate-module=FILE]
-                   [--layout]  [--libexecdir=DIR]     [--enable-module=NAME]
-                               [--mandir=DIR]         [--disable-module=NAME]
-                               [--sysconfdir=DIR]     [--enable-shared=NAME]
-                               [--datadir=DIR]        [--disable-shared=NAME]
-                               [--includedir=DIR]
-                               [--localstatedir=DIR]  [--enable-suexec]
-                               [--runtimedir=DIR]     [--suexec-caller=UID]
-                               [--logfiledir=DIR]     [--suexec-userdir=DIR]
-                               [--proxycachedir=DIR]  [--suexec-uidmin=UID]
-                               [--compat]             [--suexec-gidmin=GID]
-                                                      [--suexec-safepath=PATH]
-
-                                                      [--with-perl=FILE]
-                                                      [--without-support]
-                                                      [--without-confadjust]
+       ./configure [--quiet]         [--prefix=DIR]         [--enable-rule=NAME]
+                   [--verbose]       [--exec-prefix=PREFIX] [--disable-rule=NAME]
+                   [--shadow=[DIR]]  [--bindir=EPREFIX]     [--add-module=FILE]
+                   [--help]          [--sbindir=DIR]        [--activate-module=FILE]
+                   [--layout]        [--libexecdir=DIR]     [--enable-module=NAME]
+                                     [--mandir=DIR]         [--disable-module=NAME]
+                                     [--sysconfdir=DIR]     [--enable-shared=NAME]
+                                     [--datadir=DIR]        [--disable-shared=NAME]
+                                     [--includedir=DIR]
+                                     [--localstatedir=DIR]  [--enable-suexec]
+                                     [--runtimedir=DIR]     [--suexec-caller=UID]
+                                     [--logfiledir=DIR]     [--suexec-userdir=DIR]
+                                     [--proxycachedir=DIR]  [--suexec-uidmin=UID]
+                                     [--compat]             [--suexec-gidmin=GID]
+                                                            [--suexec-safepath=PATH]
+
+                                                            [--with-perl=FILE]
+                                                            [--without-support]
+                                                            [--without-confadjust]

      Use the CC, OPTIM, CFLAGS, INCLUDES, LDFLAGS, LIBS, CFLAGS_SHLIB,
      LD_SHLIB, LDFLAGS_SHLIB, LDFLAGS_SHLIB_EXPORT and RANLIB environment
@@ -380,7 +380,8 @@
      Use the --shadow option to let APACI create a shadow source tree of the
      sources for building. This is useful when you want to build for different
      platforms in parallel (usually through a NFS, AFS or DFS mounted
-     filesystem).
+     filesystem). You may specify a directory to --shadow into which the
+     shadow tree will be created.

      Use the --quiet option to disable all configuration verbose messages.

Index: CoreOS/Services/apache/apache/Makefile.tmpl
diff -u CoreOS/Services/apache/apache/Makefile.tmpl:1.1.1.3 CoreOS/Services/apache/apache/Makefile.tmpl:1.1.1.3.2.1
--- CoreOS/Services/apache/apache/Makefile.tmpl:1.1.1.3	Thu Oct  1 16:00:12 1998
+++ CoreOS/Services/apache/apache/Makefile.tmpl	Thu Oct  1 19:48:20 1998
@@ -80,8 +80,8 @@
 LN              = ln
 RM              = rm -f
 TAR             = tar
-MKDIR           = $(TOP)/$(AUX)/mkdir.sh
-INSTALL         = $(TOP)/$(AUX)/install.sh -c
+MKDIR           = $(AUX)/mkdir.sh
+INSTALL         = $(AUX)/install.sh -c
 INSTALL_PROGRAM = $(INSTALL) -s -m 755
 INSTALL_DSO     = $(INSTALL) -m 755
 INSTALL_SCRIPT  = $(INSTALL) -m 755
@@ -148,17 +148,17 @@
 build:
 	@echo "===> $(SRC)"
 	@$(MAKE) -f $(MKF) $(MFLAGS) $(MFWD) build-std $(build-support)
-	@touch $(TOP)/$(SRC)/.apaci.build.ok
+	@touch $(SRC)/.apaci.build.ok
 	@echo "<=== $(SRC)"

 #   build the standard stuff
 build-std:
-	@cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ all
+	@cd $(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ all

 #   build the additional support stuff
 build-support:
 	@echo "===> $(SRC)/support"; \
-	cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) all; \
+	cd $(SRC)/support; $(MAKE) $(MFLAGS) all; \
 	if [ ".$(suexec)" = .1 ]; then \
 	    $(MAKE) $(MFLAGS) \
 		EXTRA_CFLAGS='\
@@ -182,8 +182,8 @@
 #   package. This is implemented by running subtargets for the
 #   separate parts of the installation process.
 install:
-	@if [ ! -f $(TOP)/$(SRC)/.apaci.build.ok ]; then \
-		$(MAKE) -f $(MKF) $(MFLAGS) $(MFWD) build; \
+	@if [ ! -f $(SRC)/.apaci.build.ok ]; then \
+	    $(MAKE) -f $(MKF) $(MFLAGS) $(MFWD) build; \
 	else \
 		:; \
 	fi
@@ -237,14 +237,14 @@
 #   shared object files.
 install-programs:
 	@echo "===> [programs: Installing Apache httpd program and shared objects]"
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/httpd $(root)$(sbindir)/httpd
-	-@if [ ".`grep 'SUBTARGET=target_shared' $(TOP)/$(SRC)/Makefile`" != . ]; then \
-		SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`";
\
-		SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`";
\
-		echo "$(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.ep $(root)$(libexecdir)/libhttpd.ep"; \
-		$(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.ep $(root)$(libexecdir)/libhttpd.ep; \
-		echo "$(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}";
\
-		$(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME};
\
+	$(INSTALL_PROGRAM) $(SRC)/httpd $(root)$(sbindir)/httpd
+	-@if [ ".`grep 'SUBTARGET=target_shared' $(SRC)/Makefile`" != . ]; then \
+		SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(SRC)/Makefile | sed -e 's:^.*=::'`"; \
+		SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(SRC)/Makefile | sed -e 's:^.*=::'`"; \
+		echo "$(INSTALL_DSO) $(SRC)/libhttpd.ep $(root)$(libexecdir)/libhttpd.ep"; \
+		$(INSTALL_DSO) $(SRC)/libhttpd.ep $(root)$(libexecdir)/libhttpd.ep; \
+		echo "$(INSTALL_DSO) $(SRC)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}";
\
+		$(INSTALL_DSO) $(SRC)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME};
\
 		if [ ".$${SHLIB_SUFFIX_LIST}" != . ]; then \
 			echo "$(RM) $(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}.*"; \
 			$(RM) $(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}.*; \
@@ -255,15 +255,15 @@
 			done; \
 		fi; \
 	fi
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/httpd.8 $(root)$(mandir)/man8/httpd.8
+	$(INSTALL_DATA) $(SRC)/support/httpd.8 $(root)$(mandir)/man8/httpd.8
 	-@$(RM) $(SRC)/.apaci.install.conf; touch $(SRC)/.apaci.install.conf
-	-@if [ ".`grep '^[ 	]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci`" != . ]; then \
-		for mod in `egrep '^[ 	]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci |\
+	-@if [ ".`grep '^[ 	]*SharedModule' $(SRC)/Configuration.apaci`" != . ]; then \
+		for mod in `egrep '^[ 	]*SharedModule' $(SRC)/Configuration.apaci |\
 	                sed -e 's/^[ 	]*SharedModule[ 	]*//'`; do \
 			file=`echo $${mod} | sed -e 's;^.*/\([^/]*\);\1;'`; \
-			echo "$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}"; \
-			$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}; \
-			name=`$(TOP)/$(AUX)/fmn.sh $(TOP)/$(SRC)/$${mod}`; \
+			echo "$(INSTALL_DSO) $(SRC)/$${mod} $(root)$(libexecdir)/$${file}"; \
+			$(INSTALL_DSO) $(SRC)/$${mod} $(root)$(libexecdir)/$${file}; \
+			name=`$(AUX)/fmn.sh $(SRC)/$${mod}`; \
 			echo dummy | awk '{ printf("LoadModule %-18s %s\n", modname, modpath); }' \
 			modname="$${name}" modpath="$(libexecdir_relative)$${file}" >>$(SRC)/.apaci.install.conf;
\
 		done; \
@@ -283,56 +283,56 @@
 #   install the support programs and scripts
 install-support:
 	@echo "===> [support: Installing Apache support programs and scripts]"
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/ab $(root)$(sbindir)/ab
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/ab.1 $(root)$(mandir)/man1/ab.1
-	@echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/apachectl";
\
+	$(INSTALL_PROGRAM) $(SRC)/support/ab $(root)$(sbindir)/ab
+	$(INSTALL_DATA) $(SRC)/support/ab.1 $(root)$(mandir)/man1/ab.1
+	@echo "$(INSTALL_SCRIPT) $(SRC)/support/apachectl[*] $(root)$(sbindir)/apachectl"; \
 	sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/httpd.pid;' \
 		-e 's;HTTPD=.*;HTTPD=$(sbindir)/httpd;' \
-		< $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \
-		$(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/apachectl
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.1 $(root)$(mandir)/man1/apachectl.1
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htpasswd $(root)$(bindir)/htpasswd
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/htpasswd.1 $(root)$(mandir)/man1/htpasswd.1
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htdigest $(root)$(bindir)/htdigest
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/htdigest.1 $(root)$(mandir)/man1/htdigest.1
-	@echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/dbmmanage[*] $(root)$(bindir)/dbmmanage";
\
+		< $(SRC)/support/apachectl > $(SRC)/.apaci.install.tmp && \
+		$(INSTALL_SCRIPT) $(SRC)/.apaci.install.tmp $(root)$(sbindir)/apachectl
+	$(INSTALL_DATA) $(SRC)/support/apachectl.1 $(root)$(mandir)/man1/apachectl.1
+	$(INSTALL_PROGRAM) $(SRC)/support/htpasswd $(root)$(bindir)/htpasswd
+	$(INSTALL_DATA) $(SRC)/support/htpasswd.1 $(root)$(mandir)/man1/htpasswd.1
+	$(INSTALL_PROGRAM) $(SRC)/support/htdigest $(root)$(bindir)/htdigest
+	$(INSTALL_DATA) $(SRC)/support/htdigest.1 $(root)$(mandir)/man1/htdigest.1
+	@echo "$(INSTALL_SCRIPT) $(SRC)/support/dbmmanage[*] $(root)$(bindir)/dbmmanage"; \
 	sed -e 's;^#!/.*;#!$(PERL);' \
-		< $(TOP)/$(SRC)/support/dbmmanage > $(TOP)/$(SRC)/.apaci.install.tmp && \
-		$(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(bindir)/dbmmanage
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/dbmmanage.1 $(root)$(mandir)/man1/dbmmanage.1
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/logresolve $(root)$(sbindir)/logresolve
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/logresolve.8 $(root)$(mandir)/man8/logresolve.8
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/rotatelogs $(root)$(sbindir)/rotatelogs
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/rotatelogs.8 $(root)$(mandir)/man8/rotatelogs.8
-	@echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apxs[*] $(root)$(sbindir)/apxs"; \
+		< $(SRC)/support/dbmmanage > $(SRC)/.apaci.install.tmp && \
+		$(INSTALL_SCRIPT) $(SRC)/.apaci.install.tmp $(root)$(bindir)/dbmmanage
+	$(INSTALL_DATA) $(SRC)/support/dbmmanage.1 $(root)$(mandir)/man1/dbmmanage.1
+	$(INSTALL_PROGRAM) $(SRC)/support/logresolve $(root)$(sbindir)/logresolve
+	$(INSTALL_DATA) $(SRC)/support/logresolve.8 $(root)$(mandir)/man8/logresolve.8
+	$(INSTALL_PROGRAM) $(SRC)/support/rotatelogs $(root)$(sbindir)/rotatelogs
+	$(INSTALL_DATA) $(SRC)/support/rotatelogs.8 $(root)$(mandir)/man8/rotatelogs.8
+	@echo "$(INSTALL_SCRIPT) $(SRC)/support/apxs[*] $(root)$(sbindir)/apxs"; \
 	sed -e 's;^#!/.*;#!$(PERL);' \
 		-e 's;\@prefix\@;$(prefix);' \
 		-e 's;\@sbindir\@;$(sbindir);' \
 		-e 's;\@libexecdir\@;$(libexecdir);' \
 		-e 's;\@includedir\@;$(includedir);' \
 		-e 's;\@sysconfdir\@;$(sysconfdir);' \
-		< $(TOP)/$(SRC)/support/apxs > $(TOP)/$(SRC)/.apaci.install.tmp && \
-		$(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/apxs
-	$(INSTALL_DATA) $(TOP)/$(SRC)/support/apxs.8 $(root)$(mandir)/man8/apxs.8
+		< $(SRC)/support/apxs > $(SRC)/.apaci.install.tmp && \
+		$(INSTALL_SCRIPT) $(SRC)/.apaci.install.tmp $(root)$(sbindir)/apxs
+	$(INSTALL_DATA) $(SRC)/support/apxs.8 $(root)$(mandir)/man8/apxs.8
 	-@if [ ".$(suexec)" = .1 ]; then \
-	    echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec"; \
-	    $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec; \
+	    echo "$(INSTALL_PROGRAM) $(SRC)/support/suexec $(root)$(sbindir)/suexec"; \
+	    $(INSTALL_PROGRAM) $(SRC)/support/suexec $(root)$(sbindir)/suexec; \
 	    echo "chown root $(root)$(sbindir)/suexec"; \
 	    chown root $(root)$(sbindir)/suexec; \
 	    echo "chmod 4711 $(root)$(sbindir)/suexec"; \
 	    chmod 4711 $(root)$(sbindir)/suexec; \
-	    echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8";
\
-	    $(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8; \
+	    echo "$(INSTALL_DATA) $(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8"; \
+	    $(INSTALL_DATA) $(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8; \
 	fi
 	@echo "<=== [support]"

 #   install the Apache C header files
 install-include:
 	@echo "===> [include: Installing Apache C header files]"
-	$(CP) $(TOP)/$(SRC)/include/*.h $(root)$(includedir)/
-	@osdir=`grep '^OSDIR=' $(TOP)/$(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os:os:'`; \
-		echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/"; \
-		$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/
+	$(CP) $(SRC)/include/*.h $(root)$(includedir)/
+	@osdir=`grep '^OSDIR=' $(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os:os:'`; \
+		echo "$(CP) $(SRC)/$${osdir}/os.h $(root)$(includedir)/"; \
+		$(CP) $(SRC)/$${osdir}/os.h $(root)$(includedir)/
 	chmod 644 $(root)$(includedir)/*.h
 	@echo "<=== [include]"

@@ -355,9 +355,9 @@
 		for script in printenv test-cgi; do \
 			cat $(TOP)/cgi-bin/$${script} |\
 			sed -e 's;^#!/.*perl;#!$(PERL);' \
-        		> $(TOP)/$(SRC)/.apaci.install.tmp; \
-			echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(datadir)/cgi-bin/$${script}";
\
-			$(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(datadir)/cgi-bin/$${script};
\
+        		> $(SRC)/.apaci.install.tmp; \
+			echo "$(INSTALL_DATA) conf/$${script}[*] $(root)$(datadir)/cgi-bin/$${script}"; \
+			$(INSTALL_DATA) $(SRC)/.apaci.install.tmp $(root)$(datadir)/cgi-bin/$${script}; \
 		done; \
 	fi
 	@echo "Copying tree $(TOP)/icons/ -> $(root)$(datadir)/icons/"; \
@@ -377,7 +377,7 @@
 		 echo "##"; \
 		 echo ""; \
 		 cat $(TOP)/conf/$${conf}-dist ) |\
-		 sed -e '/# LoadModule/r $(TOP)/$(SRC)/.apaci.install.conf' \
+		 sed -e '/# LoadModule/r $(SRC)/.apaci.install.conf' \
 			-e 's;@@ServerRoot@@/htdocs;$(datadir)/htdocs;' \
 			-e 's;@@ServerRoot@@/icons;$(datadir)/icons;' \
 			-e 's;@@ServerRoot@@/cgi-bin;$(datadir)/cgi-bin;' \
@@ -396,12 +396,12 @@
 			-e 's;Port 80;Port $(conf_port);' \
 			-e 's;ServerAdmin you@your.address;ServerAdmin $(conf_serveradmin);' \
 			-e 's;ServerName new.host.name;ServerName $(conf_servername);' \
-        	> $(TOP)/$(SRC)/.apaci.install.tmp && \
-		echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${conf}.default";
\
-		$(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${conf}.default;
\
+        	> $(SRC)/.apaci.install.tmp && \
+		echo "$(INSTALL_DATA) conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${conf}.default"; \
+		$(INSTALL_DATA) $(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${conf}.default; \
 		if [ ! -f "$(root)$(sysconfdir)/$${conf}" ]; then \
-			echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${conf}"; \
-			$(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${conf}; \
+			echo "$(INSTALL_DATA) conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${conf}"; \
+			$(INSTALL_DATA) $(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${conf}; \
 		else \
 			echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${conf}]"; \
 		fi; \
@@ -429,20 +429,20 @@
 	@echo "===> $(SRC)"
 	@$(MAKE) -f $(MKF) $(MFLAGS) $(MFWD) clean-std $(clean-support)
 	@echo "<=== $(SRC)"
-	@$(RM) $(TOP)/$(SRC)/.apaci.build.ok
+	@$(RM) $(SRC)/.apaci.build.ok

 #   clean the standard stuff
 clean-std:
-	@cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ clean
+	@cd $(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ clean

 #   clean additional support stuff
 clean-support:
 	@echo "===> $(SRC)/support"; \
-	cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) clean; \
-	if [ ".$(suexec)" = .1 ]; then \
-		echo "$(RM) suexec"; \
-		$(RM) suexec; \
-	fi; \
+	    cd $(SRC)/support; $(MAKE) $(MFLAGS) clean; \
+	    if [ ".$(suexec)" = .1 ]; then \
+	        echo "$(RM) suexec"; \
+	        $(RM) suexec; \
+	    fi; \
 	echo "<=== $(SRC)/support"

 #   cleanup the source tree by removing anything which was
@@ -467,11 +467,11 @@

 #   clean the standard stuff
 distclean-std:
-	@cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ distclean
+	@cd $(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ distclean

 distclean-support:
 	@echo "===> $(SRC)/support"; \
-	cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) distclean; \
+	cd $(SRC)/support; $(MAKE) $(MFLAGS) distclean; \
 	if [ ".$(suexec)" = .1 ]; then \
 	    echo "$(RM) suexec"; \
 	    $(RM) suexec; \
@@ -481,7 +481,7 @@
 distclean-shadow:
 	$(RM) -r $(SRC)
 	$(RM) $(MKF)
-	-@if [ ".`ls $(TOP)/src.* 2>/dev/null`" = . ]; then \
+	-@if [ ".`ls src.* 2>/dev/null`" = . ]; then \
 		echo "$(RM) Makefile"; \
 		$(RM) Makefile; \
 	fi
Index: CoreOS/Services/apache/apache/configure
diff -u CoreOS/Services/apache/apache/configure:1.1.1.3 CoreOS/Services/apache/apache/configure:1.1.1.3.2.1
--- CoreOS/Services/apache/apache/configure:1.1.1.3	Thu Oct  1 16:00:13 1998
+++ CoreOS/Services/apache/apache/configure	Thu Oct  1 19:48:21 1998
@@ -266,45 +266,6 @@
 done
 IFS="$OIFS"

-#   create a config status script for restoring
-#   the configuration via a simple shell script
-if [ ".$help" = .no ]; then
-    rm -f $configstatus 2>/dev/null
-    echo "#!/bin/sh" >$configstatus
-    echo "##" >>$configstatus
-    echo "##  $configstatus -- APACI auto-generated configuration restore script" >>$configstatus
-    echo "##" >>$configstatus
-    echo "##  Use this shell script to re-run the APACI configure script for" >>$configstatus
-    echo "##  restoring your configuration. Additional parameters can be supplied." >>$configstatus
-    echo "##" >>$configstatus
-    echo "" >>$configstatus
-    for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
-               LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB; do
-        eval "val=\"\$$var\""
-        if [ ".$val" != . ]; then
-            echo "$var=$val" |\
-            sed -e 's:\(["$\\]\):\\\1:g' \
-                -e 's:\([A-Z]*=\):\1":' \
-                -e 's:$:" \\:' >>$configstatus
-        fi
-    done
-    if [ $# -eq 0 ]; then
-        echo "./configure" >>$configstatus
-    else
-        echo $SEO "./configure \\" >>$configstatus
-        for arg
-        do
-            echo "$arg" |\
-            sed -e 's:\(["$\\]\):\\\1:g' \
-                -e 's:^:":' \
-                -e 's:$:" \\:' >>$configstatus
-        done
-    fi
-    echo '"$@"' >>$configstatus
-    echo '' >>$configstatus
-    chmod a+x $configstatus
-fi
-
 ##
 ##  parse argument line options
 ##
@@ -333,36 +294,52 @@
         --verbose | -v)
             verbose=yes
             ;;
-        --shadow)
+        --shadow*)
+	    case "$apc_option" in
+		--shadow)
+        	    shadow="."
+		    ;;
+		--shadow=*)
+	            shadow="$apc_optarg"
+		    if [ ! -d "$shadow" ]; then
+			$aux/mkdir.sh "$shadow"
+		    fi
+		    ;;
+	    esac
             #   determine GNU platform triple
             gnutriple=`$aux/GuessOS | sed -e 's:/:-:g' | $AWK '{ printf("%s",$1); }'`
             #   create Makefile wrapper (the first time only)
-            if [ ".`ls $top/src.* 2>/dev/null`" = . ]; then
+            if [ ".`ls src.* 2>/dev/null`" = . ]; then
                 if [ .$quiet = .no ]; then
                     echo " + creating Makefile (shadow wrapper)"
                 fi
-                echo "##" > Makefile
-                echo "##  Apache Makefile (shadow wrapper)" >> Makefile
-                echo "##" >> Makefile
-                echo "" >> Makefile
-                echo "GNUTRIPLE=\`$aux/GuessOS | sed -e 's:/:-:g' | $AWK '{ printf(\"%s\",\$\$1);
}'\`" >> Makefile
-                echo "" >> Makefile
-                echo "all build install install-quiet clean distclean:" >> Makefile
-                echo "	@\$(MAKE) -f Makefile.\$(GNUTRIPLE) \$(MFLAGS) \$@" >> Makefile
-                echo "" >> Makefile
+                echo "##" > "$shadow/Makefile"
+                echo "##  Apache Makefile (shadow wrapper)" >> "$shadow/Makefile"
+                echo "##" >> "$shadow/Makefile"
+                echo "" >> "$shadow/Makefile"
+                echo "GNUTRIPLE=\``pwd`/$aux/GuessOS | sed -e 's:/:-:g' | $AWK '{ printf(\"%s\",\$\$1);
}'\`" >> $shadow/Makefile
+                echo "" >> "$shadow/Makefile"
+                echo "all build install install-quiet clean distclean:" >> "$shadow/Makefile"
+                echo "	@\$(MAKE) -f Makefile.\$(GNUTRIPLE) \$(MFLAGS) \$@" >> "$shadow/Makefile"
+                echo "" >> "$shadow/Makefile"
+                echo "" >> "$shadow/Makefile"
             fi
             #   set shadow paths
-            shadowmkf="Makefile.$gnutriple"
-            shadowsrc="src.$gnutriple"
-            shadowaux="src.$gnutriple/helpers"
-            shadowsedsubst="src.$gnutriple/.apaci.sedsubst"
-            shadowaddconf="src.$gnutriple/.apaci.addconf"
+            shadowmkf="$shadow/Makefile.$gnutriple"
+            shadowsrc="$shadow/src.$gnutriple"
+            shadowaux="$shadowsrc/helpers"
+            shadowsedsubst="$shadowsrc/.apaci.sedsubst"
+            shadowaddconf="$shadowsrc/.apaci.addconf"
             #   (re)create shadow tree
             if [ .$quiet = .no ]; then
                 echo " + create shadow tree ($shadowsrc)"
             fi
             rm -rf $shadowsrc
-            $aux/mkshadow.sh $src $shadowsrc
+            if [ "$shadow" = "." ]; then
+                $aux/mkshadow.sh $src $shadowsrc
+            else
+                $aux/mkshadow.sh `pwd`/$src $shadowsrc
+            fi
             #   delegate us to the shadow paths
             mkf=$shadowmkf
             src=$shadowsrc
@@ -371,7 +348,6 @@
             rm -f $addconf 2>/dev/null
             addconf=$shadowaddconf
             rm -f $addconf 2>/dev/null
-            touch $addconf
             ;;
         --help | -h | -help )
             echo "Usage: configure [options]"
@@ -505,6 +481,7 @@
             if [ ".$file" != ".$src/modules/extra/$modfilec" ]; then
                 cp $file $src/modules/extra/$modfilec
             fi
+            if [ ! -f $addconf ]; then touch $addconf; fi
             echo "" >>$addconf
             echo "## On-the-fly added module" >>$addconf
             echo "## (configure --add-module=$file)" >>$addconf
@@ -531,6 +508,7 @@
                     ;;
             esac
             modfile=`echo $file | sed -e 's;^src/;;'`
+            if [ ! -f $addconf ]; then touch $addconf; fi
             echo "" >>$addconf
             echo "## On-the-fly activated module" >>$addconf
             echo "## (configure --activate-module=$file)" >>$addconf
@@ -732,6 +710,46 @@
 if [ ".$apc_prev" != . ]; then
     echo "configure:Error: missing argument to --`echo $apc_prev | sed 's/_/-/g'`" 1>&2
     exit 1
+fi
+touch $addconf
+
+#   create a config status script for restoring
+#   the configuration via a simple shell script
+if [ ".$help" = .no ]; then
+    rm -f $shadow/$configstatus 2>/dev/null
+    echo "#!/bin/sh" >$shadow/$configstatus
+    echo "##" >>$shadow/$configstatus
+    echo "##  $shadow/$configstatus -- APACI auto-generated configuration restore script"
>>$shadow/$configstatus
+    echo "##" >>$shadow/$configstatus
+    echo "##  Use this shell script to re-run the APACI configure script for" >>$shadow/$configstatus
+    echo "##  restoring your configuration. Additional parameters can be supplied." >>$shadow/$configstatus
+    echo "##" >>$shadow/$configstatus
+    echo "" >>$shadow/$configstatus
+    for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
+               LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB; do
+        eval "val=\"\$$var\""
+        if [ ".$val" != . ]; then
+            echo "$var=$val" |\
+            sed -e 's:\(["$\\]\):\\\1:g' \
+                -e 's:\([A-Z]*=\):\1":' \
+                -e 's:$:" \\:' >>$shadow/$configstatus
+        fi
+    done
+    if [ $# -eq 0 ]; then
+        echo "./configure" >>$shadow/$configstatus
+    else
+        echo $SEO "./configure \\" >>$shadow/$configstatus
+        for arg
+        do
+            echo "$arg" |\
+            sed -e 's:\(["$\\]\):\\\1:g' \
+                -e 's:^:":' \
+                -e 's:$:" \\:' >>$shadow/$configstatus
+        done
+    fi
+    echo '"$@"' >>$shadow/$configstatus
+    echo '' >>$shadow/$configstatus
+    chmod a+x $shadow/$configstatus
 fi

 ##
Index: CoreOS/Services/apache/apache/src/helpers/mkshadow.sh
diff -u CoreOS/Services/apache/apache/src/helpers/mkshadow.sh:1.1.1.2 CoreOS/Services/apache/apache/src/helpers/mkshadow.sh:1.1.1.2.2.1
--- CoreOS/Services/apache/apache/src/helpers/mkshadow.sh:1.1.1.2	Thu Oct  1 16:00:20 1998
+++ CoreOS/Services/apache/apache/src/helpers/mkshadow.sh	Thu Oct  1 19:48:22 1998
@@ -16,8 +16,8 @@
 '

 #   source and destination directory
-src=`echo $1 | sed -e 's:/$::'`
-dst=`echo $2 | sed -e 's:/$::'`
+src=`echo $1 | sed -e 's:/$::' | sed -e 's:^./::'`
+dst=`echo $2 | sed -e 's:/$::' | sed -e 's:^./::'`

 #   determine if source is an absolute path
 case $src in


Mime
View raw message