[postgis-tickets] r15732 - Add check-no-trailing-blanks Makefile rule and run on `make check`
Sandro Santilli
strk at kbt.io
Thu Sep 14 08:57:05 PDT 2017
Author: strk
Date: 2017-09-14 08:57:04 -0700 (Thu, 14 Sep 2017)
New Revision: 15732
Modified:
trunk/GNUmakefile.in
Log:
Add check-no-trailing-blanks Makefile rule and run on `make check`
Only checks .h and .c files, and skip those in .gitignore
Modified: trunk/GNUmakefile.in
===================================================================
--- trunk/GNUmakefile.in 2017-09-14 15:56:58 UTC (rev 15731)
+++ trunk/GNUmakefile.in 2017-09-14 15:57:04 UTC (rev 15732)
@@ -1,6 +1,6 @@
#-----------------------------------------------------
#
-# Configuration directives are in postgis_config.h
+# Configuration directives are in postgis_config.h
#
#-----------------------------------------------------
@@ -35,8 +35,13 @@
# 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-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 @@
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-uninstall:
$(MAKE) -C extras/template_gis uninstall
-docs:
+docs:
$(MAKE) -C doc html
docs-clean:
@@ -96,7 +101,7 @@
comments:
$(MAKE) -C doc comments
-
+
cheatsheets:
$(MAKE) -C doc cheatsheets
@@ -132,7 +137,7 @@
astyle:
./astyle.sh
-
+
commit:
$(MAKE) astyle && $(MAKE) clean && $(MAKE) check && svn commit
@@ -142,7 +147,7 @@
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
More information about the postgis-tickets
mailing list