diff options
author | Eric Blake <ebb9@byu.net> | 2009-11-20 08:51:20 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-11-26 05:28:32 -0700 |
commit | f1cf39048ffda00d41d1f60add63f3b6591b5d07 (patch) | |
tree | 507b8c4ea7330b9584d7dc8b89e0c84f4b2a0f55 | |
parent | 48873014007f6a22b77ed3b3fd8b01705e231715 (diff) | |
download | m4-f1cf39048ffda00d41d1f60add63f3b6591b5d07.tar.gz |
Use gnulib maintainer-makefile module.
* m4/gnulib-cache.m4: Import maintainer-makefile module.
* cfg.mk (local-checks-to-skip): Drop changelog-check; add
sc_cast_of_x_alloc_return_value.
(gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by
maint.mk.
(config_h_header, old_NEWS_hash): New macros.
* .prev-version: New file.
* maint.mk: Remove from version control; use gnulib instead.
* .gitignore: Update.
* HACKING: Update.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit 260383467b3ae57f2cb3c6821718b99fdf278c4b)
-rw-r--r-- | .cvsignore | 1 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .prev-version | 1 | ||||
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | HACKING | 6 | ||||
-rw-r--r-- | build-aux/.cvsignore | 1 | ||||
-rw-r--r-- | build-aux/.gitignore | 1 | ||||
-rw-r--r-- | cfg.mk | 30 | ||||
-rw-r--r-- | m4/gnulib-cache.m4 | 3 | ||||
-rw-r--r-- | maint.mk | 225 |
10 files changed, 32 insertions, 249 deletions
@@ -28,3 +28,4 @@ stamp-h stamp-h1 stamp-h.in tests +maint.mk @@ -26,6 +26,7 @@ gnupload !/lib/Makefile.am link-warning.h m4-* +/maint.mk Makefile.in Makefile /missing diff --git a/.prev-version b/.prev-version new file mode 100644 index 00000000..acd81d7f --- /dev/null +++ b/.prev-version @@ -0,0 +1 @@ +1.4.13 @@ -1,5 +1,17 @@ 2009-11-25 Eric Blake <ebb9@byu.net> + Use gnulib maintainer-makefile module. + * m4/gnulib-cache.m4: Import maintainer-makefile module. + * cfg.mk (local-checks-to-skip): Drop changelog-check; add + sc_cast_of_x_alloc_return_value. + (gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by + maint.mk. + (config_h_header, old_NEWS_hash): New macros. + * .prev-version: New file. + * maint.mk: Remove from version control; use gnulib instead. + * .gitignore: Update. + * HACKING: Update. + Update from gnulib. * gnulib: Update. * m4/gnulib-cache.m4: Use --makefile-name. @@ -255,9 +255,9 @@ yyyy-mm-dd Name of Author <email@address> (tiny change) * Run `make maintainer-distcheck'. If there are any problems, fix them, run `git tag -d v<version>' and start again from the `git commit' step. -* Run `make <target> PREV_VERSION=maj.min[.mic[alpha]]', with target set - to `major', `alpha', or `beta' as appropriate. This will run various - additional checks and create diff files from the previous version. +* Run `make <target>', with target set to `stable', `alpha', or `beta' + as appropriate. This will run various additional checks and create + diff files from the previous version. * Run './build-aux/gnupload --to [dest].gnu.org:m4 [files]' to create detached gpg signature and clear signed directive files, and upload diff --git a/build-aux/.cvsignore b/build-aux/.cvsignore index 17512d05..16ef012b 100644 --- a/build-aux/.cvsignore +++ b/build-aux/.cvsignore @@ -7,3 +7,4 @@ gnupload link-warning.h update-copyright vc-list-files +useless-if-before-free diff --git a/build-aux/.gitignore b/build-aux/.gitignore index 7587f4bb..e7a0cfcc 100644 --- a/build-aux/.gitignore +++ b/build-aux/.gitignore @@ -7,3 +7,4 @@ /link-warning.h /update-copyright /vc-list-files +/useless-if-before-free @@ -15,31 +15,21 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# Use alpha.gnu.org for alpha and beta releases. -# Use ftp.gnu.org for major releases. -gnu_ftp_host-alpha = alpha.gnu.org -gnu_ftp_host-beta = alpha.gnu.org -gnu_ftp_host-major = ftp.gnu.org -gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE)) - # Used in maint.mk's web-manual rule manual_title = GNU macro processor -url_dir_list = \ - ftp://$(gnu_rel_host)/gnu/m4 - # The GnuPG ID of the key used to sign the tarballs. gpg_key_ID = F4850180 -# Tests not to run as part of "make distcheck". -# Exclude changelog-check here so that there's less churn in ChangeLog -# files -- otherwise, you'd need to have the upcoming version number -# at the top of the file for each `make distcheck' run. -local-checks-to-skip = changelog-check - -# The local directory containing the checked-out copy of gnulib used in this -# release. Used solely to get gnulib's SHA1 for the "announcement" target. -gnulib_dir = $(srcdir)/gnulib - # Always use longhand copyrights. update-copyright-env = UPDATE_COPYRIGHT_USE_INTERVALS=0 + +# Tests not to run as part of "make syntax-check". +# M4 intentionally uses a coding style that compiles under C++. +local-checks-to-skip = sc_cast_of_x_alloc_return_value + +# Our files include "m4.h", which in turn includes <config.h> first. +config_h_header = "m4\.h" + +# Hash of NEWS contents, to ensure we don't add entries to wrong section. +old_NEWS_hash = 0330971054cd4fb4e94b85fe367980f2 diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index 10458b35..92cfe552 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 intprops memchr2 mkstemp obstack pipe progname regex sigaction stdbool stdint stdlib-safer strsignal strstr strtod strtol unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xprintf xvasprintf-posix +# gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 intprops maintainer-makefile memchr2 mkstemp obstack pipe progname regex sigaction stdbool stdint stdlib-safer strsignal strstr strtod strtol unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xprintf xvasprintf-posix # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([local]) @@ -48,6 +48,7 @@ gl_MODULES([ gnupload gpl-3.0 intprops + maintainer-makefile memchr2 mkstemp obstack diff --git a/maint.mk b/maint.mk deleted file mode 100644 index a50c727e..00000000 --- a/maint.mk +++ /dev/null @@ -1,225 +0,0 @@ -## maint.mk -- Makefile rules for m4 maintainers -*-Makefile-*- -## -## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software -## Foundation, Inc. -## -## This file is part of GNU M4. -## -## GNU M4 is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## GNU M4 is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see <http://www.gnu.org/licenses/>. - -# This is reported not to work with make-3.79.1 -# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -ME := maint.mk - -# Override this in cfg.mk if you use a non-standard build-aux directory. -build_aux ?= $(srcdir)/build-aux - -# Do not save the original name or timestamp in the .tar.gz file. -# Use --rsyncable if available. -gzip_rsyncable := \ - $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable) -GZIP_ENV = '--no-name --best $(gzip_rsyncable)' - -GIT = git -VC = $(GIT) -VC-tag = git tag -s -m '$(VERSION)' -u $(gpg_key_ID) - -VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) - -VC_LIST_EXCEPT = \ - $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; else grep -v ChangeLog; fi - -VERSION_REGEXP = $(subst .,\.,$(VERSION)) -my_distdir = $(PACKAGE)-$(VERSION) - -# Ensure that we use only the standard $(VAR) notation, -# not @...@ in Makefile.am, now that we can rely on automake -# to emit a definition for each substituted variable. -makefile-check: - grep -nE '@[A-Z_0-9]+@' `find $(srcdir) -name Makefile.am` \ - && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : - -news-date-check: NEWS version-check - today=`date +%Y-%m-%d`; \ - if head $(srcdir)/NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \ - >/dev/null; then \ - :; \ - else \ - echo "version or today's date is not in NEWS" 1>&2; \ - exit 1; \ - fi - -changelog-check: - if head $(srcdir)/ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \ - >/dev/null; then \ - :; \ - else \ - echo "$(VERSION) not in ChangeLog" 1>&2; \ - exit 1; \ - fi - -m4-check: - @grep -n 'AC_DEFUN([^[]' $(srcdir)/m4/*.m4 \ - && { echo '$(ME): quote the first arg to AC_DEFUN' 1>&2; \ - exit 1; } || : - -vc-diff-check: - (CDPATH=; cd $(srcdir) && $(VC) diff) > vc-diffs || : - if test -s vc-diffs; then \ - cat vc-diffs; \ - echo "Some files are locally modified:" 1>&2; \ - exit 1; \ - else \ - rm vc-diffs; \ - fi - -maintainer-distcheck: - $(MAKE) distcheck - $(MAKE) my-distcheck - -# Don't make a distribution if checks fail. -# Also, make sure the NEWS file is up-to-date. -vc-dist: $(local-check) vc-diff-check maintainer-distcheck - $(MAKE) dist - -# Use this to make sure we don't run these programs when building -# from a virgin tgz file, below. -null_AM_MAKEFLAGS = \ - ACLOCAL=false \ - AUTOCONF=false \ - AUTOMAKE=false \ - AUTOHEADER=false \ - MAKEINFO=false - -# Use -Wformat -Werror to detect format-string/arg-list mismatches. -# Also, check for shadowing problems with -Wshadow, and for pointer -# arithmetic problems with -Wpointer-arith. -# These CFLAGS are pretty strict. If you build this target, you probably -# have to have a recent version of gcc and glibc headers. -TMPDIR ?= /tmp -t=$(TMPDIR)/$(PACKAGE)/test -my-distcheck: $(local-check) check - -rm -rf $(t) - mkdir -p $(t) - GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz - cd $(t)/$(distdir) \ - && ./configure \ - && $(MAKE) CFLAGS='$(warn_cflags)' \ - AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \ - && $(MAKE) dvi \ - && $(MAKE) check \ - && $(MAKE) distclean - (cd $(t) && mv $(distdir) $(distdir).old \ - && $(AMTAR) -zxf - ) < $(distdir).tar.gz - diff -ur $(t)/$(distdir).old $(t)/$(distdir) - -rm -rf $(t) - @echo "========================"; \ - echo "$(distdir).tar.gz is ready for distribution"; \ - echo "========================" - -gnulib-version = $$(cd $(gnulib_dir) && git describe) - -announcement: NEWS ChangeLog $(rel-files) - @$(srcdir)/build-aux/announce-gen \ - --release-type=$(RELEASE_TYPE) \ - --package=$(PACKAGE) \ - --prev=$(PREV_VERSION) \ - --curr=$(VERSION) \ - --gpg-key-id=$(gpg_key_ID) \ - --news=$(srcdir)/NEWS \ - --bootstrap-tools=autoconf,automake,gnulib \ - --gnulib-version=$(gnulib-version) \ - $(addprefix --url-dir=, $(url_dir_list)) - -.PHONY: alpha beta major -alpha beta major: $(local-check) version-check - test $@ = major \ - && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \ - || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\ - || : - $(MAKE) vc-dist - $(MAKE) news-date-check changelog-check - $(MAKE) deltas - $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir) - -.PHONY: version-check -version-check: - @case $(VERSION) in \ - *[acegikmoqsuwy]) \ - echo "Version \`$(VERSION)' is not a releasable version, please read:"; \ - echo " http://www.gnu.org/software/libtool/contribute.html"; \ - exit 1; \ - ;; \ - esac - @if test -z "$(PREV_VERSION)"; \ - then echo "PREV_VERSION is not set"; exit 1; fi - -.PHONY: prev-tarball -prev-tarball: version-check -## Make sure we have the previous release tarball in the tree. - @ofile="$(PACKAGE)-$(PREV_VERSION).tar.gz"; \ - if test -f $$ofile; then :; \ - else echo "Cannot make deltas without $$ofile"; exit 1; fi - -.PHONY: new-tarball -new-tarball: -## Make sure we have the new release tarball in the tree. - @ofile="$(PACKAGE)-$(VERSION).tar.gz"; \ - if test -f $$ofile; then :; \ - else echo "Cannot make deltas without $$ofile"; exit 1; fi - -.PHONY: deltas -deltas: delta-diff - -DIFF = diff -DIFF_OPTIONS = -ruNp - -.PHONY: delta-diff -delta-diff: prev-tarball new-tarball -## Unpack the tarballs somewhere to diff them - rm -rf delta-diff - mkdir delta-diff - ofile="../$(PACKAGE)-$(PREV_VERSION)-$(VERSION).diff.gz"; \ - cd delta-diff \ - && tar xzf "../$(PACKAGE)-$(PREV_VERSION).tar.gz" \ - && tar xzf "../$(PACKAGE)-$(VERSION).tar.gz" \ - && $(DIFF) $(DIFF_OPTIONS) \ - $(PACKAGE)-$(PREV_VERSION) $(PACKAGE)-$(VERSION) \ - | GZIP=$(GZIP_ENV) gzip -c > $$ofile - rm -rf delta-diff - -.PHONY: web-manual -web-manual: - @cd '$(srcdir)/doc' ; \ - $(SHELL) ../build-aux/gendocs.sh -o '$(abs_builddir)/doc/manual' \ - --email $(PACKAGE_BUGREPORT) $(PACKAGE) \ - "$(PACKAGE_NAME) - $(manual_title)" - @echo " *** Upload the doc/manual directory to web-cvs." - -# If you want to set UPDATE_COPYRIGHT_* environment variables, -# put the assignments in this variable. -update-copyright-env ?= - -# Run this rule once per year (usually early in January) -# to update all FSF copyright year lists in your project. -# If you have an additional project-specific rule, -# add it in cfg.mk along with a line 'update-copyright: prereq'. -# By default, exclude all variants of COPYING; you can also -# add exemptions (such as ChangeLog..* for rotated change logs) -# in the file .x-update-copyright. -.PHONY: update-copyright -update-copyright: - grep -l -w Copyright $$($(VC_LIST_EXCEPT)) \ - $(srcdir)/ChangeLog | grep -v COPYING \ - | $(update-copyright-env) xargs $(build_aux)/$@ |