File: Makefile

package info (click to toggle)
libapache-mod-auth-useragent 1.0-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 160 kB
  • ctags: 81
  • sloc: sh: 170; makefile: 148; ansic: 135
file content (83 lines) | stat: -rw-r--r-- 1,976 bytes parent folder | download | duplicates (3)
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
##
##  Makefile -- Build procedure for sample auth_useragent Apache module
##  Autogenerated via ``apxs -n auth_useragent -g''.
##

#   the used tools
APXS=apxs
APACHECTL=apachectl
VERSION = 1.0
DISTNAME = mod_auth_useragent
DISTVNAME = $(DISTNAME)-$(VERSION)

SHELL = /bin/sh
PERL = perl
NOOP = $(SHELL) -c true
RM_RF = rm -rf
SUFFIX = .gz
COMPRESS = gzip --best
TAR  = tar
TARFLAGS = cvf
PREOP = @$(NOOP)
POSTOP = @$(NOOP)
TO_UNIX = @$(NOOP)

#   additional user defines, includes and libraries
#DEF=-DDEBUG
#INC=-Imy/include/dir
#LIB=-Lmy/lib/dir -lmylib

#   the default target
all: mod_auth_useragent.so

#   compile the DSO file
mod_auth_useragent.so: mod_auth_useragent.c
	$(APXS) -c $(DEF) $(INC) $(LIB) mod_auth_useragent.c

#   install the DSO file into the Apache installation
#   and activate it in the Apache configuration
install: all
	$(APXS) -i -S LIBEXECDIR=$(DESTDIR)/usr/lib/apache/1.3 -n 'auth_useragent' mod_auth_useragent.so

#   cleanup
clean:
	-rm -f mod_auth_useragent.o mod_auth_useragent.so

#   simple test
test: reload
	lynx -mime_header http://localhost/auth_useragent

#   reload the module by installing and restarting Apache
reload: install restart

#   the general Apache start/restart/stop procedures
start:
	$(APACHECTL) start
restart:
	$(APACHECTL) restart
stop:
	$(APACHECTL) stop

dist: $(DISTVNAME).tar$(SUFFIX)

$(DISTVNAME).tar$(SUFFIX) : distdir
	$(PREOP)
	$(TO_UNIX)
	$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
	$(RM_RF) $(DISTVNAME)
	$(COMPRESS) $(DISTVNAME).tar
	$(POSTOP)

distdir :
# $(RM_RF) $(DISTVNAME)
	$(PERL) -MExtUtils::Manifest=manicopy,maniread \
	-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"

push :
	if [ -F *.gz ] ; then \
		rm *.gz; \
	fi
	make dist
	scp *.gz root@www.tangent.org:/usr/local/slash/site/www.tangent.org/htdocs/download
	scp *.gz root@ftp.tangent.org:/export/ftp/pub/apache
	scp faq.html root@www.tangent.org:/usr/local/slash/site/www.tangent.org/htdocs/faqs/mod_auth_useragent.html