Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
93edc4ceb7 | |||
51c7ec2471 | |||
a57c6bd7fb | |||
b7fa48d5d8 |
31
Makefile
Normal file
31
Makefile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# watchman makefile
|
||||||
|
VERSION=1.6.9
|
||||||
|
|
||||||
|
# Please modify config.mk and not this
|
||||||
|
sinclude config.mk
|
||||||
|
|
||||||
|
.PHONY: clean install uninstall all
|
||||||
|
|
||||||
|
build: rc
|
||||||
|
|
||||||
|
all: build
|
||||||
|
|
||||||
|
rc: rc.in
|
||||||
|
sed -r \
|
||||||
|
-e 's%@ETC@%$(ETC)%' \
|
||||||
|
rc.in > rc
|
||||||
|
|
||||||
|
chmod 750 $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm rc
|
||||||
|
|
||||||
|
install: build
|
||||||
|
install -dm755 $(BINDIR)
|
||||||
|
install -dm755 $(ETCDIR)
|
||||||
|
|
||||||
|
install -m750 rc $(BINDIR)/rc
|
||||||
|
install -m644 rc.conf $(ETCDIR)/rc.conf
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm $(BINDIR)/rc
|
8
config.mk
Normal file
8
config.mk
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Make config
|
||||||
|
|
||||||
|
USR ?= /usr/local
|
||||||
|
ETC ?= /etc
|
||||||
|
BIN ?= $(USR)/bin
|
||||||
|
|
||||||
|
BINDIR = $(DESTDIR)$(PREFIX)$(BIN)
|
||||||
|
ETCDIR = $(DESTDIR)$(PREFIX)$(ETC)
|
@@ -144,7 +144,7 @@ rc.modules() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rc.main() {
|
rc.main() {
|
||||||
source "/etc/rc.conf"
|
source "@ETC@/rc.conf"
|
||||||
|
|
||||||
action="${1:-boot}"
|
action="${1:-boot}"
|
||||||
|
|
||||||
@@ -156,7 +156,6 @@ rc.main() {
|
|||||||
|
|
||||||
poweroff|reboot|shutdown)
|
poweroff|reboot|shutdown)
|
||||||
rc.shutdown
|
rc.shutdown
|
||||||
rc.halt
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
Reference in New Issue
Block a user