Subversion Repositories public

Rev

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

Rev 55 Rev 57
Line 1... Line 1...
1
PREFIX = /usr/local
1
PREFIX = /usr/local
2
DATADIR = /var/spool/incron
2
DATADIR = /var/spool/incron
3
3
MANPATH = /usr/share/man
-
 
4
4
USER = incron
5
USER = root
5
6
6
CXX = g++
7
CXX = g++
7
INSTALL = install
8
INSTALL = install
8
9
9
OPTIMIZE = -O2
10
OPTIMIZE = -O2
10
DEBUG = -g0
11
DEBUG = -g0
11
WARNINGS = -Wall
12
WARNINGS = -Wall
12
13
CXXAUX = -pipe
-
 
14
13
CPPFLAGS = 
15
CPPFLAGS = 
14
CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS)
16
CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
15
LDFLAGS = $(WARNINGS)
17
LDFLAGS = $(WARNINGS)
16
18
17
PROGRAMS = incrond incrontab
19
PROGRAMS = incrond incrontab
18
20
19
INCROND_OBJ = icd-main.o incrontab.o inotify-cxx.o usertable.o strtok.o
21
INCROND_OBJ = icd-main.o incrontab.o inotify-cxx.o usertable.o strtok.o
20
INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o
22
INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o
Line 36... Line 38...
36
	rm -f *.o
38
	rm -f *.o
37
39
38
distclean: clean
40
distclean: clean
39
41
40
install:	all
42
install:	all install-man
41
	[ -d $(PREFIX) ]
43
	[ -d $(PREFIX) ]
42
	useradd -M -s /sbin/nologin $(USER) || useradd -s /sbin/nologin $(USER)
44
	$(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
43
	$(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
-
 
44
	$(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
45
	$(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
45
	$(INSTALL) -m 0755 -o $(USER) -d $(DATADIR)
46
	$(INSTALL) -m 0755 -o $(USER) -d $(DATADIR)
46
47
47
uninstall:
48
install-man:	incrontab.1 incrontab.5 incrond.8
-
 
49
	$(INSTALL) -m 0755 -d $(MANPATH)/man1
-
 
50
	$(INSTALL) -m 0755 -d $(MANPATH)/man5
-
 
51
	$(INSTALL) -m 0755 -d $(MANPATH)/man8
-
 
52
	$(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
-
 
53
	$(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5
-
 
54
	$(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8
-
 
55
-
 
56
uninstall:	uninstall-man
48
	[ -d $(PREFIX) ]
57
	[ -d $(PREFIX) ]
49
	rm -f $(PREFIX)/bin/incrontab
58
	rm -f $(PREFIX)/bin/incrontab
50
	rm -f $(PREFIX)/sbin/incrond
59
	rm -f $(PREFIX)/sbin/incrond
51
	userdel $(USER)
60
-
 
61
uninstall-man:
52
62
	rm -f $(MANPATH)/man1/incrontab.1
-
 
63
	rm -f $(MANPATH)/man5/incrontab.5
-
 
64
	rm -f $(MANPATH)/man8/incrontab.8
-
 
65
53
66
54
.PHONY:	all clean distclean install uninstall
67
.PHONY:	all clean distclean install install-man uninstall uninstall-man
55
68
56
.POSIX:
69
.POSIX:
57
70
58
icd-main.o:	icd-main.cpp inotify-cxx.h incrontab.h usertable.h incron.h
71
icd-main.o:	icd-main.cpp inotify-cxx.h incrontab.h usertable.h incron.h
59
incrontab.o:	incrontab.cpp incrontab.h inotify-cxx.h strtok.h
72
incrontab.o:	incrontab.cpp incrontab.h inotify-cxx.h strtok.h
60
inotify-cxx.o:	inotify-cxx.cpp inotify-cxx.h
73
inotify-cxx.o:	inotify-cxx.cpp inotify-cxx.h