From b5a48ea13505a926a26e6587d8774c3f6b720332 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Thu, 26 Oct 2017 17:21:33 +0200 Subject: [PATCH] Sync phony targets with .PHONY and organise in sections --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 316e9d6..e37a978 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ OBJ := ${SRC:.c=.o} TEST_SRC := $(sort $(shell find test/ -name '*.c')) TEST_OBJ := $(TEST_SRC:.c=.o) +.PHONY: all debug all: doc dunst service debug: CFLAGS += ${CFLAGS_DEBUG} @@ -43,20 +44,24 @@ dunst: ${OBJ} main.o dunstify: dunstify.o ${CC} ${CFLAGS} -o $@ dunstify.o ${LDFLAGS} +.PHONY: test test: test/test cd test && ./test test/test: ${OBJ} ${TEST_OBJ} ${CC} ${CFLAGS} -o $@ ${TEST_OBJ} ${OBJ} ${LDFLAGS} +.PHONY: doc doc: docs/dunst.1 docs/dunst.1: docs/dunst.pod pod2man --name=dunst -c "Dunst Reference" --section=1 --release=${VERSION} $< > $@ +.PHONY: service service: @sed "s|##PREFIX##|$(PREFIX)|" org.knopwob.dunst.service.in > org.knopwob.dunst.service @sed "s|##PREFIX##|$(PREFIX)|" dunst.systemd.service.in > dunst.systemd.service +.PHONY: clean clean-dunst clean-dunstify clean-doc clean-tests clean: clean-dunst clean-dunstify clean-doc clean-tests clean-dunst: @@ -74,6 +79,7 @@ clean-doc: clean-tests: rm -f test/test test/*.o +.PHONY: install install-dunst install-doc install-service uninstall install: install-dunst install-doc install-service install-dunst: dunst doc @@ -97,5 +103,3 @@ uninstall: rm -f ${DESTDIR}${PREFIX}/share/dbus-1/services/org.knopwob.dunst.service rm -f ${DESTDIR}${PREFIX}/lib/systemd/user/dunst.service rm -rf ${DESTDIR}${PREFIX}/share/dunst - -.PHONY: all clean dist install uninstall