File: Makefile.in

package info (click to toggle)
mrtg 2.8.9-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,716 kB
  • ctags: 912
  • sloc: perl: 15,799; ansic: 3,489; sh: 844; makefile: 153; csh: 49; exp: 16
file content (65 lines) | stat: -rw-r--r-- 2,451 bytes parent folder | download
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
# things that the GNU standards document suggests all makefiles
# should have.
SHELL=/bin/sh
.SUFFIXES:
.SUFFIXES: .c .o .pl .pm .pod .html .man

# Where is perl 5 on this machine
PERL = @PERL@
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
GDFORM_EXT = @GDFORM_EXT@
LD_RUN_PATH = @LD_RUN_PATH@

all:	 run/rateup subst

run/rateup: src/rateup.c
	LD_RUN_PATH=$(LD_RUN_PATH) $(CC) $(CFLAGS) src/rateup.c $(LDFLAGS) -o run/rateup

subst:
	$(PERL) -0777 -pi -e 's@^#!\s*/\S*perl@#! $(PERL)@' run/cfgmaker run/cfgmaker_ip run/indexmaker run/mrtg
	$(PERL) -0777 -pi -e 's@(day|week|month|year|peri.)\.(png|gif)@$$1.$(GDFORM_EXT)@g' run/mrtg run/indexmaker

clean:
	rm run/rateup
	rm config.cache config.log config.status

########### Distribution Tools

###
### Things you might NOT want to play with ... 
###

VER=2.8.9

ARCHIVE = mrtg-$(VER)
DIRNAME = mrtg-$(VER)

versync:
	perl -i -p -e 's|VERSION\s*=\s*"\d+\.\d+\.\d+"|VERSION = "$(VER)"|gi; s|mrtg-\d+\.\d+\.\d+|mrtg-$(VER)|gi; s|MRTG\s\d+\.\d+\.\d+|MRTG $(VER)|gi' ANNOUNCE run/* src/* doc/*
	cd translate && $(PERL) mergelocale.pl skeleton.pm0 *.pmd && cp locales_mrtg.pm ../run	

docs:   versync
	(cd doc; lynx -dump manual.html >manual.txt)
	(cd doc; pod2html config.pod | perl -p -e 's|<BODY|<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#990200" VLINK="#006342" |' > config.html )
	(cd doc; lynx -dump config.html > config.txt )

tar:	docs
	autoconf
	chmod -R u=rwX,go=rX *
	(cd .. ; ln -s mrtg $(DIRNAME))
	$(PERL) -0777 -pi -e 's@(day|week|month|year|peri.)\.(png|gif)@$$1.png@g' run/mrtg run/indexmaker
	(cd .. ; sed -e "s/^/$(DIRNAME)\//" $(DIRNAME)/MANIFEST | xargs gtar zcvf $(DIRNAME)/archive/$(ARCHIVE).tar.gz )
	$(PERL) -0777 -pi -e 's@(day|week|month|year|peri.)\.(png|gif)@$$1.gif@g' run/mrtg run/indexmaker
	(cd .. ; sed -e "s/^/$(DIRNAME)\//" $(DIRNAME)/MANIFEST | xargs zip -r $(DIRNAME)/archive/$(ARCHIVE).zip; zip $(DIRNAME)/archive/$(ARCHIVE).zip $(DIRNAME)/run/rateup.exe )
	rm ../$(DIRNAME)

doc-dist: docs
	scp doc/manual.html oetiker@tardis.ee.ethz.ch:public_html/webtools/mrtg/readme.html
	scp doc/nt-guide.html oetiker@tardis.ee.ethz.ch:public_html/webtools/mrtg/
	scp doc/config.html oetiker@tardis.ee.ethz.ch:public_html/webtools/mrtg/config.html

dist: doc-dist tar
	scp archive/$(ARCHIVE).* oetiker@tardis.ee.ethz.ch:public_html/webtools/mrtg/pub/
	ssh oetiker@tardis.ee.ethz.ch '(cd public_html/webtools/mrtg/pub; rm mrtg.tar.gz;ln -s $(ARCHIVE).tar.gz mrtg.tar.gz)'