"Fossies" - the Fresh Open Source Software Archive 
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 -- Build procedure for mod_trigger
3 ##
4
5 # the used tools
6 APXS=apxs
7 APACHECTL=apachectl
8 VERSION = 1.1
9 DISTNAME = mod_trigger
10 DISTVNAME = $(DISTNAME)-$(VERSION)
11
12 SHELL = /bin/sh
13 PERL = perl
14 NOOP = $(SHELL) -c true
15 RM_RF = rm -rf
16 SUFFIX = .gz
17 COMPRESS = gzip --best
18 TAR = tar
19 TARFLAGS = cvf
20 PREOP = @$(NOOP)
21 POSTOP = @$(NOOP)
22 TO_UNIX = @$(NOOP)
23
24
25 # additional user defines, includes and libraries
26 #DEF=-Dmy_define=my_value
27 #INC=-Imy/include/dir
28 #LIB=-Lmy/lib/dir -lmylib
29
30 # the default target
31 all: mod_trigger.so
32
33 rpm: dist
34 cp $(DISTVNAME).tar$(SUFFIX) /usr/src/redhat/SOURCES
35 rpm -ba $(DISTNAME).spec
36 cp /usr/src/redhat/RPMS/i386/$(DISTVNAME)*.i386.rpm .
37 cp /usr/src/redhat/SRPMS/$(DISTVNAME)*.src.rpm .
38
39 # compile the DSO file
40 mod_trigger.so: mod_trigger.c
41 $(APXS) -c $(DEF) $(INC) $(LIB) mod_trigger.c
42
43 # install the DSO file into the Apache installation
44 # and activate it in the Apache configuration
45 install: all
46 $(APXS) -i -a -n 'trigger' mod_trigger.so
47
48 # cleanup
49 clean:
50 -rm -f mod_trigger.o mod_trigger.so
51
52 # simple test
53 test: reload
54 lynx -mime_header http://localhost/trigger
55
56 # reload the module by installing and restarting Apache
57 reload: install stop start
58
59 # the general Apache start/restart/stop procedures
60 start:
61 $(APACHECTL) start
62 restart:
63 $(APACHECTL) restart
64 stop:
65 $(APACHECTL) stop
66
67 dist: $(DISTVNAME).tar$(SUFFIX)
68
69 version:
70 echo $(VERSION) > VERSION
71 echo "#define VERSION \"$(VERSION)\"" > version.h
72 cat mod_trigger.spec | $(PERL) -e 'while (<STDIN>) { push @file, $$_} open(FILE, ">mod_trigger.spec"); for(@file) { if (/^Version/) { print FILE "Version: ${VERSION}\n" } else { print FILE $$_}}'
73
74 $(DISTVNAME).tar$(SUFFIX) : distdir
75 $(PREOP)
76 $(TO_UNIX)
77 $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
78 $(RM_RF) $(DISTVNAME)
79 $(COMPRESS) $(DISTVNAME).tar
80 $(POSTOP)
81
82 distdir :
83 $(RM_RF) $(DISTVNAME)
84 $(PERL) -MExtUtils::Manifest=manicopy,maniread \
85 -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
86
87 push :
88 if [ -F *.gz ] ; then \
89 rm *.gz; \
90 fi
91 make dist
92 scp $(DISTVNAME).tar$(SUFFIX) root@www.tangent.org:/usr/local/slash/site/www.tangent.org/htdocs/download
93 scp $(DISTVNAME).tar$(SUFFIX) root@ftp.tangent.org:/var/ftp/pub/apache
94 scp $(DISTVNAME)*.i386.rpm root@www.tangent.org:/usr/local/slash/site/www.tangent.org/htdocs/download
95 scp $(DISTVNAME)*i386.rpm root@ftp.tangent.org:/var/ftp/pub/apache
96 scp faq.html root@www.tangent.org:/usr/local/slash/site/www.tangent.org/htdocs/faqs/mod_trigger.html