AC_HEADER_MAJOR: port to glibc 2.25
[autoconf/ericb.git] / cfg.mk
blob626674f9f57f7f27de8787c7c2b9c154120c5469
1 # Customize maint.mk for Autoconf. -*- Makefile -*-
2 # Copyright (C) 2003-2004, 2006, 2008-2016 Free Software Foundation,
3 # Inc.
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 of the License, or
8 # (at your option) any later version.
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.
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/>.
18 # This file is '-include'd into GNUmakefile.
20 # Build with our own versions of these tools, when possible.
21 export PATH = $(shell echo "`pwd`/tests:$$PATH")
23 # Remove the autoreconf-provided INSTALL, so that we regenerate it.
24 _autoreconf = autoreconf -i -v && rm -f INSTALL
26 # Used in maint.mk's web-manual rule
27 manual_title = Creating Automatic Configuration Scripts
29 # The local directory containing the checked-out copy of gnulib used
30 # in this release (override the default). The $GNULIB_SRCDIR variable
31 # is also honored by the gnulib-provided bootstrap script, so using it
32 # here is consistent.
33 gnulib_dir = $${GNULIB_SRCDIR-'$(abs_srcdir)'/../gnulib}
35 # The bootstrap tools (override the default).
36 bootstrap-tools = automake
38 # Set preferred lists for announcements.
40 announcement_Cc_ = $(PACKAGE_BUGREPORT), autotools-announce@gnu.org
41 announcement_mail-alpha = autoconf@gnu.org
42 announcement_mail-beta = autoconf@gnu.org
43 announcement_mail-stable = info-gnu@gnu.org, autoconf@gnu.org
44 announcement_mail_headers_ = \
45 To: $(announcement_mail-$(RELEASE_TYPE)) \
46 CC: $(announcement_Cc_) \
47 Mail-Followup-To: autoconf@gnu.org
49 # Update files from gnulib.
50 .PHONY: fetch gnulib-update autom4te-update
51 fetch: gnulib-update autom4te-update
53 gnulib-update:
54 cp $(gnulib_dir)/build-aux/announce-gen $(srcdir)/build-aux
55 cp $(gnulib_dir)/build-aux/config.guess $(srcdir)/build-aux
56 cp $(gnulib_dir)/build-aux/config.sub $(srcdir)/build-aux
57 cp $(gnulib_dir)/build-aux/gendocs.sh $(srcdir)/build-aux
58 cp $(gnulib_dir)/build-aux/git-version-gen $(srcdir)/build-aux
59 cp $(gnulib_dir)/build-aux/gitlog-to-changelog $(srcdir)/build-aux
60 cp $(gnulib_dir)/build-aux/gnupload $(srcdir)/build-aux
61 cp $(gnulib_dir)/build-aux/install-sh $(srcdir)/build-aux
62 cp $(gnulib_dir)/build-aux/mdate-sh $(srcdir)/build-aux
63 cp $(gnulib_dir)/build-aux/move-if-change $(srcdir)/build-aux
64 cp $(gnulib_dir)/build-aux/texinfo.tex $(srcdir)/build-aux
65 cp $(gnulib_dir)/build-aux/update-copyright $(srcdir)/build-aux
66 cp $(gnulib_dir)/build-aux/useless-if-before-free $(srcdir)/build-aux
67 cp $(gnulib_dir)/build-aux/vc-list-files $(srcdir)/build-aux
68 cp $(gnulib_dir)/doc/fdl.texi $(srcdir)/doc
69 cp $(gnulib_dir)/doc/gendocs_template $(srcdir)/doc
70 cp $(gnulib_dir)/doc/gnu-oids.texi $(srcdir)/doc
71 cp $(gnulib_dir)/doc/make-stds.texi $(srcdir)/doc
72 cp $(gnulib_dir)/doc/standards.texi $(srcdir)/doc
73 cp $(gnulib_dir)/m4/autobuild.m4 $(srcdir)/m4
74 cp $(gnulib_dir)/top/GNUmakefile $(srcdir)
75 cp $(gnulib_dir)/top/maint.mk $(srcdir)
77 WGET = wget
78 WGETFLAGS = -C off
80 ## Fetch the latest versions of files we care about.
81 automake_gitweb = \
82 http://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;hb=HEAD;
83 autom4te_files = \
84 Autom4te/Channels.pm \
85 Autom4te/FileUtils.pm \
86 Autom4te/Getopt.pm \
87 Autom4te/XFile.pm
89 move_if_change = '$(abs_srcdir)'/build-aux/move-if-change
91 autom4te-update:
92 rm -fr Fetchdir > /dev/null 2>&1
93 mkdir -p Fetchdir/Autom4te
94 for file in $(autom4te_files); do \
95 infile=`echo $$file | sed 's/Autom4te/Automake/g'`; \
96 $(WGET) $(WGET_FLAGS) \
97 "$(automake_gitweb)f=lib/$$infile" \
98 -O "Fetchdir/$$file" || exit; \
99 done
100 perl -pi -e 's/Automake::/Autom4te::/g' Fetchdir/Autom4te/*.pm
101 for file in $(autom4te_files); do \
102 $(move_if_change) Fetchdir/$$file $(srcdir)/lib/$$file || exit; \
103 done
104 rm -fr Fetchdir > /dev/null 2>&1
106 # Tests not to run.
107 local-checks-to-skip ?= \
108 changelog-check \
109 sc_GPL_version \
110 sc_cast_of_alloca_return_value \
111 sc_m4_quote_check \
112 sc_makefile_at_at_check \
113 sc_prohibit_HAVE_MBRTOWC \
114 sc_prohibit_always-defined_macros \
115 sc_prohibit_always_true_header_tests \
116 sc_prohibit_magic_number_exit \
117 sc_prohibit_stat_st_blocks \
118 sc_unmarked_diagnostics
121 # Always use shorthand copyrights.
122 update-copyright-env = \
123 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
124 UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
126 update-copyright: update-release-year
127 update-release-year:
128 $(AM_V_GEN):; \
129 if test -n "$$UPDATE_COPYRIGHT_YEAR"; then \
130 current_year=$$UPDATE_COPYRIGHT_YEAR; \
131 else \
132 current_year=`date +%Y` && test -n "$$current_year" \
133 || { echo "$@: cannot get current year" >&2; exit 1; }; \
134 fi; \
135 sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" configure.ac
136 .PHONY: update-release-year
138 # Prevent incorrect NEWS edits.
139 old_NEWS_hash = 8532b4ed4fb456eb71071a5cf8c258d4
141 exclude_file_name_regexp--sc_prohibit_undesirable_word_seq = \
142 ^(maint\.mk|build-aux/texinfo\.tex)$$
143 exclude_file_name_regexp--sc_prohibit_test_minus_ao = \
144 ^(maint\.mk|doc/autoconf\.texi)$$
145 exclude_file_name_regexp--sc_prohibit_atoi_atof = ^doc/autoconf\.texi$$
146 exclude_file_name_regexp--sc_useless_cpp_parens = \
147 ^(build-aux/config\.guess|doc/standards\.texi)$$
148 exclude_file_name_regexp--sc_trailing_blank = ^build-aux/texinfo\.tex$$
149 exclude_file_name_regexp--sc_two_space_separator_in_usage = \
150 ^build-aux/gnupload$$
151 exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests = \
152 ^doc/autoconf\.texi$$