blob: 4e5cc6bd3fd34c98c4c850941a12a1582f81d9a9 [file] [log] [blame]
##
## Makefile.apxs -- Build procedure for mod_fcgid Apache module
##
## Do not use this target; build from the mod_fcgid 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)/..
fcgid_builddir=.
fcgid_srcdir=.
builddir=.
srcdir=.
SUBDIRS = modules/fcgid
CLEAN_SUBDIRS =
TARGETS =
INSTALL_TARGETS = install-manual
## no such targets yet; install-conf install-include
DISTCLEAN_TARGETS = config.apxs.log modules/fcgid/fcgid_config.h
EXTRACLEAN_TARGETS =
include $(exp_installbuilddir)/rules.mk
# Dang nabbit, these are stripped! Reconstitute them;
rel_libexecdir=`echo $(exp_libexecdir) | sed -e "s#^$(prefix)/##;"`
rel_sysconfdir=`echo $(exp_sysconfdir) | sed -e "s#^$(prefix)/##;"`
rel_logfiledir=`echo $(exp_logfiledir) | sed -e "s#^$(prefix)/##;"`
httpd_conffile=$(exp_sysconfdir)/$(progname).conf
install-conf:
@echo Installing configuration files
@$(MKINSTALLDIRS) $(exp_sysconfdir) $(exp_sysconfdir)/extra \
$(exp_sysconfdir)/original $(exp_sysconfdir)/original/extra
@cd $(fcgid_srcdir)/docs/conf; \
for j in $(fcgid_srcdir)/docs/conf; do \
cd $$j ; \
for i in extra/httpd-fcgid.conf; do \
if test -f $$i; then \
sed -e '/^\#@@LoadFcgidModules@@/d;' \
-e 's#@exp_runtimedir@#$(exp_runtimedir)#;' \
-e 's#@exp_sysconfdir@#$(exp_sysconfdir)#;' \
-e 's#@rel_sysconfdir@#$(rel_sysconfdir)#;' \
-e 's#@rel_logfiledir@#$(rel_logfiledir)#;' \
< $$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 $(fcgid_srcdir)/build/addloadexample.awk \
-v MODULE=fcgid -v DSO=.so -v LIBPATH=$(rel_libexecdir) \
-v EXAMPLECONF=$(rel_sysconfdir)/extra/httpd-fcgid.conf \
$(httpd_conffile) > $(httpd_conffile).new && \
( mv $(httpd_conffile) $(httpd_conffile).bak && \
mv $(httpd_conffile).new $(httpd_conffile) );
svnroot=http://svn.apache.org/repos/asf/httpd
manualdir=$(fcgid_srcdir)/docs/manual
# Note; by default, make generate-docs rebuilds the local pages
# To regenerate the installed pages (after using make install to
# drop in the fcgid content), simply
#
# make manualdir=/path/to/manual generate-docs
#
generate-docs:
@if test ! -d $(manualdir)/build; then \
cd $(manualdir); \
svn export $(svnroot)/docs-build/trunk build; \
fi
@if test ! -d $(manualdir)/style; then \
cd $(manualdir); \
svn export $(svnroot)/httpd/branches/2.2.x/docs/manual/style; \
fi
cd $(manualdir)/build; \
./build.sh all
generate-dox:
cd $(fcgid_srcdir); \
doxygen $(fcgid_srcdir)/docs/doxygen-fcgid.conf
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 \
$(fcgid_srcdir)/docs/manual/ $(exp_manualdir)/; \
else \
cp -rp $(fcgid_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 $(fcgid_srcdir)/include/mod_fcgid.h $(exp_includedir)/ && \
chmod 0644 $(exp_includedir)/mod_fcgid.h
.PHONY: generate-dox generate-docs