7ed3778adff54e92a5659b6751cd50f591bddc78
[platform/upstream/diffutils.git] / cfg.mk
1 # Customize maint.mk                           -*- makefile -*-
2 # Copyright (C) 2003-2011 Free Software Foundation, Inc.
3
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 # Used in maint.mk's web-manual rule
18 manual_title = Comparing and Merging Files
19
20 # Tests not to run as part of "make distcheck".
21 local-checks-to-skip =          \
22   sc_error_message_period       \
23   sc_error_message_uppercase    \
24   sc_texinfo_acronym
25
26 # Tools used to bootstrap this package, used for "announcement".
27 bootstrap-tools = autoconf,automake,gnulib
28
29 # Now that we have better tests, make this the default.
30 export VERBOSE = yes
31
32 old_NEWS_hash = e043ee82ed8f0fdd75d0ba808730e689
33
34 # Tell maint.mk's syntax-check rules that diff gets config.h directly or
35 # via diff.h or system.h.
36 config_h_header = (<config\.h>|"(diff|system)\.h")
37
38 update-copyright-env = \
39   UPDATE_COPYRIGHT_USE_INTERVALS=1 \
40   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
41
42 -include $(srcdir)/dist-check.mk
43
44 _cf_state_dir ?= .config-state
45 _date_time := $(shell date +%F.%T)
46 config-compare:
47         diff -u                                 \
48           -I'define VERSION '                   \
49           -I'define PACKAGE_VERSION '           \
50           -I'define PACKAGE_STRING '            \
51           $(_cf_state_dir)/latest lib/config.h
52         diff -u                                 \
53           -I'$(PACKAGE_NAME)'                   \
54           -I'[SD]\["VERSION"\]'                 \
55           -I'[SD]\["PACKAGE_VERSION"\]'         \
56           -I'D\["PACKAGE_STRING"\]'             \
57           $(_cf_state_dir)/latest config.status
58
59 config-save:
60         $(MAKE) --quiet config-compare > /dev/null 2>&1 \
61           && { echo no change; exit 1; } || :
62         mkdir -p $(_cf_state_dir)/$(_date_time)
63         ln -nsf $(_date_time) $(_cf_state_dir)/latest
64         cp lib/config.h config.status $(_cf_state_dir)/latest
65
66 exclude_file_name_regexp--sc_space_tab = ^gl/lib/.*\.c\.diff$$
67
68 # Tell gnulib's tight_scope rule that we mark externs with XTERN
69 export _gl_TS_extern = extern|XTERN