Subversion Repositories public

Rev

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

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