diff options
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 |