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)
22 # Tag before making distribution. Also, don't make a distribution if
23 # checks fail. Also, make sure the NEWS file is up-to-date.
24 # FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
25 cvs-dist: maintainer-check
26 echo $(this-cvs-tag); \
27 if cvs -n log -h README| grep -e $(this-cvs-tag): > /dev/null; then \
28 echo "VERSION not new; not tagging" 1>&2; \
32 cvs tag -c $(this-cvs-tag)
39 GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
41 && ./configure --disable-nls \
42 && $(MAKE) CFLAGS='-Wformat -Werror' \
46 cd $(t) && mv $(distdir) $(distdir).old \
47 && $(AMTAR) -zxf ../$(distdir).tar.gz
48 diff -ur $(t)/$(distdir).old $(t)/$(distdir)
50 @echo "========================"; \
51 echo "$(distdir).tar.gz is ready for distribution"; \
52 echo "========================"
54 THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
55 # FIXME: this works only for Gnits-style test releases.
56 PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
57 PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
66 c_url_dir=pub/gnu/gnits/fetish
68 a_real_dir=/fs/share/ftp/gnu/fetish
69 b_real_dir=/home/ftp/pub/gnu/fetish
70 c_real_dir=/pub/gnu/gnits/fetish
72 url_dir_list = $(foreach x,a b c,ftp://$($(x)_host)/$($(x)_url_dir))
73 real_dir_list = $(foreach x,a b c,ftp://$($(x)_host)$($(x)_real_dir))
75 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
78 tarz=/tmp/rel-check-tarz-$$$$; \
79 md5_tmp=/tmp/rel-check-md5-$$$$; \
81 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
82 wget -q --output-document=$$tarz $(url); \
83 echo "$(md5) -" > $$md5_tmp; \
84 md5sum -c $$md5_tmp < $$tarz
86 announcement: NEWS ChangeLog $(distdir).tar.gz
88 echo Subject: $(distdir) released; \
90 echo FIXME: put comments here; \
92 for url in $(url_dir_list); do \
93 echo " $$url/$(distdir).tar.gz"; \
96 echo "$(md5) $(distdir).tar.gz"; \
99 sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
102 echo ChangeLog entries:; \
103 find . -name ChangeLog \
104 | xargs cvs diff -up -r$(prev-cvs-tag) -rHEAD \
106 | perl -ne 'm!^\+\+ (\./)?! or print,next;' \
107 -e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
112 $(MAKE) -s announcement > /tmp/announce-$(distdir)
113 ln $(distdir).tar.gz ../release
114 chmod a-w $(distdir).tar.gz
115 @echo =====================================
116 @for url in $(real_dir_list); do \
117 echo "ncftp -u $$url/"; \
119 @echo '# put $(distdir).tar.gz'
120 @echo '# send the /tmp/announcement e-mail'
121 @echo =====================================