You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Wilfredo Sanchez <ws...@apple.com> on 1999/01/14 01:37:23 UTC

PATCH: Add cgidir, htdocsdir, iconsdir variables in Makefile.tmpl

  This centralizes the definition of where these directories go, and  
it lets me override the location of these directories with make  
arguments.

  I'd like next to add these to APACI's config.layout options if  
this patch gets OK'ed.

	-Fred


Index: CoreOS/Services/apache/apache/Makefile.tmpl
diff -u CoreOS/Services/apache/apache/Makefile.tmpl:1.1.1.4  
CoreOS/Services/apache/apache/Makefile.tmpl:1.15
--- CoreOS/Services/apache/apache/Makefile.tmpl:1.1.1.4	Tue Jan 12  
13:48:39 1999
+++ CoreOS/Services/apache/apache/Makefile.tmpl	Wed Jan 13 16:12:57 1999
@@ -105,6 +110,9 @@
 mandir          = @mandir@
 sysconfdir      = @sysconfdir@
 datadir         = @datadir@
+iconsdir	= $(datadir)/icons
+htdocsdir	= $(datadir)/htdocs
+cgidir		= $(datadir)/cgi-bin
 includedir      = @includedir@
 localstatedir   = @localstatedir@
 runtimedir      = @runtimedir@
@@ -239,9 +247,9 @@
 	$(MKDIR) $(root)$(mandir)/man1
 	$(MKDIR) $(root)$(mandir)/man8
 	$(MKDIR) $(root)$(sysconfdir)
-	$(MKDIR) $(root)$(datadir)/htdocs
-	$(MKDIR) $(root)$(datadir)/icons
-	$(MKDIR) $(root)$(datadir)/cgi-bin
+	$(MKDIR) $(root)$(htdocsdir)
+	$(MKDIR) $(root)$(iconsdir)
+	$(MKDIR) $(root)$(cgidir)
 	$(MKDIR) $(root)$(includedir)
 	$(MKDIR) $(root)$(runtimedir)
 	$(MKDIR) $(root)$(logfiledir)
@@ -363,31 +371,31 @@
 #   icons and distributed CGI scripts.
 install-data:
 	@echo "===> [data: Installing initial data files]"
-	-@if [ -f $(root)$(datadir)/htdocs/index.html ]; then \
-		echo "[PRESERVING EXISTING DATA SUBDIR:  
$(root)$(datadir)/htdocs/]"; \
+	-@if [ -f $(root)$(htdocsdir)/index.html ]; then \
+		echo "[PRESERVING EXISTING DATA SUBDIR:  
$(root)$(htdocsdir)/]"; \
 	else \
-		echo "Copying tree $(TOP)/htdocs/ ->  
$(root)$(datadir)/htdocs/"; \
+		echo "Copying tree $(TOP)/htdocs/ ->  
$(root)$(htdocsdir)/"; \
 		(cd $(TOP)/htdocs/ && $(TAR) -hcf - *) |\
-		(cd $(root)$(datadir)/htdocs/ && $(TAR) -xf -); \
-		find $(root)$(datadir)/htdocs/ -type d -exec chmod  
a+rx {} \; ; \
-		find $(root)$(datadir)/htdocs/ -type f -exec chmod  
a+r {} \; ; \
+		(cd $(root)$(htdocsdir)/ && $(TAR) -xf -); \
+		find $(root)$(htdocsdir)/ -type d -exec chmod a+rx  
{} \; ; \
+		find $(root)$(htdocsdir)/ -type f -exec chmod a+r {}  
\; ; \
 	fi
-	-@if [ -f $(root)$(datadir)/cgi-bin/printenv ]; then \
-		echo "[PRESERVING EXISTING DATA SUBDIR:  
$(root)$(datadir)/cgi-bin/]"; \
+	-@if [ -f $(root)$(cgidir)/printenv ]; then \
+		echo "[PRESERVING EXISTING DATA SUBDIR:  
$(root)$(cgidir)/]"; \
 	else \
 		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}; \
+			echo "$(INSTALL_DATA)  
$(TOP)/conf/$${script}[*] $(root)$(cgidir)/$${script}"; \
+			$(INSTALL_DATA)  
$(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir)/$${script}; \
 		done; \
 	fi
-	@echo "Copying tree $(TOP)/icons/ -> $(root)$(datadir)/icons/"; \
+	@echo "Copying tree $(TOP)/icons/ -> $(root)$(iconsdir)/"; \
 	(cd $(TOP)/icons/ && $(TAR) -hcf - *) |\
-	(cd $(root)$(datadir)/icons/ && $(TAR) -xf -); \
-	find $(root)$(datadir)/icons/ -type d -exec chmod a+rx {} \; ;\
-	find $(root)$(datadir)/icons/ -type f -exec chmod a+r {} \;
+	(cd $(root)$(iconsdir)/ && $(TAR) -xf -); \
+	find $(root)$(iconsdir)/ -type d -exec chmod a+rx {} \; ;\
+	find $(root)$(iconsdir)/ -type f -exec chmod a+r {} \;
 	@echo "<=== [data]"

 #   create the initial configuration by providing default files
@@ -411,9 +419,9 @@
 		 echo ""; \
 		 cat $(TOP)/conf/$${conf}-dist ) |\
 		 sed -e '/# LoadModule/r  
$(TOP)/$(SRC)/.apaci.install.conf' \
-			-e 's;@@ServerRoot@@/htdocs;$(datadir)/htdocs;' \
-			-e 's;@@ServerRoot@@/icons;$(datadir)/icons;' \
-			-e  
's;@@ServerRoot@@/cgi-bin;$(datadir)/cgi-bin;' \
+			-e 's;@@ServerRoot@@/htdocs;$(htdocsdir);' \
+			-e 's;@@ServerRoot@@/icons;$(iconsdir);' \
+			-e 's;@@ServerRoot@@/cgi-bin;$(cgidir);' \
 			-e 's;@@ServerRoot@@/proxy;$(proxycachedir);' \
 			-e 's;@@ServerRoot@@;$(prefix);g' \
 			-e  
's;logs/accept.lock;$(runtimedir)/$(TARGET).lock;' \