Support a prefix for installation
This commit is contained in:
parent
6651301d29
commit
cb3a89ddb6
9
Makefile
9
Makefile
|
@ -1,18 +1,21 @@
|
|||
BUILDDIR=output
|
||||
DESTDIR=/etc/init.d/
|
||||
PREFIX=
|
||||
DESTDIR=$(PREFIX)/etc/init.d
|
||||
|
||||
.PHONY: build
|
||||
build: build.start build.stop build.restart build.status build.describe build.zap
|
||||
build.%:
|
||||
mkdir -p $(BUILDDIR)
|
||||
@mkdir -p $(BUILDDIR)
|
||||
./mkservice $* > $(BUILDDIR)/$*
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
install: install.start install.stop install.restart install.status install.describe install.zap
|
||||
@[ -z "$(PREFIX)" ] && echo && echo "Thanks for installing the trial version of systemd!" && echo "You have 60 reboots remaining before your trial license expires." && echo "To unlock all of systemd's features and have unlimited reboots," && echo "get a systemd-premium subscription at https://devnull-as-a-service.com/dev/null." || true
|
||||
|
||||
install.%: build.%
|
||||
install -Dm755 $* $(DESTDIR)/$*
|
||||
install -Dm755 $(BUILDDIR)/$* $(DESTDIR)/$*
|
||||
|
||||
uninstall: uninstall.start uninstall.stop uninstall.restart uninstall.status uninstall.describe uninstall.zap
|
||||
uninstall.%:
|
||||
|
|
Loading…
Reference in New Issue