diff --git a/Makefile b/Makefile index f98f34c3b..1f6da2563 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,19 @@ native-dist: etags: etags FL/*.H FL/*.h src/*.cxx src/*.c src/*.h src/xutf8/*.h src/xutf8/*.c cairo/*.cxx fluid/*.h fluid/*.cxx test/*.h test/*.cxx +# +# Run the clang.llvm.org static code analysis tool on the C sources. +# (at least checker-231 is required for scan-build to work this way) +# + +.PHONY: clang clang-changes +clang: + $(RM) -r clang + scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) clean all +clang-changes: + scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) all + + # # End of "$Id$". #