httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject [PATCH] 1.3: teach 'make install' about config dirs
Date Wed, 22 Nov 2000 12:23:03 GMT
If you make conf/httpd.conf a directory rather than a file, then doing a
subsequent 'make install' over the existing installation goes wrong,
leaving a '.apaci.install.tmp' file in the httpd.conf directory.

This is because the "don't overwrite existing httpd.conf file" check
doesn't notice the directory. Here's a patch which teaches 'make install'
to recognize a directory called 'httpd.conf', and ignore it appropriately:

Index: Makefile.tmpl
===================================================================
RCS file: /home/joe/lib/cvsroot/apache-1.3/Makefile.tmpl,v
retrieving revision 1.98
diff -u -r1.98 Makefile.tmpl
--- Makefile.tmpl	2000/11/14 09:56:47	1.98
+++ Makefile.tmpl	2000/11/22 12:12:56
@@ -523,7 +523,9 @@
 			> $(TOP)/$(SRC)/.apaci.install.tmp && \
 		echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}.default";
\
 		$(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}.default;
\
-		if [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \
+		if [ -d "$(root)$(sysconfdir)/$${target_conf}" ]; then \
+			echo "[PRESERVING EXISTING CONFIG DIRECTORY: $(root)$(sysconfdir)/$${target_conf}]"; \
+		elif [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \
 			echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}";
\
 			$(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf};
\
 		else \








Mime
View raw message