Makefile: add PHONY targets
authorBrian Norris <banorris@uci.edu>
Thu, 13 Sep 2012 23:03:23 +0000 (16:03 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 13 Sep 2012 23:03:23 +0000 (16:03 -0700)
Just in case there ever are files named clean, mrclean, etc.

Makefile

index a0608b5dadd49e2376db260c165fd3b9cce71678..53b0331f2a250f7a18af120f87929b4cee605fdd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -44,15 +44,21 @@ malloc.o: malloc.c
 %.o: %.cc
        $(CXX) -fPIC -c $< $(CPPFLAGS)
 
+PHONY += clean
 clean:
        rm -f *.o *.so
        $(MAKE) -C $(TESTS_DIR) clean
 
+PHONY += mrclean
 mrclean: clean
        rm -rf docs
 
-tags::
+PHONY += tags
+tags:
        ctags -R
 
-tests:: $(LIB_SO)
+PHONY += tests
+tests: $(LIB_SO)
        $(MAKE) -C $(TESTS_DIR)
+
+.PHONY: $(PHONY)