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 a-z Xa-y)
66 PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
75 c_url_dir=pub/gnu/gnits/fetish
77 a_real_dir=/fs/share/ftp/gnu/fetish
78 b_real_dir=/home/ftp/pub/gnu/fetish
79 c_real_dir=/pub/gnu/gnits/fetish
81 url_dir_list = $(foreach x,a b c,ftp://$($(x)_host)/$($(x)_url_dir))
82 real_dir_list = $(foreach x,a b c,ftp://$($(x)_host)$($(x)_real_dir))
84 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
87 tarz=/tmp/rel-check-tarz-$$$$; \
88 md5_tmp=/tmp/rel-check-md5-$$$$; \
90 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
91 wget -q --output-document=$$tarz $(url); \
92 echo "$(md5) -" > $$md5_tmp; \
93 md5sum -c $$md5_tmp < $$tarz
95 announcement: NEWS ChangeLog $(distdir).tar.gz
97 echo Subject: $(distdir) released; \
99 echo FIXME: put comments here; \
101 for url in $(url_dir_list); do \
102 echo " $$url/$(distdir).tar.gz"; \
105 echo "$(md5) $(distdir).tar.gz"; \
108 sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
111 echo ChangeLog entries:; \
112 find . -name ChangeLog \
113 | xargs cvs diff -up -r$(prev-cvs-tag) -rHEAD \
115 | perl -ne 'm!^\+\+ (\./)?! or print,next;' \
116 -e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
122 $(MAKE) -s announcement > /tmp/announce-$(distdir)
123 ln $(distdir).tar.gz ../release
124 chmod a-w $(distdir).tar.gz
125 @echo =====================================
126 @for url in $(real_dir_list); do \
127 echo "ncftp -u $$url/"; \
129 @echo '# put $(distdir).tar.gz'
130 @echo '# send the /tmp/announcement e-mail'
131 @echo =====================================