Subversion Repositories public

Rev

Rev 67 | Rev 75 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 67 Rev 69
Line 1... Line 1...
1
PREFIX = /usr/local
1
PREFIX = /usr/local
2
USERDATADIR = /var/spool/incron
2
USERDATADIR = /var/spool/incron
3
SYSDATADIR = /etc/incron.d
3
SYSDATADIR = /etc/incron.d
4
MANPATH = /usr/share/man
4
CFGDIR = /etc
-
 
5
MANPATH = /usr/share/man
5
RELEASE = incron-`cat VERSION`
6
RELEASE = incron-`cat VERSION`
6
RELEASEDIR = /tmp/$(RELEASE)
7
RELEASEDIR = /tmp/$(RELEASE)
7
8
8
USER = root
9
USER = root
9
10
Line 14... Line 15...
14
DEBUG = -g0
15
DEBUG = -g0
15
WARNINGS = -Wall
16
WARNINGS = -Wall
16
CXXAUX = -pipe
17
CXXAUX = -pipe
17
18
18
CPPFLAGS = 
19
CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
19
CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
-
 
20
LDFLAGS = $(WARNINGS)
20
LDFLAGS = $(WARNINGS)
21
21
22
PROGRAMS = incrond incrontab
22
PROGRAMS = incrond incrontab
23
23
24
INCROND_OBJ = icd-main.o incrontab.o inotify-cxx.o usertable.o strtok.o
24
INCROND_OBJ = icd-main.o incrontab.o inotify-cxx.o usertable.o strtok.o appinst.o incroncfg.o appargs.o
25
INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o
25
INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o incroncfg.o appargs.o
26
26
27
27
28
all:	$(PROGRAMS)
28
all:	$(PROGRAMS)
29
29
30
incrond:	$(INCROND_OBJ)
30
incrond:	$(INCROND_OBJ)
31
	$(CXX) $(LDFLAGS) -o $@ $(INCROND_OBJ)
31
	$(CXX) $(LDFLAGS) -o $@ $(INCROND_OBJ)
Line 47... Line 47...
47
	$(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
47
	$(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
48
	$(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
48
	$(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
49
	$(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR)
49
	$(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR)
50
	$(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR)
50
	$(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR)
51
51
	$(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR)
-
 
52
52
install-man:	incrontab.1 incrontab.5 incrond.8
53
install-man:	incrontab.1 incrontab.5 incrond.8
53
	$(INSTALL) -m 0755 -d $(MANPATH)/man1
54
	$(INSTALL) -m 0755 -d $(MANPATH)/man1
54
	$(INSTALL) -m 0755 -d $(MANPATH)/man5
55
	$(INSTALL) -m 0755 -d $(MANPATH)/man5
55
	$(INSTALL) -m 0755 -d $(MANPATH)/man8
56
	$(INSTALL) -m 0755 -d $(MANPATH)/man8
56
	$(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
57
	$(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
Line 60... Line 61...
60
uninstall:	uninstall-man
61
uninstall:	uninstall-man
61
	[ -d $(PREFIX) ]
62
	[ -d $(PREFIX) ]
62
	rm -f $(PREFIX)/bin/incrontab
63
	rm -f $(PREFIX)/bin/incrontab
63
	rm -f $(PREFIX)/sbin/incrond
64
	rm -f $(PREFIX)/sbin/incrond
64
65
	rm -f $(CFGDIR)/incron.conf.example
-
 
66
65
uninstall-man:
67
uninstall-man:
66
	rm -f $(MANPATH)/man1/incrontab.1
68
	rm -f $(MANPATH)/man1/incrontab.1
67
	rm -f $(MANPATH)/man5/incrontab.5
69
	rm -f $(MANPATH)/man5/incrontab.5
68
	rm -f $(MANPATH)/man8/incrontab.8
70
	rm -f $(MANPATH)/man8/incrontab.8
69
71
Line 74... Line 76...
74
	mkdir -p $(RELEASEDIR)
76
	mkdir -p $(RELEASEDIR)
75
	cp -r doc $(RELEASEDIR)
77
	cp -r doc $(RELEASEDIR)
76
	cp *.h $(RELEASEDIR)
78
	cp *.h $(RELEASEDIR)
77
	cp *.cpp $(RELEASEDIR)
79
	cp *.cpp $(RELEASEDIR)
78
	cp Makefile CHANGELOG COPYING LICENSE-GPL LICENSE-LGPL LICENSE-X11 README TODO VERSION $(RELEASEDIR)
80
	cp incron.conf.example $(RELEASEDIR)
-
 
81
	cp Makefile CHANGELOG COPYING LICENSE-GPL LICENSE-LGPL LICENSE-X11 README TODO VERSION $(RELEASEDIR)
79
	cp incrond.8 incrontab.1 incrontab.5 $(RELEASEDIR)
82
	cp incrond.8 incrontab.1 incrontab.5 $(RELEASEDIR)
80
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
83
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
81
	bzip2 -9 $(RELEASE).tar
84
	bzip2 -9 $(RELEASE).tar
82
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
85
	tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
83
	gzip --best $(RELEASE).tar
86
	gzip --best $(RELEASE).tar
Line 101... Line 104...
101
.PHONY:	all clean distclean install install-man uninstall uninstall-man release release-clean update
104
.PHONY:	all clean distclean install install-man uninstall uninstall-man release release-clean update
102
105
103
.POSIX:
106
.POSIX:
104
107
105
icd-main.o:	icd-main.cpp inotify-cxx.h incrontab.h usertable.h incron.h
108
icd-main.o:	icd-main.cpp inotify-cxx.h incrontab.h usertable.h incron.h appinst.h incroncfg.h appargs.h
106
incrontab.o:	incrontab.cpp incrontab.h inotify-cxx.h strtok.h
109
incrontab.o:	incrontab.cpp incrontab.h inotify-cxx.h strtok.h
107
inotify-cxx.o:	inotify-cxx.cpp inotify-cxx.h
110
inotify-cxx.o:	inotify-cxx.cpp inotify-cxx.h
108
usertable.o:	usertable.cpp usertable.h strtok.h
111
usertable.o:	usertable.cpp usertable.h strtok.h
109
ict-main.o:	ict-main.cpp incrontab.h incron.h
112
ict-main.o:	ict-main.cpp incrontab.h incron.h incroncfg.h appargs.h
110
strtok.o:	strtok.cpp strtok.h
113
strtok.o:	strtok.cpp strtok.h
111
114
appinst.o:	appinst.cpp appinst.h
112
-
 
-
 
115
incroncfg.o:	incroncfg.cpp incroncfg.h
-
 
116
appargs.o:	appargs.cpp appargs.h
-
 
117