Added a test for phony script targets

This commit is contained in:
Pierre Pronchery 2014-12-13 02:40:59 +01:00
parent 5308765aa2
commit 58acf2ed3a
2 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,4 @@
TARGETS = $(OBJDIR)test TARGETS = $(OBJDIR)test phony
OBJDIR = OBJDIR =
PREFIX = /usr/local PREFIX = /usr/local
DESTDIR = DESTDIR =
@ -13,9 +13,13 @@ all: $(TARGETS)
$(OBJDIR)test: $(OBJDIR)test:
./script.sh -P "/somewhere/else" -- "$(OBJDIR)test" ./script.sh -P "/somewhere/else" -- "$(OBJDIR)test"
phony:
./script.sh -P "$(PREFIX)" -- "phony"
clean: clean:
$(RM) -- $(test_OBJS) $(RM) -- $(test_OBJS) $(phony_OBJS)
./script.sh -c -P "/somewhere/else" -- "test" ./script.sh -c -P "/somewhere/else" -- "test"
./script.sh -c -P "$(PREFIX)" -- "phony"
distclean: clean distclean: clean
$(RM) -- $(TARGETS) $(RM) -- $(TARGETS)
@ -26,4 +30,4 @@ install: $(TARGETS)
uninstall: uninstall:
./script.sh -P "$(DESTDIR)/somewhere/else/again" -u -- "test" ./script.sh -P "$(DESTDIR)/somewhere/else/again" -u -- "test"
.PHONY: all clean distclean install uninstall .PHONY: all clean distclean install uninstall phony

View File

@ -1,4 +1,4 @@
targets=test targets=test,phony
dist=Makefile dist=Makefile
[test] [test]
@ -6,3 +6,8 @@ type=script
script=./script.sh script=./script.sh
prefix=/somewhere/else prefix=/somewhere/else
install=/somewhere/else/again install=/somewhere/else/again
[phony]
type=script
script=./script.sh
phony=1