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))
90 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
93 tarz=/tmp/rel-check-tarz-$$$$; \
94 md5_tmp=/tmp/rel-check-md5-$$$$; \
96 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
97 wget -q --output-document=$$tarz $(url); \
98 echo "$(md5) -" > $$md5_tmp; \
99 md5sum -c $$md5_tmp < $$tarz
101 release-archive-dir = ../release
102 prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
103 xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
105 announcement: NEWS ChangeLog $(distdir).tar.gz
107 echo Subject: $(distdir) released; \
109 echo FIXME: put comments here; \
111 for url in $(url_dir_list); do \
112 echo " $$url/$(distdir).tar.gz"; \
115 echo And here are xdelta-style diffs; \
117 for url in $(url_dir_list); do \
118 echo " $$url/$(xd-delta)"; \
121 echo "$(md5) $(distdir).tar.gz"; \
124 sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
127 echo ChangeLog entries:; \
128 find . -name ChangeLog \
129 | xargs cvs diff -up -r$(prev-cvs-tag) -rHEAD \
131 | perl -ne 'm!^\+\+ (\./)?! or print,next;' \
132 -e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
138 $(MAKE) -s announcement > /tmp/announce-$(distdir)
139 ln $(distdir).tar.gz ../release
140 chmod a-w $(distdir).tar.gz
141 cd $(release-archive-dir) \
142 && xdelta delta -9 $(prev-tgz) $(distdir).tar.gz $(xd-delta) || :
143 ln $(release-archive-dir)/$(xd-delta) .
144 chmod a-w $(release-archive-dir)/$(xd-delta)
145 @echo =====================================
146 @echo =====================================
147 @echo 'scp $(xd-delta) $(distdir).tar.gz \'
148 @echo ' $(b_host):$(b_real_dir)'
149 @echo '# send the /tmp/announcement e-mail'
150 @echo =====================================
151 @echo =====================================