# -*-Makefile-*-
-# This Makefile fragment is shared between fileutils, sh-utils, textutils.
-
-maintainer-check:
- if head ChangeLog| grep 'Version $(VERSION)' > /dev/null; then \
- :; \
- else \
- echo "$(VERSION) not in ChangeLog; not tagging" 1>&2; \
- exit 1; \
- fi
- $(MAKE) distcheck
- $(MAKE) my-distcheck
+# This Makefile fragment is shared between fileutils, sh-utils, textutils,
+# and Autoconf.
prev_version_file ?= .prev-version
prev-cvs-tag = $(tag-package)-$(tag-prev-version)
my_distdir = $(PACKAGE)-$(VERSION)
+# Old releases are stored here.
+# Used for diffs and xdeltas.
+release-archive-dir = ../release
+
+
+
+## --------------- ##
+## Sanity checks. ##
+## --------------- ##
+
+changelog-check:
+ if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
+ :; \
+ else \
+ echo "$(VERSION) not in ChangeLog; not tagging" 1>&2; \
+ exit 1; \
+ fi
+
# Verify that all source files using _() are listed in po/POTFILES.in.
po-check:
if test -f po/POTFILES.in; then \
rm -f $@-1 $@-2; \
fi
+# Check that `make alpha' will not fail at the end of the process.
+writable-files:
+ if test -d $(release-archive-dir); then :; else \
+ mkdir $(release-archive-dir); \
+ fi
+ for file in $(distdir).tar.gz $(xd-delta) \
+ $(release-archive-dir)/$(distdir).tar.gz \
+ $(release-archive-dir)/$(xd-delta); do \
+ test -e $$file || continue; \
+ test -w $$file \
+ || { echo ERROR: $$file is not writable; fail=1; }; \
+ done; \
+ test "$$fail" && exit 1 || :
+
+static-check: changelog-check po-check writable-files check-copyright
+
+
+maintainer-distcheck: changelog-check
+ $(MAKE) distcheck
+ $(MAKE) my-distcheck
+
+
# Do not save the original name or timestamp in the .tar.gz file.
GZIP_ENV = '--no-name --best'
# Tag before making distribution. Also, don't make a distribution if
# checks fail. Also, make sure the NEWS file is up-to-date.
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
-cvs-dist: maintainer-check
+cvs-dist: maintainer-distcheck
echo $(this-cvs-tag); \
if cvs -n log -h README| grep -e $(this-cvs-tag): > /dev/null; then \
echo "VERSION not new; not tagging" 1>&2; \
echo "$(md5) -" > $$md5_tmp; \
md5sum -c $$md5_tmp < $$tarz
-release-archive-dir = ../release
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
-e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
)
-writable-files:
- if test -d $(release-archive-dir); then :; else \
- mkdir $(release-archive-dir); \
- fi
- for file in $(distdir).tar.gz $(xd-delta) \
- $(release-archive-dir)/$(distdir).tar.gz \
- $(release-archive-dir)/$(xd-delta); do \
- test -e $$file || continue; \
- test -w $$file \
- || { echo ERROR: $$file is not writable; fail=1; }; \
- done; \
- test "$$fail" && exit 1 || :
-
WGET = wget
ftp-gnu = ftp://ftp.gnu.org/gnu
|| { echo 'out of date copyright in $<; update it' 1>&2; exit 1; }; \
fi
-alpha: writable-files po-check check-copyright
+alpha: static-check
$(MAKE) cvs-dist
$(MAKE) -s announcement > /tmp/announce-$(my_distdir)
ln $(distdir).tar.gz ../release