Imported Upstream version 2.19
[platform/upstream/grep.git] / Makefile.am
1 # Process this file with automake to create Makefile.in
2 #
3 # Copyright 1997-1998, 2005-2014 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
8 # any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 #
18 AUTOMAKE_OPTIONS = gnu 1.12
19
20 SUBDIRS = po lib doc src tests gnulib-tests
21
22 EXTRA_DIST =            \
23   ChangeLog-2009        \
24   README                \
25   README-alpha          \
26   TODO                  \
27   cfg.mk
28
29 # Shortcut target to make it easier to run expensive tests.
30 .PHONY: check-expensive
31 check-expensive:
32         $(MAKE) check RUN_EXPENSIVE_TESTS=yes
33
34 # Run syntax-check rules before creating a distribution tarball.
35 .PHONY: run-syntax-check
36 run-syntax-check:
37         $(AM_V_GEN)test ! -d .git || $(MAKE) syntax-check
38
39 # Arrange so that .tarball-version appears only in the distribution
40 # tarball, and never in a checked-out repository.
41 dist-hook: gen-ChangeLog run-syntax-check
42         $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
43
44 gen_start_date = 2009-11-27
45 .PHONY: gen-ChangeLog
46 gen-ChangeLog:
47         $(AM_V_GEN)if test -d .git; then                                \
48           log_fix="$(srcdir)/build-aux/git-log-fix";                    \
49           test -e "$$log_fix"                                           \
50             && amend_git_log="--amend=$$log_fix"                        \
51             || amend_git_log=;                                          \
52           $(top_srcdir)/build-aux/gitlog-to-changelog                   \
53             $$amend_git_log --since=$(gen_start_date) > $(distdir)/cl-t && \
54             { rm -f $(distdir)/ChangeLog &&                             \
55               mv $(distdir)/cl-t $(distdir)/ChangeLog; }                \
56         fi