From: Sandro Santilli Date: Thu, 14 Sep 2017 15:57:04 +0000 (+0000) Subject: Add check-no-trailing-blanks Makefile rule and run on `make check` X-Git-Tag: 2.4.0rc2~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44ba7e96fe87c601c35cda04a0b8aa7be5f206d1;p=postgis Add check-no-trailing-blanks Makefile rule and run on `make check` Only checks .h and .c files, and skip those in .gitignore git-svn-id: http://svn.osgeo.org/postgis/trunk@15732 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/GNUmakefile.in b/GNUmakefile.in index 1029b219b..010b0aad0 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,6 +1,6 @@ #----------------------------------------------------- # -# Configuration directives are in postgis_config.h +# Configuration directives are in postgis_config.h # #----------------------------------------------------- @@ -35,7 +35,12 @@ clean-local: # TODO: drop 'test' target.. test: check -check: all docs-check +check: all docs-check check-no-trailing-blanks + +check-no-trailing-blanks: + ! find . -name '*.cpp' -o -name '*.h' | \ + grep -vf .gitignore | \ + xargs grep -Pn '[\t ]$$' installcheck: RUNTESTFLAGS="$(RUNTESTFLAGS) --extension" $(MAKE) check @@ -45,7 +50,7 @@ distclean: distclean-local distclean-local: clean-local rm -Rf autom4te.cache rm -f GNUmakefile - rm -f config.log config.cache config.status + rm -f config.log config.cache config.status rm -f postgis_config.h maintainer-clean-local: distclean-local @@ -53,7 +58,7 @@ maintainer-clean-local: distclean-local rm -f config.guess config.rpath config.sub rm -f libtool install-sh ltmain.sh -maintainer-clean: +maintainer-clean: @echo '------------------------------------------------------' @echo 'This command is intended for maintainers to use; it' @echo 'deletes files that may need special tools to rebuild.' @@ -85,7 +90,7 @@ templategis-install: templategis-uninstall: $(MAKE) -C extras/template_gis uninstall -docs: +docs: $(MAKE) -C doc html docs-clean: @@ -96,7 +101,7 @@ docs-check: comments: $(MAKE) -C doc comments - + cheatsheets: $(MAKE) -C doc cheatsheets @@ -132,7 +137,7 @@ raster-sql: astyle: ./astyle.sh - + commit: $(MAKE) astyle && $(MAKE) clean && $(MAKE) check && svn commit @@ -142,7 +147,7 @@ authors.git: authors.svn svnrebase: authors.git git svn rebase --authors-file authors.git -postgis_svn_revision.h: +postgis_svn_revision.h: $(PERL) utils/svn_repo_revision.pl .PHONY: utils liblwgeom ChangeLog raster postgis_svn_revision.h