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 =
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

View File

@ -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