Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 48714 invoked by uid 500); 22 Nov 2000 12:25:12 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 48685 invoked from network); 22 Nov 2000 12:25:08 -0000 Date: Wed, 22 Nov 2000 12:23:03 +0000 (GMT) From: Joe Orton To: new-httpd@apache.org Subject: [PATCH] 1.3: teach 'make install' about config dirs Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N 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 \