Subversion Repositories public

Rev

Rev 57 | Rev 61 | 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
 
59 luk 69
	mkdir -p $(RELEASEDIR)
70
	cp -r doc $(RELEASEDIR)
71
	cp *.h $(RELEASEDIR)
72
	cp *.cpp $(RELEASEDIR)
73
	cp Makefile CHANGELOG COPYING LICENSE-GPL LICENSE-LGPL LICENSE-X11 README TODO VERSION $(RELEASEDIR)
74
	cp incrond.8 incrontab.1 incrontab.5 $(RELEASEDIR)
75
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
76
	bzip2 -9 $(RELEASE).tar
77
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
78
	gzip --best $(RELEASE).tar
79
	echo #!/bin/sh > myzip
80
	echo cd $(RELEASEDIR)/.. >> myzip
81
	echo zip -r -9 `pwd`/$(RELEASE).zip $(RELEASE) >> myzip
82
	chmod 0700 myzip
83
	./myzip
84
	rm -f myzip
85
	sha1sum $(RELEASE).tar.bz2 > sha1.txt
86
	sha1sum $(RELEASE).tar.gz >> sha1.txt
87
	sha1sum $(RELEASE).zip >> sha1.txt
88
	rm -rf $(RELEASEDIR)
89
45 luk 90
 
59 luk 91
	rm -f $(RELEASE).tar.bz2
92
	rm -f $(RELEASE).tar.gz
93
	rm -f $(RELEASE).zip
94
	rm -f sha1.txt
95
57 luk 96
 
59 luk 97
98
 
45 luk 99
100
 
55 luk 101
incrontab.o:	incrontab.cpp incrontab.h inotify-cxx.h strtok.h
45 luk 102
inotify-cxx.o:	inotify-cxx.cpp inotify-cxx.h
103
usertable.o:	usertable.cpp usertable.h strtok.h
104
ict-main.o:	ict-main.cpp incrontab.h incron.h
55 luk 105
strtok.o:	strtok.cpp strtok.h
45 luk 106