Changed russian description a little bit
[gnuplot] / Makefile.maint
1 # -*-Makefile-*-
2 # This Makefile fragment is shared between fileutils, sh-utils, textutils.
3
4 maintainer-check:
5         if head ChangeLog| grep 'Version $(VERSION)' > /dev/null; then \
6           :; \
7         else \
8           echo "$(VERSION) not in ChangeLog; not tagging" 1>&2; \
9           exit 1; \
10         fi
11         $(MAKE) distcheck
12 #       $(MAKE) my-distcheck
13
14 # Tag before making distribution.  Also, don't make a distribution if
15 # checks fail.  Also, make sure the NEWS file is up-to-date.
16 # FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
17 cvs-dist: maintainer-check
18         pkg=`echo "$(PACKAGE)" | tr a-z A-Z`; \
19         ver=`echo "$(VERSION)" | sed 's/\./_/g'`; \
20         tag="$$pkg-$$ver"; \
21         echo tag=$$tag; \
22         if cvs -n log -h README| grep -e $$tag: > /dev/null; then \
23           echo "VERSION not new; not tagging" 1>&2; \
24           exit 1; \
25         fi; \
26         cvs update po; \
27         cvs tag -c $$tag
28         $(MAKE) dist
29
30 t=./=test
31 my-distcheck:
32         -rm -rf $(t)
33         mkdir $(t)
34         GZIP=$(GZIP) $(TAR) -C $(t) -zxf $(distdir).tar.gz
35         cd $(t)/$(distdir) \
36           && ./configure --with-gd=no --with-png=no --with-lisp-files --with-tutorial \
37           && $(MAKE) CFLAGS='-Wformat -Werror' \
38           && $(MAKE) dvi \
39           && $(MAKE) check \
40           && $(MAKE) distclean
41         cd $(t) && mv $(distdir) $(distdir).old \
42           && $(TAR) -zxf ../$(distdir).tar.gz
43         diff -ur $(t)/$(distdir).old $(t)/$(distdir)
44         -rm -rf $(t)
45         @echo "========================"; \
46         echo "$(distdir).tar.gz is ready for distribution"; \
47         echo "========================"
48
49 THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
50 # FIXME: this works only for Gnits-style test releases.
51 PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
52 PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
53 v = Version
54 url-host-prefix = ftp://ftp.ucc.ie/
55 url = $(url-host-prefix)/pub/gnuplot/$(distdir).tar.gz
56 md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/  -//')
57
58 rel-check:
59         tarz=/tmp/rel-check-tarz-$$$$; \
60         md5_tmp=/tmp/rel-check-md5-$$$$; \
61         set -e; \
62         trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
63         wget -q --output-document=$$tarz $(url); \
64         echo "$(md5)  -" > $$md5_tmp; \
65         md5sum -c $$md5_tmp < $$tarz
66
67 announcement: NEWS ChangeLog $(distdir).tar.gz
68         @( \
69           echo Subject: $(distdir) released; \
70           echo; \
71           echo FIXME: put comments here; \
72           echo; \
73           echo "  $(url)"; \
74           echo; \
75           echo "$(md5)  $(distdir).tar.gz"; \
76           echo; \
77           echo NEWS:; \
78           sed -n "/$(THIS_VERSION_REGEXP)/,/$(PREV_VERSION_REGEXP)/p" NEWS \
79             | grep -v '^\['; \
80           echo; \
81           echo ChangeLog entries:; \
82           sed -n "1,/$v $(PREV_VERSION_REGEXP)/p" \
83             ChangeLog; \
84         )
85
86 alpha:
87         $(MAKE) cvs-dist
88         $(MAKE) -s announcement > /tmp/announcement
89         ln $(distdir).tar.gz ../release
90         chmod a-w $(distdir).tar.gz
91         @echo =====================================
92         @echo 'ncftp -u $(url-host-prefix)/fs/share/ftp/gnu/fetish/'
93         @echo '#   put $(distdir).tar.gz'
94         @echo '# send the /tmp/announcement e-mail'
95         @echo 'pot-mail $(distdir).tar.gz | bash'
96         @echo =====================================
97
98 amfiles:
99         for subdir in config demo m4 term tutorial ; do \
100           make -C $$subdir -f Makefile.am.in Makefile.am \
101         done