Subversion Repositories public

Rev

Rev 67 | Rev 75 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
45 luk 1
 
2
USERDATADIR = /var/spool/incron
67 luk 3
SYSDATADIR = /etc/incron.d
4
CFGDIR = /etc
69 luk 5
MANPATH = /usr/share/man
57 luk 6
RELEASE = incron-`cat VERSION`
59 luk 7
RELEASEDIR = /tmp/$(RELEASE)
8
45 luk 9
 
57 luk 10
45 luk 11
 
12
INSTALL = install
13
14
 
15
DEBUG = -g0
16
WARNINGS = -Wall
17
CXXAUX = -pipe
57 luk 18
45 luk 19
 
57 luk 20
LDFLAGS = $(WARNINGS)
45 luk 21
22
 
23
24
 
69 luk 25
INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o incroncfg.o appargs.o
26
45 luk 27
 
28
 
29
30
 
31
	$(CXX) $(LDFLAGS) -o $@ $(INCROND_OBJ)
32
33
 
34
	$(CXX) $(LDFLAGS) -o $@ $(INCRONTAB_OBJ)
35
36
 
37
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
38
39
 
40
	rm -f $(PROGRAMS)
41
	rm -f *.o
42
43
 
44
45
 
57 luk 46
	[ -d $(PREFIX) ]
45 luk 47
	$(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
48
	$(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
49
	$(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR)
67 luk 50
	$(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR)
51
	$(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR)
69 luk 52
45 luk 53
 
57 luk 54
	$(INSTALL) -m 0755 -d $(MANPATH)/man1
55
	$(INSTALL) -m 0755 -d $(MANPATH)/man5
56
	$(INSTALL) -m 0755 -d $(MANPATH)/man8
57
	$(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
58
	$(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5
59
	$(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8
60
61
 
62
	[ -d $(PREFIX) ]
45 luk 63
	rm -f $(PREFIX)/bin/incrontab
64
	rm -f $(PREFIX)/sbin/incrond
65
	rm -f $(CFGDIR)/incron.conf.example
69 luk 66
45 luk 67
 
57 luk 68
	rm -f $(MANPATH)/man1/incrontab.1
69
	rm -f $(MANPATH)/man5/incrontab.5
70
	rm -f $(MANPATH)/man8/incrontab.8
71
45 luk 72
 
61 luk 73
74
 
59 luk 75
	doxygen
61 luk 76
	mkdir -p $(RELEASEDIR)
59 luk 77
	cp -r doc $(RELEASEDIR)
78
	cp *.h $(RELEASEDIR)
79
	cp *.cpp $(RELEASEDIR)
80
	cp incron.conf.example $(RELEASEDIR)
69 luk 81
	cp Makefile CHANGELOG COPYING LICENSE-GPL LICENSE-LGPL LICENSE-X11 README TODO VERSION $(RELEASEDIR)
59 luk 82
	cp incrond.8 incrontab.1 incrontab.5 $(RELEASEDIR)
83
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
84
	bzip2 -9 $(RELEASE).tar
85
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
86
	gzip --best $(RELEASE).tar
87
	echo #!/bin/sh > myzip
88
	echo cd $(RELEASEDIR)/.. >> myzip
89
	echo zip -r -9 `pwd`/$(RELEASE).zip $(RELEASE) >> myzip
90
	chmod 0700 myzip
91
	./myzip
92
	rm -f myzip
93
	sha1sum $(RELEASE).tar.bz2 > sha1.txt
94
	sha1sum $(RELEASE).tar.gz >> sha1.txt
95
	sha1sum $(RELEASE).zip >> sha1.txt
96
	rm -rf $(RELEASEDIR)
97
45 luk 98
 
59 luk 99
	rm -f $(RELEASE).tar.bz2
100
	rm -f $(RELEASE).tar.gz
101
	rm -f $(RELEASE).zip
102
	rm -f sha1.txt
103
57 luk 104
 
61 luk 105
59 luk 106
 
45 luk 107
108
 
69 luk 109
incrontab.o:	incrontab.cpp incrontab.h inotify-cxx.h strtok.h
45 luk 110
inotify-cxx.o:	inotify-cxx.cpp inotify-cxx.h
111
usertable.o:	usertable.cpp usertable.h strtok.h
112
ict-main.o:	ict-main.cpp incrontab.h incron.h incroncfg.h appargs.h
69 luk 113
strtok.o:	strtok.cpp strtok.h
45 luk 114
appinst.o:	appinst.cpp appinst.h
69 luk 115
incroncfg.o:	incroncfg.cpp incroncfg.h
116
appargs.o:	appargs.cpp appargs.h
117