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 prev-version := $(shell echo $(VERSION)|tr a-z Xa-y)
15 tag-package = $(shell echo "$(PACKAGE)" | tr a-z A-Z)
16 tag-this-version = $(subst .,_,$(VERSION))
17 tag-prev-version = $(subst .,_,$(prev-version))
18 this-cvs-tag = $(tag-package)-$(tag-this-version)
19 prev-cvs-tag = $(tag-package)-$(tag-prev-version)
21 # Verify that all source files using _() are listed in po/POTFILES.in.
23 grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
24 grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
28 # Tag before making distribution. Also, don't make a distribution if
29 # checks fail. Also, make sure the NEWS file is up-to-date.
30 # FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
31 cvs-dist: maintainer-check
32 echo $(this-cvs-tag); \
33 if cvs -n log -h README| grep -e $(this-cvs-tag): > /dev/null; then \
34 echo "VERSION not new; not tagging" 1>&2; \
38 cvs tag -c $(this-cvs-tag)
41 # Use this to make sure we don't run these programs when building
42 # from a virgin tgz file, below.
54 GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
55 # Removing $(DEPDIR) like this is a gross kludge to work around a bug
56 # in automake. Remove that line once it's fixed.
58 && ./configure --disable-nls \
59 && $(MAKE) CFLAGS='-Wformat -Werror' \
60 AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
65 cd $(t) && mv $(distdir) $(distdir).old \
66 && $(AMTAR) -zxf ../$(distdir).tar.gz
67 diff -ur $(t)/$(distdir).old $(t)/$(distdir)
69 @echo "========================"; \
70 echo "$(distdir).tar.gz is ready for distribution"; \
71 echo "========================"
73 THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
74 # FIXME: this works only for Gnits-style test releases.
75 PREV_VERSION := $(shell echo $(VERSION)|tr b-z a-y|sed 's/a$$//')
76 PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
85 a_real_dir=/fs/share/ftp/gnu/fetish
86 b_real_dir=/home/ftp/pub/gnu/fetish
88 url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
89 real_dir_list = $(foreach x,a b,ftp://$($(x)_host)$($(x)_real_dir))
91 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
94 tarz=/tmp/rel-check-tarz-$$$$; \
95 md5_tmp=/tmp/rel-check-md5-$$$$; \
97 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
98 wget -q --output-document=$$tarz $(url); \
99 echo "$(md5) -" > $$md5_tmp; \
100 md5sum -c $$md5_tmp < $$tarz
102 announcement: NEWS ChangeLog $(distdir).tar.gz
104 echo Subject: $(distdir) released; \
106 echo FIXME: put comments here; \
108 for url in $(url_dir_list); do \
109 echo " $$url/$(distdir).tar.gz"; \
112 echo "$(md5) $(distdir).tar.gz"; \
115 sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
118 echo ChangeLog entries:; \
119 find . -name ChangeLog \
120 | xargs cvs diff -up -r$(prev-cvs-tag) -rHEAD \
122 | perl -ne 'm!^\+\+ (\./)?! or print,next;' \
123 -e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
126 release-archive-dir = ../release
127 prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
128 xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
133 $(MAKE) -s announcement > /tmp/announce-$(distdir)
134 ln $(distdir).tar.gz ../release
135 chmod a-w $(distdir).tar.gz
136 cd $(release-archive-dir) \
137 && xdelta delta -9 $(prev-tgz) $(distdir).tar.gz $(xd-delta) || :
138 ln $(release-archive-dir)/$(xd-delta) .
139 chmod a-w $(release-archive-dir)/$(xd-delta)
140 @echo =====================================
141 @for url in $(real_dir_list); do \
142 echo "ncftp -u $$url/"; \
144 @echo '# mput $(xd-delta) $(distdir).tar.gz'
145 @echo '# send the /tmp/announcement e-mail'
146 @echo =====================================