building all targets
This commit is contained in:
parent
320491c2cc
commit
1ae12873c9
1 changed files with 41 additions and 4 deletions
45
Makefile
45
Makefile
|
|
@ -3,8 +3,13 @@
|
|||
VERSION := $(shell grep '^\#\# Version:' petrified | cut -d' ' -f3)
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
BINPREFIX ?= $(PREFIX)/bin
|
||||
LIBPREFIX ?= $(PREFIX)/lib
|
||||
MANPREFIX ?= $(PREFIX)/share/man
|
||||
DOCPREFIX ?= $(PREFIX)/share/doc
|
||||
ETCPREFIX ?= /etc
|
||||
VARPREFIX ?= /var
|
||||
DESTDIR ?=
|
||||
|
||||
MANPAGES = \
|
||||
petrified.1
|
||||
|
|
@ -16,15 +21,47 @@ petrified.1: README.pod
|
|||
pod2man -s 1 -c "Petrified Manual" -n "PETRIFIED" \
|
||||
-r "petrified $(VERSION)" $< $@
|
||||
|
||||
install: all
|
||||
install -Dm0755 petrified "$(DESTDIR)$(PREFIX)/bin/petrified"
|
||||
install: all install-main install-doc
|
||||
uninstall: uninstall-main uninstall-doc
|
||||
|
||||
install-main:
|
||||
install -Dm0755 petrified "$(DESTDIR)$(BINPREFIX)/petrified"
|
||||
install -Dm0644 petrified.1 "$(DESTDIR)$(MANPREFIX)/man1/petrified.1"
|
||||
install -Dm0600 petrified.conf "$(DESTDIR)$(ETCPREFIX)/petrified.conf"
|
||||
install -dm0755 "$(DESTDIR)$(VARPREFIX)/cache/petrified"
|
||||
|
||||
uninstall:
|
||||
$(RM) "$(DESTDIR)$(PREFIX)/bin/petrified" \
|
||||
install-doc:
|
||||
install -dm0755 "$(DESTDIR)$(DOCPREFIX)/petrified/extra"
|
||||
install -Dm0644 README.pod LICENSE "$(DESTDIR)$(DOCPREFIX)/petrified"
|
||||
install -Dm0644 extra/petrified.crontab extra/petrified.dispatch \
|
||||
extra/petrified.logrotate "$(DESTDIR)$(DOCPREFIX)/petrified/extra"
|
||||
|
||||
install-systemd:
|
||||
install -dm0755 "$(DESTDIR)$(LIBPREFIX)/systemd/system"
|
||||
install -Dm0644 systemd/petrified.target \
|
||||
systemd/petrified.timer \
|
||||
systemd/petrified@.service \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system"
|
||||
|
||||
uninstall-main:
|
||||
$(RM) "$(DESTDIR)$(BINPREFIX)/petrified" \
|
||||
"$(DESTDIR)$(MANPREFIX)/man1/petrified.1" \
|
||||
"$(DESTDIR)$(ETCPREFIX)/petrified.conf"
|
||||
rmdir "$(DESTDIR)$(VARPREFIX)/cache/petrified"
|
||||
|
||||
uninstall-doc:
|
||||
$(RM) "$(DESTDIR)$(DOCPREFIX)/petrified/README.pod" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified/LICENSE" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified/extra/petrified.crontab" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified/extra/petrified.dispatch" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified/extra/petrified.logrotate"
|
||||
rmdir "$(DESTDIR)$(DOCPREFIX)/petrified/extra" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified" \
|
||||
|
||||
uninstall-systemd:
|
||||
$(RM) "$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.target" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.timer" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified@.service"
|
||||
|
||||
clean:
|
||||
$(RM) $(MANPAGES)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue