httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r822542 - /httpd/mod_ftp/trunk/Makefile.apxs
Date Wed, 07 Oct 2009 00:44:00 GMT
Author: wrowe
Date: Wed Oct  7 00:43:59 2009
New Revision: 822542

URL: http://svn.apache.org/viewvc?rev=822542&view=rev
Log:
Create conf/ tree in the DESTDIR

Update both conf/httpd.conf and conf/original/httpd.conf

Install conf segments in the DESTDIR

Modified:
    httpd/mod_ftp/trunk/Makefile.apxs

Modified: httpd/mod_ftp/trunk/Makefile.apxs
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/Makefile.apxs?rev=822542&r1=822541&r2=822542&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/Makefile.apxs (original)
+++ httpd/mod_ftp/trunk/Makefile.apxs Wed Oct  7 00:43:59 2009
@@ -20,7 +20,7 @@
 CLEAN_SUBDIRS = 
 
 TARGETS         = 
-INSTALL_TARGETS = install-conf install-ftpdocs install-manual install-include
+INSTALL_TARGETS = install-conf install-ftpdocs install-include install-manual
 DISTCLEAN_TARGETS  = config.apxs.log modules/ftp/ftp_config.h
 EXTRACLEAN_TARGETS = 
 
@@ -34,14 +34,26 @@
 rel_sysconfdir=`echo $(exp_sysconfdir) | sed -e "s#^$(prefix)/##;"`
 rel_logfiledir=`echo $(exp_logfiledir) | sed -e "s#^$(prefix)/##;"`
 httpd_conffile=$(exp_sysconfdir)/$(progname).conf
+httpd_origconffile=$(exp_sysconfdir)/original/$(progname).conf
 
 exp_ftpdocsdir=$(exp_datadir)/ftpdocs
 FTPPORT=21
 
 install-conf:
 	@echo Installing configuration files
-	@$(MKINSTALLDIRS) $(exp_sysconfdir) $(exp_sysconfdir)/extra \
-		$(exp_sysconfdir)/original $(exp_sysconfdir)/original/extra
+	@$(MKINSTALLDIRS) $(DESTDIR)$(exp_sysconfdir) \
+			  $(DESTDIR)$(exp_sysconfdir)/original
+	for i in $(DESTDIR)$(httpd_conffile) $(DESTDIR)$(httpd_origconffile); do \
+	    if test -f $$i; then (
+		awk -f $(ftp_srcdir)/build/addloadexample.awk \
+		    -v MODULE=ftp -v DSO=.so -v LIBPATH=$(rel_libexecdir) \
+		    -v EXAMPLECONF=$(rel_sysconfdir)/extra/ftpd.conf \
+		    $$i > $$i.new && \
+		mv $$i $$i.bak && mv $$i.new $$i \
+	) \
+	fi;
+	@$(MKINSTALLDIRS) $(DESTDIR)$(exp_sysconfdir)/extra \
+			  $(DESTDIR)$(exp_sysconfdir)/original/extra
 	@cd $(ftp_srcdir)/docs/conf; \
 	for j in $(ftp_srcdir)/docs/conf; do \
 	    cd $$j ; \
@@ -64,12 +76,6 @@
 	    	fi; \
 	    done ; \
 	done
-	@awk -f $(ftp_srcdir)/build/addloadexample.awk \
-		-v MODULE=ftp -v DSO=.so -v LIBPATH=$(rel_libexecdir) \
-		-v EXAMPLECONF=$(rel_sysconfdir)/extra/ftpd.conf \
-		$(DESTDIR)$(httpd_conffile) > $(DESTDIR)$(httpd_conffile).new && \
-	  ( mv $(DESTDIR)$(httpd_conffile) $(DESTDIR)$(httpd_conffile).bak && \
-	    mv $(DESTDIR)$(httpd_conffile).new $(DESTDIR)$(httpd_conffile) );
 
 svnroot=http://svn.apache.org/repos/asf/httpd
 manualdir=$(ftp_srcdir)/docs/manual



Mime
View raw message