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) && mv $(distdir) $(distdir).old \
41 && $(TAR) -zxf ../$(distdir).tar.gz
42 diff -ur $(t)/$(distdir).old $(t)/$(distdir)
44 @echo "========================"; \
45 echo "$(distdir).tar.gz is ready for distribution"; \
46 echo "========================"
48 THIS_VERSION_REGEXP := $(shell echo $(VERSION)|sed 's/\./\\./g')
49 # FIXME: this works only for test releases.
50 PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
51 PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
53 url = ftp://alpha.gnu.org/gnu/fetish/$(distdir).tar.gz
54 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
57 tarz=/tmp/rel-check-tarz-$$$$; \
58 md5_tmp=/tmp/rel-check-md5-$$$$; \
60 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
61 wget -q --output-document=$$tarz $(url); \
62 echo "$(md5) -" > $$md5_tmp; \
63 md5sum -c $$md5_tmp < $$tarz
65 announcement: NEWS ChangeLog $(distdir).tar.gz
67 echo Subject: $(distdir) released; \
69 echo FIXME: put comments here; \
73 echo "$(md5) $(distdir).tar.gz"; \
76 sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
79 echo ChangeLog entries:; \
80 sed -n "1,/$v $(PREV_VERSION_REGEXP)/p" \
86 $(MAKE) -s announcement > /tmp/announcement
87 ln $(distdir).tar.gz ../release
88 chmod a-w $(distdir).tar.gz
89 @echo =====================================
90 @echo 'ncftp -u $(dir $(url))/'
91 @echo '# put $(distdir).tar.gz'
92 @echo '# send the /tmp/announcement e-mail'
93 @echo 'pot-mail $(distdir).tar.gz | bash'
94 @echo =====================================