From 58acf2ed3af9ee57bfd467f447c3a600bc0f4196 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 13 Dec 2014 02:40:59 +0100 Subject: [PATCH] Added a test for phony script targets --- tests/script/Makefile.NetBSD | 10 +++++++--- tests/script/project.conf | 7 ++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/script/Makefile.NetBSD b/tests/script/Makefile.NetBSD index 4f510fa..987c850 100644 --- a/tests/script/Makefile.NetBSD +++ b/tests/script/Makefile.NetBSD @@ -1,4 +1,4 @@ -TARGETS = $(OBJDIR)test +TARGETS = $(OBJDIR)test phony OBJDIR = PREFIX = /usr/local DESTDIR = @@ -13,9 +13,13 @@ all: $(TARGETS) $(OBJDIR)test: ./script.sh -P "/somewhere/else" -- "$(OBJDIR)test" +phony: + ./script.sh -P "$(PREFIX)" -- "phony" + clean: - $(RM) -- $(test_OBJS) + $(RM) -- $(test_OBJS) $(phony_OBJS) ./script.sh -c -P "/somewhere/else" -- "test" + ./script.sh -c -P "$(PREFIX)" -- "phony" distclean: clean $(RM) -- $(TARGETS) @@ -26,4 +30,4 @@ install: $(TARGETS) uninstall: ./script.sh -P "$(DESTDIR)/somewhere/else/again" -u -- "test" -.PHONY: all clean distclean install uninstall +.PHONY: all clean distclean install uninstall phony diff --git a/tests/script/project.conf b/tests/script/project.conf index 2c3effa..391657a 100644 --- a/tests/script/project.conf +++ b/tests/script/project.conf @@ -1,4 +1,4 @@ -targets=test +targets=test,phony dist=Makefile [test] @@ -6,3 +6,8 @@ type=script script=./script.sh prefix=/somewhere/else install=/somewhere/else/again + +[phony] +type=script +script=./script.sh +phony=1