Subversion Repositories public

Rev

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