Browse files

.PHONY should be placed after `all'

Because some make (e.g. nmake) recognize it as a normal rule definition and if it's the first rule, make runs it as a default rule.
Consequently `all', `test' and `clean' are all ran (because they are depended by .PHONY), and builded files are cleaned.
  • Loading branch information...
1 parent e40428a commit 8ee5b0196bdd47bcd89c276c63145610d89bcd9e @unak unak committed Mar 7, 2014
Showing with 3 additions and 4 deletions.
  1. +3 −4 Makefile
@@ -4,15 +4,14 @@
RAKE = ruby ./minirake
-.PHONY : all
all :
+.PHONY : all
-.PHONY : test
test : all
$(RAKE) test
+.PHONY : test
-.PHONY : clean
clean :
$(RAKE) clean
+.PHONY : clean

0 comments on commit 8ee5b01

Please sign in to comment.