]> granicus.if.org Git - curl/commitdiff
Makefile: run checksrc if debug enabled
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Apr 2011 20:44:38 +0000 (22:44 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 27 Apr 2011 07:09:35 +0000 (09:09 +0200)
And make the build fail if a warning or error was detected

lib/Makefile.am

index 7c24e5461e7fac7007bf31045ba306b86877b233..15dbcd290e9873cda51d1aa676f7ff578d665450 100644 (file)
@@ -185,5 +185,9 @@ $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
        done; \
        cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
 
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
 all-local:
-       @for i in $(CSOURCES) $(HHEADERS); do $(top_srcdir)/lib/checksrc.pl $(top_srcdir)/lib/$$i; done
+       @for i in $(CSOURCES) $(HHEADERS); do @PERL@ $(top_srcdir)/lib/checksrc.pl $(top_srcdir)/lib/$$i; if test $$? != "0"; then exit 1; fi; done
+endif
+