-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (22 loc) · 897 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DESTDIR:=/usr
DOCDIR:=$(DESTDIR)/share/doc/packages/startstop
# Try making them statically. Awfully big.
# LDFLAGS := -static
# Try for backward compatibility. Interesting but no go.
# CFLAGS := -D_GLIBC_2_0_SOURCE
%.gz : %
gzip -c $< >$@
MANPAGES:=monitor.8.gz setuser.8.gz startstop.8.gz
version:=$(shell echo startstop-$$(grep "^Version: " startstop.spec | (read word n; echo $$n)))
.PHONY=tarball clean install
default: monitor setuser logto $(MANPAGES)
tarball: clean
cd ..; rm -f $(version); ln -s startstop $(version); tar --exclude='*/.directory' -czvhf $(version).tar.gz $(version)
clean:
rm -f monitor setuser logto *.gz *~
install:
install -d $(DESTDIR)/bin $(DESTDIR)/share/man/man8
install -d $(DOCDIR)
install monitor setuser logto startstop $(DESTDIR)/bin
install $(MANPAGES) $(DESTDIR)/share/man/man8
install README CHANGES myservice myservice-redhat $(DOCDIR)