## ## Makefile.apxs -- Build procedure for mod_ftp Apache module ## ## Do not use this target; build from the mod_ftp dir root ## # top_builddir and top_srcdir are misnomers, because build/*.mk scripts # expect each of them to be the parent of the build directory, and fail # to trust the installbuilddir. exp_installbuilddir=$(shell $(APXS) -q exp_installbuilddir) top_srcdir=$(installbuilddir)/.. top_builddir=$(installbuilddir)/.. ftp_builddir=. ftp_srcdir=. builddir=. srcdir=. SUBDIRS = modules/ftp CLEAN_SUBDIRS = TARGETS = INSTALL_TARGETS = install-conf install-ftpdocs install-manual install-include DISTCLEAN_TARGETS = modules/ftp/ftp_config.h EXTRACLEAN_TARGETS = include $(exp_installbuilddir)/rules.mk # Dang nabbit, these are stripped! Reconsitute them; rel_libexecdir=`echo $(exp_libexecdir) | sed -e "s#^$(prefix)/##;"` rel_sysconfdir=`echo $(exp_sysconfdir) | sed -e "s#^$(prefix)/##;"` httpd_conffile=$(exp_sysconfdir)/$(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 @cd $(ftp_srcdir)/docs/conf; \ for j in $(ftp_srcdir)/docs/conf; do \ cd $$j ; \ for i in extra/ftpd*.conf; do \ if test -f $$i; then \ sed -e 's#@exp_ftpdocsdir@#$(exp_ftpdocsdir)#g' \ -e 's#@@FTPPort@@#$(FTPPORT)#g' \ < $$i > $(exp_sysconfdir)/original/$$i; \ chmod 0644 $(exp_sysconfdir)/original/$$i; \ if test ! -f $(exp_sysconfdir)/$$i; then \ cp $(exp_sysconfdir)/original/$$i \ $(exp_sysconfdir)/$$i; \ chmod 0644 $(exp_sysconfdir)/$$i; \ fi; \ fi; \ done ; \ done @awk -f $(ftp_srcdir)/build/addloadexample.awk \ -v MODULE=ftp -v LIBPATH=$(rel_libexecdir) \ -v EXAMPLECONF=$(rel_sysconfdir)/extra/ftpd.conf \ $(httpd_conffile) > $(httpd_conffile).new && \ ( mv $(httpd_conffile) $(httpd_conffile).bak && \ mv $(httpd_conffile).new $(httpd_conffile) ); docs: @if test -d $(ftp_srcdir)/docs/manual/build; then \ cd $(ftp_srcdir)/docs/manual/build && ./build.sh all; \ else \ echo 'For details on generating the docs, please read:'; \ echo ' http://httpd.apache.org/docs-project/docsformat.html'; \ fi dox: doxygen $(ftp_srcdir)/docs/doxygen.conf ftpdocs-srcdir = $(ftp_srcdir)/docs/ftproot install-ftpdocs: @if test -d $(exp_ftpdocsdir); then \ echo "Preserving existing FTP documents"; \ else \ echo "Installing FTP documents"; \ $(MKINSTALLDIRS) $(exp_ftpdocsdir) ; \ if test -d $(ftpdocs-srcdir) && test "x$(RSYNC)" != "x" \ && test -x "$(RSYNC)" ; then \ $(RSYNC) --exclude .svn -rlpt --numeric-ids $(ftpdocs-srcdir)/ \ $(exp_ftpdocsdir)/; \ else \ test -d $(ftpdocs-srcdir) && (cd $(ftpdocs-srcdir) \ && cp -rp * $(exp_ftpdocsdir)) ; \ cd $(exp_ftpdocsdir) && find . -name ".svn" -type d -print \ | xargs rm -rf 2>/dev/null || true; \ fi; \ fi install-manual: @echo Installing online manual @test -d $(exp_manualdir) \ || $(MKINSTALLDIRS) $(exp_manualdir) @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \ $(RSYNC) --exclude .svn -rlpt --numeric-ids \ $(ftp_srcdir)/docs/manual/ $(exp_manualdir)/; \ else \ cp -rp $(ftp_srcdir)/docs/manual/* $(exp_manualdir)/ && \ find $(exp_manualdir) -name ".svn" -type d -print \ | xargs rm -rf 2>/dev/null || true; \ fi install-include: @echo Installing header files @$(MKINSTALLDIRS) $(exp_includedir) && \ cp $(ftp_srcdir)/include/mod_ftp.h $(exp_includedir)/ && \ chmod 0644 $(exp_includedir) mod_ftp.h