Subversion Repositories public

Rev

Rev 61 | Rev 69 | 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
MANPATH = /usr/share/man
57 luk 5
RELEASE = incron-`cat VERSION`
59 luk 6
RELEASEDIR = /tmp/$(RELEASE)
7
45 luk 8
 
57 luk 9
45 luk 10
 
11
INSTALL = install
12
13
 
14
DEBUG = -g0
15
WARNINGS = -Wall
16
CXXAUX = -pipe
57 luk 17
45 luk 18
 
19
CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
57 luk 20
LDFLAGS = $(WARNINGS)
45 luk 21
22
 
23
24
 
25
INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o
26
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
45 luk 52
 
57 luk 53
	$(INSTALL) -m 0755 -d $(MANPATH)/man1
54
	$(INSTALL) -m 0755 -d $(MANPATH)/man5
55
	$(INSTALL) -m 0755 -d $(MANPATH)/man8
56
	$(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
57
	$(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5
58
	$(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8
59
60
 
61
	[ -d $(PREFIX) ]
45 luk 62
	rm -f $(PREFIX)/bin/incrontab
63
	rm -f $(PREFIX)/sbin/incrond
64
65
 
57 luk 66
	rm -f $(MANPATH)/man1/incrontab.1
67
	rm -f $(MANPATH)/man5/incrontab.5
68
	rm -f $(MANPATH)/man8/incrontab.8
69
45 luk 70
 
61 luk 71
72
 
59 luk 73
	doxygen
61 luk 74
	mkdir -p $(RELEASEDIR)
59 luk 75
	cp -r doc $(RELEASEDIR)
76
	cp *.h $(RELEASEDIR)
77
	cp *.cpp $(RELEASEDIR)
78
	cp Makefile CHANGELOG COPYING LICENSE-GPL LICENSE-LGPL LICENSE-X11 README TODO VERSION $(RELEASEDIR)
79
	cp incrond.8 incrontab.1 incrontab.5 $(RELEASEDIR)
80
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
81
	bzip2 -9 $(RELEASE).tar
82
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
83
	gzip --best $(RELEASE).tar
84
	echo #!/bin/sh > myzip
85
	echo cd $(RELEASEDIR)/.. >> myzip
86
	echo zip -r -9 `pwd`/$(RELEASE).zip $(RELEASE) >> myzip
87
	chmod 0700 myzip
88
	./myzip
89
	rm -f myzip
90
	sha1sum $(RELEASE).tar.bz2 > sha1.txt
91
	sha1sum $(RELEASE).tar.gz >> sha1.txt
92
	sha1sum $(RELEASE).zip >> sha1.txt
93
	rm -rf $(RELEASEDIR)
94
45 luk 95
 
59 luk 96
	rm -f $(RELEASE).tar.bz2
97
	rm -f $(RELEASE).tar.gz
98
	rm -f $(RELEASE).zip
99
	rm -f sha1.txt
100
57 luk 101
 
61 luk 102
59 luk 103
 
45 luk 104
105
 
55 luk 106
incrontab.o:	incrontab.cpp incrontab.h inotify-cxx.h strtok.h
45 luk 107
inotify-cxx.o:	inotify-cxx.cpp inotify-cxx.h
108
usertable.o:	usertable.cpp usertable.h strtok.h
109
ict-main.o:	ict-main.cpp incrontab.h incron.h
55 luk 110
strtok.o:	strtok.cpp strtok.h
45 luk 111