File: Makefile.apxs

package info (click to toggle)
libapache2-mod-fcgid 1:2.3.9-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,456 kB
  • sloc: ansic: 5,912; xml: 1,052; sh: 118; sed: 64; awk: 37; makefile: 21
file content (125 lines) | stat: -rw-r--r-- 4,253 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
##
##  Makefile.apxs -- Build procedure for mod_fcgid Apache module
##
##  Do not use the .apxs makefile, run ./configure.apxs and build from 'Makefile'
##
 
# 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=.
awk=.

SUBDIRS = modules/fcgid
CLEAN_SUBDIRS = 

TARGETS         = 
INSTALL_TARGETS = install-conf install-manual
## no such targets yet; install-include
DISTCLEAN_TARGETS  = config.apxs.log modules/fcgid/fcgid_config.h
EXTRACLEAN_TARGETS = 

include $(exp_installbuilddir)/rules.mk

x-local-distclean:
	rm -rf docs/manual/build docs/manual/style

# 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
httpd_origconffile=$(exp_sysconfdir)/original/$(progname).conf

install-conf:
	@echo Installing configuration files
	@$(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 $(fcgid_srcdir)/build/addloadexample.awk \
		    -v MODULE=fcgid -v DSO=.so -v LIBPATH=$(rel_libexecdir) \
		    < $$i > $$i.new && \
		 mv $$i $$i.bak && mv $$i.new $$i \
	        ) || true; \
	    fi; \
	done
#	Todo - add this flag to awk above, if/when this Include is distributed
#		    -v EXAMPLECONF=$(rel_sysconfdir)/extra/httpd-fcgid.conf

install-conf-unused:
	@$(MKINSTALLDIRS) $(DESTDIR)$(exp_sysconfdir)/extra \
			  $(DESTDIR)$(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 > $(DESTDIR)$(exp_sysconfdir)/original/$$i; \
	    	    chmod 0644 $(DESTDIR)$(exp_sysconfdir)/original/$$i; \
	    	    if test ! -f $(DESTDIR)$(exp_sysconfdir)/$$i; then \
	    		cp $(DESTDIR)$(exp_sysconfdir)/original/$$i \
			    $(DESTDIR)$(exp_sysconfdir)/$$i; \
	    		chmod 0644 $(DESTDIR)$(exp_sysconfdir)/$$i; \
	    	    fi; \
	    	fi; \
	    done ; \
	done

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/trunk/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 $(DESTDIR)$(exp_manualdir) \
          || $(MKINSTALLDIRS) $(DESTDIR)$(exp_manualdir)
	@if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
	  $(RSYNC) --exclude .svn -rlpt --numeric-ids \
		$(fcgid_srcdir)/docs/manual/ $(DESTDIR)$(exp_manualdir)/; \
	else \
	  cp -rp $(fcgid_srcdir)/docs/manual/* $(DESTDIR)$(exp_manualdir)/ && \
	  find $(DESTDIR)$(exp_manualdir) -name ".svn" -type d -print \
	    | xargs rm -rf 2>/dev/null || true; \
	fi

install-include-unused:
	@echo Installing header files
	@$(MKINSTALLDIRS) $(DESTDIR)$(exp_includedir) && \
	  cp $(fcgid_srcdir)/include/mod_fcgid.h $(DESTDIR)$(exp_includedir)/ && \
	  chmod 0644 $(DESTDIR)$(exp_includedir)/mod_fcgid.h

.PHONY: generate-dox generate-docs