chiark / gitweb /
build-sys: add a phony target for cppcheck
authorElia Pinto <devzero2000@rpm5.org>
Wed, 22 Jan 2014 11:28:43 +0000 (03:28 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 26 Jan 2014 16:44:09 +0000 (11:44 -0500)
The cppcheck target was introduced by commit 16f4efb4150c65e3c61adaa8ea512489de49f532
"build-sys: add cppcheck target". But it is preferable to use a make phony target
for it, as this patch does.

There are two general reasons to use a phony target: to avoid a
conflict with a file of the same name, and to improve performance. In
this case the first reason is obvious, and the second is that make
skips the implicit rule search for phony targets, since it knows that
phony targets do not name actual files that could be remade from other
files (as described in the "Gnu Make" Manual).

Makefile.am

index 37073d23a38a97d1e3a1b14a3301f19e24834e1d..0b891a771a0d84cddf767a15cd843e1003adef14 100644 (file)
@@ -5008,6 +5008,7 @@ tests += \
        test-libsystemd-id128-sym
 endif
 
        test-libsystemd-id128-sym
 endif
 
+.PHONY: cppcheck
 cppcheck:
        cppcheck --enable=all -q $(top_srcdir)
 
 cppcheck:
        cppcheck --enable=all -q $(top_srcdir)