"Fossies" - the Fresh Open Source Software Archive

Member "mod_ftp-0.9.6/Makefile.apxs" (28 Sep 2009, 4718 Bytes) of package /linux/www/apache_httpd_modules/old/mod_ftp-0.9.6-beta.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ##
    2 ##  Makefile.apxs -- Build procedure for mod_ftp Apache module
    3 ##
    4 ##  Do not use this target; build from the mod_ftp dir root
    5 ##
    6  
    7 # top_builddir and top_srcdir are misnomers, because build/*.mk scripts
    8 # expect each of them to be the parent of the build directory, and fail
    9 # to trust the installbuilddir.
   10 exp_installbuilddir=$(shell $(APXS) -q exp_installbuilddir)
   11 top_srcdir=$(installbuilddir)/..
   12 top_builddir=$(installbuilddir)/..
   13 
   14 ftp_builddir=.
   15 ftp_srcdir=.
   16 builddir=.
   17 srcdir=.
   18 
   19 SUBDIRS = modules/ftp
   20 CLEAN_SUBDIRS = 
   21 
   22 TARGETS         = 
   23 INSTALL_TARGETS = install-conf install-ftpdocs install-manual install-include
   24 DISTCLEAN_TARGETS  = config.apxs.log modules/ftp/ftp_config.h
   25 EXTRACLEAN_TARGETS = 
   26 
   27 include $(exp_installbuilddir)/rules.mk
   28 
   29 x-local-distclean:
   30 	rm -rf docs/manual/build docs/manual/style
   31 
   32 # Dang nabbit, these are stripped!  Reconstitute them;
   33 rel_libexecdir=`echo $(exp_libexecdir) | sed -e "s#^$(prefix)/##;"`
   34 rel_sysconfdir=`echo $(exp_sysconfdir) | sed -e "s#^$(prefix)/##;"`
   35 rel_logfiledir=`echo $(exp_logfiledir) | sed -e "s#^$(prefix)/##;"`
   36 httpd_conffile=$(exp_sysconfdir)/$(progname).conf
   37 
   38 exp_ftpdocsdir=$(exp_datadir)/ftpdocs
   39 FTPPORT=21
   40 
   41 install-conf:
   42 	@echo Installing configuration files
   43 	@$(MKINSTALLDIRS) $(exp_sysconfdir) $(exp_sysconfdir)/extra \
   44 		$(exp_sysconfdir)/original $(exp_sysconfdir)/original/extra
   45 	@cd $(ftp_srcdir)/docs/conf; \
   46 	for j in $(ftp_srcdir)/docs/conf; do \
   47 	    cd $$j ; \
   48 	    for i in extra/ftpd*.conf; do \
   49 	    	if test -f $$i; then \
   50 	    	    sed -e '/^\#@@LoadFtpModules@@/d;' \
   51 	    		-e 's#@exp_ftpdocsdir@#$(exp_ftpdocsdir)#;' \
   52 	    		-e 's#@exp_runtimedir@#$(exp_runtimedir)#;' \
   53 	    		-e 's#@exp_sysconfdir@#$(exp_sysconfdir)#;' \
   54 	    		-e 's#@rel_sysconfdir@#$(rel_sysconfdir)#;' \
   55 	    		-e 's#@rel_logfiledir@#$(rel_logfiledir)#;' \
   56 	    		-e 's#@@FTPPort@@#$(FTPPORT)#;' \
   57 	    		< $$i > $(exp_sysconfdir)/original/$$i; \
   58 	    	    chmod 0644 $(exp_sysconfdir)/original/$$i; \
   59 	    	    if test ! -f $(exp_sysconfdir)/$$i; then \
   60 	    		cp $(exp_sysconfdir)/original/$$i \
   61 			    $(exp_sysconfdir)/$$i; \
   62 	    		chmod 0644 $(exp_sysconfdir)/$$i; \
   63 	    	    fi; \
   64 	    	fi; \
   65 	    done ; \
   66 	done
   67 	@awk -f $(ftp_srcdir)/build/addloadexample.awk \
   68 		-v MODULE=ftp -v DSO=.so -v LIBPATH=$(rel_libexecdir) \
   69 		-v EXAMPLECONF=$(rel_sysconfdir)/extra/ftpd.conf \
   70 		$(DESTDIR)$(httpd_conffile) > $(DESTDIR)$(httpd_conffile).new && \
   71 	  ( mv $(DESTDIR)$(httpd_conffile) $(DESTDIR)$(httpd_conffile).bak && \
   72 	    mv $(DESTDIR)$(httpd_conffile).new $(DESTDIR)$(httpd_conffile) );
   73 
   74 svnroot=http://svn.apache.org/repos/asf/httpd
   75 manualdir=$(ftp_srcdir)/docs/manual
   76 
   77 # Note; by default,  make generate-docs  rebuilds the local pages
   78 # To regenerate the installed pages (after using make install to
   79 # drop in the ftp content), simply
   80 #
   81 #   make manualdir=/path/to/manual generate-docs
   82 #
   83 generate-docs:
   84 	@if test ! -d $(manualdir)/build; then \
   85 	  cd $(manualdir); \
   86 	  svn export $(svnroot)/docs-build/trunk build; \
   87 	fi
   88 	@if test ! -d $(manualdir)/style; then \
   89 	  cd $(manualdir); \
   90 	  svn export $(svnroot)/httpd/trunk/docs/manual/style; \
   91 	fi
   92 	cd $(manualdir)/build; \
   93 	  ./build.sh all
   94 
   95 generate-dox:
   96 	cd $(ftp_srcdir); \
   97 	  doxygen $(ftp_srcdir)/docs/doxygen-ftp.conf
   98 
   99 ftpdocs-srcdir = $(ftp_srcdir)/docs/ftproot
  100 
  101 install-ftpdocs:
  102 	@if test -d $(DESTDIR)$(exp_ftpdocsdir); then \
  103 	  echo "Preserving existing FTP documents"; \
  104 	else \
  105 	  echo "Installing FTP documents"; \
  106 	  $(MKINSTALLDIRS) $(DESTDIR)$(exp_ftpdocsdir) ; \
  107 	  if test -d $(DESTDIR)$(ftpdocs-srcdir) && test "x$(RSYNC)" != "x" \
  108 	    && test -x "$(RSYNC)" ; then \
  109 		$(RSYNC) --exclude .svn -rlpt --numeric-ids $(ftpdocs-srcdir)/ \
  110 			$(DESTDIR)$(exp_ftpdocsdir)/; \
  111 	  else \
  112 		test -d $(ftpdocs-srcdir) && (cd $(ftpdocs-srcdir) \
  113 		  && cp -rp * $(DESTDIR)$(exp_ftpdocsdir)) ; \
  114 		cd $(DESTDIR)$(exp_ftpdocsdir) && find . -name ".svn" -type d -print \
  115 		  | xargs rm -rf 2>/dev/null || true; \
  116 	  fi; \
  117 	fi
  118 
  119 install-manual:
  120 	@echo Installing online manual
  121 	@test -d $(DESTDIR)$(exp_manualdir) \
  122           || $(MKINSTALLDIRS) $(DESTDIR)$(exp_manualdir)
  123 	@if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
  124 	  $(RSYNC) --exclude .svn -rlpt --numeric-ids \
  125 		$(ftp_srcdir)/docs/manual/ $(DESTDIR)$(exp_manualdir)/; \
  126 	else \
  127 	  cp -rp $(ftp_srcdir)/docs/manual/* $(DESTDIR)$(exp_manualdir)/ && \
  128 	  find $(DESTDIR)$(exp_manualdir) -name ".svn" -type d -print \
  129 	    | xargs rm -rf 2>/dev/null || true; \
  130 	fi
  131 
  132 install-include:
  133 	@echo Installing header files
  134 	@$(MKINSTALLDIRS) $(DESTDIR)$(exp_includedir) && \
  135 	  cp $(ftp_srcdir)/include/mod_ftp.h $(DESTDIR)$(exp_includedir)/ && \
  136 	  chmod 0644 $(DESTDIR)$(exp_includedir)/mod_ftp.h
  137 
  138 .PHONY: generate-dox generate-docs