Commit 86d0cbee authored by Troy Engel's avatar Troy Engel

building all targets

parent f986a1e9
......@@ -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)" $< [email protected]
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"
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/[email protected] \
"$(DESTDIR)$(LIBPREFIX)/systemd/system"
uninstall:
$(RM) "$(DESTDIR)$(PREFIX)/bin/petrified" \
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/[email protected]"
clean:
$(RM) $(MANPAGES)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment