1## Makefile.am - template for generating Makefile via Automake 2## 3## Copyright (C) 2000-2001, 2003-2014, 2016-2017, 2020-2021 Free 4## Software Foundation, Inc. 5## 6## This file is part of GNU M4. 7## 8## GNU M4 is free software: you can redistribute it and/or modify 9## it under the terms of the GNU General Public License as published by 10## the Free Software Foundation, either version 3 of the License, or 11## (at your option) any later version. 12## 13## GNU M4 is distributed in the hope that it will be useful, 14## but WITHOUT ANY WARRANTY; without even the implied warranty of 15## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16## GNU General Public License for more details. 17## 18## You should have received a copy of the GNU General Public License 19## along with this program. If not, see <https://www.gnu.org/licenses/>. 20## 21## Written by Gary V. Vaughan <gary@gnu.org> 22 23SUBDIRS = . examples lib src doc checks po tests 24 25EXTRA_DIST = bootstrap c-boxes.el cfg.mk maint.mk \ 26 .prev-version .version m4/gnulib-cache.m4 ChangeLog-2014 27DISTCLEANFILES = stamp-h 28## maintainer-clean should remove as much as possible that ./bootstrap can 29## recreate. In the m4 directory, keep only gnulib-cache.m4. 30MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 \ 31 config-h.in configure depcomp doc/fdl.texi gendocs.sh install-sh \ 32 lib/[a-z]* m4/[a-fh-z]* m4/g[a-mo-z]* m4/gnulib-comp.m4 \ 33 m4/gnulib-tool.m4 missing stamp-h.in 34 35ACLOCAL_AMFLAGS = -I m4 36## Enough users install GNU M4 as gm4 that we make sure 'make installcheck' 37## will handle that, prior to making a release. 38DISTCHECK_CONFIGURE_FLAGS = --enable-changeword --program-prefix=g \ 39 --enable-gcc-warnings --enable-silent-rules --enable-cxx 40 41# Generate the ChangeLog from git history. 42gen_start_date = 2015-01-01 43.PHONY: gen-ChangeLog 44gen-ChangeLog: 45 $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \ 46 log_fix="$(srcdir)/build-aux/git-log-fix"; \ 47 test -e "$$log_fix" \ 48 && amend_git_log="--amend=$$log_fix" \ 49 || amend_git_log=; \ 50 $(top_srcdir)/build-aux/gitlog-to-changelog $$amend_git_log \ 51 --since='$(gen_start_date)' > $(distdir)/cl-t \ 52 && rm -f $(distdir)/ChangeLog \ 53 && mv $(distdir)/cl-t $(distdir)/ChangeLog; \ 54 fi 55 56# Dummy rule, to pacify automake "gnu" strictness and allow a clean 57# bootstrap. Creates a dummy ChangeLog (unless one is already present, 58# as might be the case for users of vc-dwim) that will be overridden 59# with a proper one at distribution time. 60$(srcdir)/ChangeLog: 61 @echo dummy > $@ 62 63BUILT_SOURCES = $(top_srcdir)/.version 64$(top_srcdir)/.version: 65 echo $(VERSION) > $@-t && mv $@-t $@ 66 67# Arrange so that .tarball-version appears only in the distribution 68# tarball, and never in a checked-out repository. 69dist-hook: gen-ChangeLog 70 $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version 71