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)
45 GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
46 # Removing $(DEPDIR) like this is a gross kludge to work around a bug
47 # in automake. Remove that line once it's fixed.
49 && ./configure --disable-nls \
50 && $(MAKE) CFLAGS='-Wformat -Werror' \
55 cd $(t) && mv $(distdir) $(distdir).old \
56 && $(AMTAR) -zxf ../$(distdir).tar.gz
57 diff -ur $(t)/$(distdir).old $(t)/$(distdir)
59 @echo "========================"; \
60 echo "$(distdir).tar.gz is ready for distribution"; \
61 echo "========================"
63 THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
64 # FIXME: this works only for Gnits-style test releases.
65 PREV_VERSION := $(shell echo $(VERSION)|tr b-z a-y|sed 's/a$$//')
66 PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
75 a_real_dir=/fs/share/ftp/gnu/fetish
76 b_real_dir=/home/ftp/pub/gnu/fetish
78 url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
79 real_dir_list = $(foreach x,a b,ftp://$($(x)_host)$($(x)_real_dir))
81 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
84 tarz=/tmp/rel-check-tarz-$$$$; \
85 md5_tmp=/tmp/rel-check-md5-$$$$; \
87 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
88 wget -q --output-document=$$tarz $(url); \
89 echo "$(md5) -" > $$md5_tmp; \
90 md5sum -c $$md5_tmp < $$tarz
92 announcement: NEWS ChangeLog $(distdir).tar.gz
94 echo Subject: $(distdir) released; \
96 echo FIXME: put comments here; \
98 for url in $(url_dir_list); do \
99 echo " $$url/$(distdir).tar.gz"; \
102 echo "$(md5) $(distdir).tar.gz"; \
105 sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
108 echo ChangeLog entries:; \
109 find . -name ChangeLog \
110 | xargs cvs diff -up -r$(prev-cvs-tag) -rHEAD \
112 | perl -ne 'm!^\+\+ (\./)?! or print,next;' \
113 -e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
116 release-archive-dir = ../release
117 prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
118 xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
123 $(MAKE) -s announcement > /tmp/announce-$(distdir)
124 ln $(distdir).tar.gz ../release
125 chmod a-w $(distdir).tar.gz
126 cd $(release-archive-dir) \
127 && xdelta delta -9 $(prev-tgz) $(distdir).tar.gz $(xd-delta) || :
128 ln $(release-archive-dir)/$(xd-delta) .
129 chmod a-w $(release-archive-dir)/$(xd-delta)
130 @echo =====================================
131 @for url in $(real_dir_list); do \
132 echo "ncftp -u $$url/"; \
134 @echo '# mput $(xd-delta) $(distdir).tar.gz'
135 @echo '# send the /tmp/announcement e-mail'
136 @echo =====================================