building all targets
This commit is contained in:
parent
f986a1e959
commit
86d0cbee54
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)
|
VERSION := $(shell grep '^\#\# Version:' petrified | cut -d' ' -f3)
|
||||||
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
BINPREFIX ?= $(PREFIX)/bin
|
||||||
|
LIBPREFIX ?= $(PREFIX)/lib
|
||||||
MANPREFIX ?= $(PREFIX)/share/man
|
MANPREFIX ?= $(PREFIX)/share/man
|
||||||
|
DOCPREFIX ?= $(PREFIX)/share/doc
|
||||||
ETCPREFIX ?= /etc
|
ETCPREFIX ?= /etc
|
||||||
|
VARPREFIX ?= /var
|
||||||
|
DESTDIR ?=
|
||||||
|
|
||||||
MANPAGES = \
|
MANPAGES = \
|
||||||
petrified.1
|
petrified.1
|
||||||
|
|
@ -16,15 +21,47 @@ petrified.1: README.pod
|
||||||
pod2man -s 1 -c "Petrified Manual" -n "PETRIFIED" \
|
pod2man -s 1 -c "Petrified Manual" -n "PETRIFIED" \
|
||||||
-r "petrified $(VERSION)" $< $@
|
-r "petrified $(VERSION)" $< $@
|
||||||
|
|
||||||
install: all
|
install: all install-main install-doc
|
||||||
install -Dm0755 petrified "$(DESTDIR)$(PREFIX)/bin/petrified"
|
uninstall: uninstall-main uninstall-doc
|
||||||
|
|
||||||
|
install-main:
|
||||||
|
install -Dm0755 petrified "$(DESTDIR)$(BINPREFIX)/petrified"
|
||||||
install -Dm0644 petrified.1 "$(DESTDIR)$(MANPREFIX)/man1/petrified.1"
|
install -Dm0644 petrified.1 "$(DESTDIR)$(MANPREFIX)/man1/petrified.1"
|
||||||
install -Dm0600 petrified.conf "$(DESTDIR)$(ETCPREFIX)/petrified.conf"
|
install -Dm0600 petrified.conf "$(DESTDIR)$(ETCPREFIX)/petrified.conf"
|
||||||
|
install -dm0755 "$(DESTDIR)$(VARPREFIX)/cache/petrified"
|
||||||
|
|
||||||
uninstall:
|
install-doc:
|
||||||
$(RM) "$(DESTDIR)$(PREFIX)/bin/petrified" \
|
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)$(MANPREFIX)/man1/petrified.1" \
|
||||||
"$(DESTDIR)$(ETCPREFIX)/petrified.conf"
|
"$(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:
|
clean:
|
||||||
$(RM) $(MANPAGES)
|
$(RM) $(MANPAGES)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue