summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-12-18 09:35:02 +0100
committerMartin Pitt <martinpitt@gnome.org>2012-12-18 22:20:49 +0100
commitaae598e1e60aad3d30b21c398f55e9b6944be971 (patch)
tree514e65c6b23add2b534e64008c5e08e5e78a56c9 /Makefile.am
parent1114a687d8e1596aa67f986cfdb4891d19a8da1a (diff)
downloadgobject-introspection-aae598e1e60aad3d30b21c398f55e9b6944be971.tar.gz
Automatically install pre-commit hook
Instead of telling the user to do so and failing, we can just install the hook ourselves. This saves the user some trouble and more importantly avoids breaking tests in jhbuild continuous integration setups. https://bugzilla.gnome.org/show_bug.cgi?id=686388
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am5
1 files changed, 1 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index c4f67031..70164581 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,10 +58,7 @@ EXTRA_DIST += \
check-local:
gtester --verbose $(GTESTER_PROGS)
- @test ! -d $(top_srcdir)/.git || (test -f $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: missing \
- pre-commit hook.\n\ncopy misc/pre-commit to .git/hooks"; false))
- @test ! -d $(top_srcdir)/.git || (test -x $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: pre-commit \
- is not executable\n\nrun chmod +x .git/hooks/pre-commit"; false))
+ @test ! -d $(top_srcdir)/.git || (test -f $(top_srcdir)/.git/hooks/pre-commit || install misc/pre-commit .git/hooks/pre-commit)
@echo "TEST: PEP-8 INQUISITION"
@find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat --exclude=config.py
@echo "TEST: Annotation pattern programs"