diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2020-12-05 15:29:49 +0100 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-06-19 15:44:21 +0200 |
commit | 023b4d96744145800069ba3342c0b9d7e809304f (patch) | |
tree | 44994d242154e8839ab76df92bfc895a2e22852c /Makefile.am | |
parent | 671a159b2487efa67019b323ea7ac42793326e7e (diff) |
Check that the code is indented on distcheck.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 6e77a42..d16d029 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,12 +3,14 @@ noinst_LTLIBRARIES = noinst_PROGRAMS = EXTRA_DIST = BUILT_SOURCES = -DISTCHECK_CONFIGURE_FLAGS = CONFIG_SHELL=$(CONFIG_SHELL) SHELL=$(SHELL) +DISTCHECK_CONFIGURE_FLAGS = CONFIG_SHELL=$(CONFIG_SHELL) SHELL=$(SHELL) \ + --enable-indent-check=yes SUFFIXES = SUBDIRS = . po man ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I. -I$(srcdir) AM_CFLAGS = $(GUILE_CFLAGS) $(NETTLE_CFLAGS) +INDENTED = include src/Makefile.am include doc/Makefile.am @@ -20,3 +22,19 @@ $(top_srcdir)/.version: @mv $@-t $@ dist-hook: echo $(VERSION) > $(distdir)/.tarball-version + +.PHONY: check-indented + +check-indented: $(INDENTED) + for source in $(INDENTED) ; do \ + echo "Checking that $$source is indented..." ; \ + (mkdir -p $$(dirname $$source-indented) \ + && $(INDENT) $(srcdir)/$$source -o $$source-indented \ + && cmp $(srcdir)/$$source $$source-indented \ + && rm -f $$source-indented) \ + || exit 1 ; \ + done + +if INDENT_CHECK_ENABLED +check-local: check-indented +endif |