You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@redhat.com> on 2000/11/22 13:23:03 UTC

[PATCH] 1.3: teach 'make install' about config dirs

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 \