Commit 45de0579 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

make: add 'checksrc' as target to check code style

The make target checksrc now works in the root makefile and in both the
src and lib directories.

It is also run automatically on "all" if configure --enable-debug was
used.
parent aa87f0ab
Loading
Loading
Loading
Loading
+4 −0
Changes for Makefile.am: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -155,3 +155,7 @@ ca-bundle: lib/mk-ca-bundle.pl
ca-firefox: lib/firefox-db2pem.sh
	@echo "generate a fresh ca-bundle.crt"
	./lib/firefox-db2pem.sh lib/ca-bundle.crt

checksrc:
	cd lib && $(MAKE) checksrc
	cd src && $(MAKE) checksrc
+5 −3
Changes for lib/Makefile.am: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -185,9 +185,11 @@ $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
	done; \
	cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )


checksrc:
	@@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)

if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
all-local:
	@@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
all-local: checksrc
endif
+5 −3
Changes for src/Makefile.am: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -96,10 +96,12 @@ $(HUGE):
	echo "void hugehelp(void) {}" >>$(HUGE)
endif

if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
# ignore hugehelp.c since it is generated source code and it plays by slightly
# different rules!
all-local:
checksrc:
	@@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/src -Whugehelp.c $(curl_SOURCES)

if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
all-local: checksrc
endif