Blame Makefile.am

Packit 709fb3
# Process this file with automake to create Makefile.in
Packit 709fb3
#
Packit 709fb3
# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc.
Packit 709fb3
#
Packit 709fb3
# This program is free software; you can redistribute it and/or modify
Packit 709fb3
# it under the terms of the GNU General Public License as published by
Packit 709fb3
# the Free Software Foundation; either version 3, or (at your option)
Packit 709fb3
# any later version.
Packit 709fb3
#
Packit 709fb3
# This program is distributed in the hope that it will be useful,
Packit 709fb3
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 709fb3
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 709fb3
# GNU General Public License for more details.
Packit 709fb3
#
Packit 709fb3
# You should have received a copy of the GNU General Public License
Packit 709fb3
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 709fb3
#
Packit 709fb3
AUTOMAKE_OPTIONS = gnu 1.12
Packit 709fb3
Packit 709fb3
SUBDIRS = po lib doc src tests gnulib-tests
Packit 709fb3
Packit 709fb3
EXTRA_DIST =		\
Packit 709fb3
  .mailmap		\
Packit 709fb3
  ChangeLog-2009	\
Packit 709fb3
  dist-check.mk		\
Packit 709fb3
  README		\
Packit 709fb3
  README-alpha		\
Packit 709fb3
  THANKS.in		\
Packit 709fb3
  TODO			\
Packit 709fb3
  cfg.mk		\
Packit 709fb3
  thanks-gen
Packit 709fb3
Packit 709fb3
# Shortcut targets to make it easier to run expensive tests.
Packit 709fb3
.PHONY: check-expensive
Packit 709fb3
check-expensive:
Packit 709fb3
	$(MAKE) check RUN_EXPENSIVE_TESTS=yes
Packit 709fb3
.PHONY: check-very-expensive
Packit 709fb3
check-very-expensive: check-expensive
Packit 709fb3
Packit 709fb3
# Run syntax-check rules before creating a distribution tarball.
Packit 709fb3
.PHONY: run-syntax-check
Packit 709fb3
run-syntax-check: all
Packit 709fb3
	$(AM_V_GEN)test ! -d .git || $(MAKE) syntax-check
Packit 709fb3
Packit 709fb3
# Arrange so that .tarball-version appears only in the distribution
Packit 709fb3
# tarball, and never in a checked-out repository.
Packit 709fb3
dist-hook: gen-ChangeLog run-syntax-check
Packit 709fb3
	$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
Packit 709fb3
Packit 709fb3
gen_start_date = 2009-11-27
Packit 709fb3
.PHONY: gen-ChangeLog
Packit 709fb3
gen-ChangeLog:
Packit 709fb3
	$(AM_V_GEN)if test -d .git; then				\
Packit 709fb3
	  log_fix="$(srcdir)/build-aux/git-log-fix";			\
Packit 709fb3
	  test -e "$$log_fix"						\
Packit 709fb3
	    && amend_git_log="--amend=$$log_fix"			\
Packit 709fb3
	    || amend_git_log=;						\
Packit 709fb3
	  $(top_srcdir)/build-aux/gitlog-to-changelog			\
Packit 709fb3
	    $$amend_git_log --since=$(gen_start_date) > $(distdir)/cl-t && \
Packit 709fb3
	    { rm -f $(distdir)/ChangeLog &&				\
Packit 709fb3
	      mv $(distdir)/cl-t $(distdir)/ChangeLog; }		\
Packit 709fb3
	fi
Packit 709fb3
Packit 709fb3
# Sort in traditional ASCII order, regardless of the current locale;
Packit 709fb3
# otherwise we may get into trouble with distinct strings that the
Packit 709fb3
# current locale considers to be equal.
Packit 709fb3
ASSORT = LC_ALL=C sort
Packit 709fb3
Packit 709fb3
# Extract all lines up to the first one starting with "##".
Packit 709fb3
prologue = perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in
Packit 709fb3
Packit 709fb3
THANKS: THANKS.in Makefile.am .mailmap thanks-gen
Packit 709fb3
	$(AM_V_GEN)rm -f $@-t $@;					\
Packit 709fb3
	{								\
Packit 709fb3
	  $(prologue); echo;						\
Packit 709fb3
	  { perl -ne '/^$$/.../^$$/ and !/^$$/ and s/  +/\0/ and print'	\
Packit 709fb3
	      $(srcdir)/THANKS.in;					\
Packit 709fb3
	    git log --pretty=format:'%aN%x00%aE'			\
Packit 709fb3
	      | $(ASSORT) -u;						\
Packit 709fb3
	  } | $(srcdir)/thanks-gen					\
Packit 709fb3
	    | LC_ALL=en_US.UTF-8 sort -k1,1;				\
Packit 709fb3
	  echo;								\
Packit 709fb3
	  printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:;	\
Packit 709fb3
	} > $@-t && chmod a-w $@-t && mv $@-t $@