2 # This Makefile fragment is shared between fileutils, sh-utils, textutils.
5 if head ChangeLog| grep 'Version $(VERSION)' > /dev/null; then \
8 echo "$(VERSION) not in ChangeLog; not tagging" 1>&2; \
14 # Tag before making distribution. Also, don't make a distribution if
15 # checks fail. Also, make sure the NEWS file is up-to-date.
16 cvs-dist: maintainer-check
17 pkg=`echo "$(PACKAGE)" | tr a-z A-Z`; \
18 ver=`echo "$(VERSION)" | sed 's/\./_/g'`; \
21 if cvs -n log -h README| grep -e $$tag > /dev/null; then \
22 echo "VERSION not new; not tagging" 1>&2; \
33 GZIP=$(GZIP) $(TAR) -C $(t) -zxf $(distdir).tar.gz
35 && ./configure --disable-nls \
40 cd $(t) && $(TAR) --diff -z -f ../$(distdir).tar.gz
42 @echo "========================"; \
43 echo "$(distdir).tar.gz is ready for distribution"; \
44 echo "========================"
46 THIS_VERSION_REGEXP := $(shell echo $(VERSION)|sed 's/\./\\./g')
47 # FIXME: this works only for test releases.
48 PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
49 PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
51 url = ftp://alpha.gnu.org/gnu/$(distdir).tar.gz
52 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
55 tarz=/tmp/rel-check-tarz-$$$$; \
56 md5_tmp=/tmp/rel-check-md5-$$$$; \
58 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
59 wget -q --output-document=$$tarz $(url); \
60 echo "$(md5) -" > $$md5_tmp; \
61 md5sum -c $$md5_tmp < $$tarz
63 announcement: NEWS ChangeLog $(distdir).tar.gz
65 echo Subject: $(distdir) released; \
67 echo FIXME: put comments here; \
71 echo "$(md5) $(distdir).tar.gz"; \
74 sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
77 echo ChangeLog entries:; \
78 sed -n "/$v $(THIS_VERSION_REGEXP)/,/$v $(PREV_VERSION_REGEXP)/p" \
79 ChangeLog | grep -v '\* $v'; \