From 068d656c6db63a27967d3d2b13a0a801662ff174 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 20 Apr 2011 22:44:38 +0200 Subject: [PATCH] Makefile: run checksrc if debug enabled And make the build fail if a warning or error was detected --- lib/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 7c24e54..15dbcd2 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 + -- 2.7.4