summaryrefslogtreecommitdiff
path: root/Makefile
blob: 482c4297dad6b0173fd440bc0f2f535d194411a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
DESTDIR	 =
BINDIR	 = /usr/bin
LIBDIR	 = /usr/lib

VERSION	 = 0.0

all: reboot-if-no-net-connection

%: %.in
	sed " \
		s/#VERSION#/$(VERSION)/; \
	" $< > $@
	[ "$@" = "reboot-if-no-net-connection" ] && chmod +x "$@" || true

.PHONY:	install

install: all
	install -D -m0755 -t $(DESTDIR)$(BINDIR) reboot-if-no-net-connection
	install -D -m0644 -t $(DESTDIR)$(LIBDIR)/systemd/system reboot-if-no-net-connection.service reboot-if-no-net-connection.timer