2 # This Makefile fragment is shared between the coreutils,
3 # CPPI, Bison, and Autoconf.
5 ## Copyright (C) 2001-2008 Free Software Foundation, Inc.
7 ## This program is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 3 of the License, or
10 ## (at your option) any later version.
12 ## This program is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # This is reported not to work with make-3.79.1
21 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
24 # Do not save the original name or timestamp in the .tar.gz file.
25 # Use --rsyncable if available.
27 $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
28 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
33 VC-tag = git tag -s -m '$(VERSION)'
35 CVS_LIST = build-aux/vc-list-files
38 $(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
40 ifeq ($(origin prev_version_file), undefined)
41 prev_version_file = .prev-version
44 PREV_VERSION := $(shell cat $(prev_version_file))
45 VERSION_REGEXP = $(subst .,\.,$(VERSION))
48 this-vc-tag = v$(VERSION)
49 this-vc-tag-regexp = v$(VERSION_REGEXP)
51 tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
52 tag-this-version = $(subst .,_,$(VERSION))
53 this-vc-tag = $(tag-package)-$(tag-this-version)
54 this-vc-tag-regexp = $(this-vc-tag)
56 my_distdir = $(PACKAGE)-$(VERSION)
58 # Old releases are stored here.
59 release_archive_dir ?= ../release
61 # Prevent programs like 'sort' from considering distinct strings to be equal.
62 # Doing it here saves us from having to set LC_ALL elsewhere in this file.
71 # Collect the names of rules starting with `sc_'.
72 syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
73 .PHONY: $(syntax-check-rules)
75 local-checks-available = \
76 po-check copyright-check m4-check author_mark_check \
77 patch-check strftime-check $(syntax-check-rules) \
78 makefile_path_separator_check \
79 makefile-check check-AUTHORS
80 .PHONY: $(local-checks-available)
82 local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
84 syntax-check: $(local-check)
85 # @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
86 # $$(find -type f -name '*.[chly]') && \
87 # { echo '$(ME): found conditional include' 1>&2; \
90 # grep -nE '^# *include <(string|stdlib)\.h>' \
91 # $(srcdir)/{lib,src}/*.[chy] && \
92 # { echo '$(ME): FIXME' 1>&2; \
94 # FIXME: don't allow `#include .strings\.h' anywhere
96 sc_avoid_if_before_free:
97 @$(srcdir)/build-aux/useless-if-before-free \
98 $(useless_free_options) \
99 $$($(CVS_LIST_EXCEPT)) && \
100 { echo '$(ME): found useless "if" before "free" above' 1>&2; \
103 sc_cast_of_argument_to_free:
104 @grep -nE '\<free \(\(' $$($(CVS_LIST_EXCEPT)) && \
105 { echo '$(ME): don'\''t cast free argument' 1>&2; \
108 sc_cast_of_x_alloc_return_value:
109 @grep -nE '\*\) *x(m|c|re)alloc\>' $$($(CVS_LIST_EXCEPT)) && \
110 { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
113 sc_cast_of_alloca_return_value:
114 @grep -nE '\*\) *alloca\>' $$($(CVS_LIST_EXCEPT)) && \
115 { echo '$(ME): don'\''t cast alloca return value' 1>&2; \
119 @grep -n '[ ] ' $$($(CVS_LIST_EXCEPT)) && \
120 { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
123 # Don't use *scanf or the old ato* functions in `real' code.
124 # They provide no error checking mechanism.
125 # Instead, use strto* functions.
126 sc_prohibit_atoi_atof:
127 @grep -nE '\<([fs]?scanf|ato([filq]|ll))\>' $$($(CVS_LIST_EXCEPT)) && \
128 { echo '$(ME): do not use *scan''f, ato''f, ato''i, ato''l, ato''ll, ato''q, or ss''canf' \
131 # Use STREQ rather than comparing strcmp == 0, or != 0.
133 @grep -nE '! *str''cmp \(|\<str''cmp \([^)]+\) *==' \
134 $$($(CVS_LIST_EXCEPT)) && \
135 { echo '$(ME): use STREQ in place of the above uses of str''cmp' \
138 # Using EXIT_SUCCESS as the first argument to error is misleading,
139 # since when that parameter is 0, error does not exit. Use `0' instead.
140 sc_error_exit_success:
141 @grep -nF 'error (EXIT_SUCCESS,' \
142 $$(find -type f -name '*.[chly]') && \
143 { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
147 @grep -ni 'file''system' $$($(CVS_LIST_EXCEPT)) && \
148 { echo '$(ME): found use of "file''system";' \
149 'rewrite to use "file system"' 1>&2; \
153 @grep -n 'HAVE''_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \
154 { echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
157 # Nearly all .c files must include <config.h>.
159 @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
160 grep -L '^# *include <config\.h>' \
161 $$($(CVS_LIST_EXCEPT) | grep '\.c$$') \
163 { echo '$(ME): the above files do not include <config.h>' \
164 1>&2; exit 1; } || :; \
168 # Prohibit the inclusion of assert.h without an actual use of assert.
169 sc_prohibit_assert_without_use:
170 @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
171 files=$$(grep -l '# *include <assert\.h>' \
172 $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
173 grep -L '\<assert (' $$files \
175 { echo "$(ME): the above files include <assert.h> but don't use it" \
176 1>&2; exit 1; } || :; \
180 # Don't include quotearg.h unless you use one of its functions.
181 sc_prohibit_quotearg_without_use:
182 @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
183 files=$$(grep -l '# *include "quotearg\.h"' \
184 $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
185 grep -LE '\<quotearg(_[^ ]+)? \(' $$files \
187 { echo "$(ME): the above files include "quotearg.h" but don't use it" \
188 1>&2; exit 1; } || :; \
192 # Don't include quote.h unless you use one of its functions.
193 sc_prohibit_quote_without_use:
194 @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
195 files=$$(grep -l '# *include "quote\.h"' \
196 $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
197 grep -LE '\<quote(_n)? \(' $$files \
199 { echo "$(ME): the above files include "quote.h" but don't use it" \
200 1>&2; exit 1; } || :; \
205 @grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
206 $$($(CVS_LIST_EXCEPT)) && \
207 { echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
210 # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
212 # Each nonempty line must start with a year number, or a TAB.
214 @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
215 { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
218 # Ensure that dd's definition of LONGEST_SYMBOL stays in sync
219 # with the strings from the two affected variables.
220 dd_c = $(srcdir)/src/dd.c
221 sc_dd_max_sym_length:
222 ifneq ($(wildcard $(dd_c)),)
223 @len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
224 sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
225 |sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
226 | wc --max-line-length); \
227 max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
228 |tr -d '"' | wc --max-line-length); \
229 if test "$$len" = "$$max"; then :; else \
230 echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
235 # Many m4 macros names once began with `jm_'.
236 # On 2004-04-13, they were all changed to start with gl_ instead.
237 # Make sure that none are inadvertently reintroduced.
238 sc_prohibit_jm_in_m4:
239 @grep -nE 'jm_[A-Z]' \
240 $$($(CVS_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \
241 { echo '$(ME): do not use jm_ in m4 macro names' \
246 && grep check-root tests/Makefile.am>/dev/null 2>&1; then \
247 t1=sc-root.expected; t2=sc-root.actual; \
248 grep -nl '^require_root_$$' \
249 $$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \
250 sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
251 $(srcdir)/tests/Makefile.am |sort > $$t2; \
252 diff -u $$t1 $$t2 || diff=1; \
255 && { echo 'tests/Makefile.am: missing check-root action'>&2; \
259 headers_with_interesting_macro_defs = \
270 # Create a list of regular expressions matching the names
271 # of macros that are guaranteed by parts of gnulib to be defined.
273 @(cd $(srcdir)/lib; \
274 for f in $(headers_with_interesting_macro_defs); do \
276 sed -n '/^# *define \([^_ (][^ (]*\)[ (].*/s//\1/p' $$f; \
279 | grep -Ev 'ATTRIBUTE_NORETURN|SIZE_MAX' \
280 | sed 's/^/^# *define /' \
284 # Don't define macros that we already get from gnulib header files.
285 sc_always_defined_macros: .re-defmac
286 @if test -f $(srcdir)/src/system.h; then \
287 trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0 1 2 3 15; \
288 grep -f .re-defmac $$($(CVS_LIST)) \
289 && { echo '$(ME): define the above via some gnulib .h file' \
290 1>&2; exit 1; } || :; \
293 # Create a list of regular expressions matching the names
294 # of files included from system.h. Exclude a couple.
296 @sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
297 | grep -Ev 'sys/(param|file)\.h' \
298 | sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
302 # Files in src/ should not include directly any of
303 # the headers already included via system.h.
304 sc_system_h_headers: .re-list
305 @if test -f $(srcdir)/src/system.h; then \
306 trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
307 grep -nE -f .re-list \
308 $$($(CVS_LIST) src | \
309 grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
310 && { echo '$(ME): the above are already included via system.h'\
311 1>&2; exit 1; } || :; \
316 'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
317 $$($(CVS_LIST_EXCEPT)) && \
318 { echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
322 @grep -ni '\<the ''the\>' $$($(CVS_LIST_EXCEPT)) && \
323 { echo '$(ME): found use of "the ''the";' 1>&2; \
330 @grep -n '[ ]$$' $$($(CVS_LIST_EXCEPT)) && \
331 { echo '$(ME): found trailing blank(s)' \
334 # Match lines like the following, but where there is only one space
335 # between the options and the description:
336 # -D, --all-repeated[=delimit-method] print all duplicate lines\n
337 longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
338 sc_two_space_separator_in_usage:
339 @grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
340 $$($(CVS_LIST_EXCEPT)) && \
341 { echo "$(ME): help2man requires at least two spaces between"; \
342 echo "$(ME): an option and its description"; \
345 # Look for diagnostics that aren't marked for translation.
346 # This won't find any for which error's format string is on a separate line.
347 sc_unmarked_diagnostics:
349 '\<error \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \
350 | grep -v '_''(' && \
351 { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
354 # Avoid useless parentheses like those in this example:
355 # #if defined (SYMBOL) || defined (SYM2)
356 sc_useless_cpp_parens:
357 @grep -n '^# *if .*defined *(' $$($(CVS_LIST_EXCEPT)) && \
358 { echo '$(ME): found useless parentheses in cpp directive' \
361 # Require the latest GPL.
363 @grep -n 'either ''version [^3]' $$($(CVS_LIST_EXCEPT)) && \
364 { echo '$(ME): GPL vN, N!=3' 1>&2; exit 1; } || :
366 # Ensure that the c99-to-c89 patch applies cleanly.
368 rm -rf src-c89 $@.1 $@.2
370 (cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \
372 if test "$$REGEN_PATCH" = yes; then \
373 diff -upr src src-c89 | sed 's,src-c89/,src/,' \
374 | grep -v '^Only in' > new-diff || : ; fi
375 grep -v '^patching file ' $@.1 > $@.2 || :
376 msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \
377 rm -f src-c89/*.o || msg='rm failed'; \
378 $(MAKE) -C src-c89 CFLAGS='-Wdeclaration-after-statement -Werror' \
379 || msg='compile failure with extra options'; \
380 test "$$msg" = ok && rm -rf src-c89 $@.1 $@.2 || echo "$$msg" 1>&2; \
383 # Ensure that date's --help output stays in sync with the info
384 # documentation for GNU strftime. The only exception is %N,
385 # which date accepts but GNU strftime does not.
386 extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
388 if test -f $(srcdir)/src/date.c; then \
389 grep '^ %. ' $(srcdir)/src/date.c | sort \
390 | $(extract_char) > $@-src; \
392 info libc date calendar format | grep '^ `%.'\' \
393 | $(extract_char); } | sort > $@-info; \
394 diff -u $@-src $@-info || exit 1; \
395 rm -f $@-src $@-info; \
401 # Ensure that we use only the standard $(VAR) notation,
402 # not @...@ in Makefile.am, now that we can rely on automake
403 # to emit a definition for each substituted variable.
405 grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
406 && { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
408 news-date-check: NEWS
409 today=`date +%Y-%m-%d`; \
410 if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
414 echo "version or today's date is not in NEWS" 1>&2; \
419 if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
423 echo "$(VERSION) not in ChangeLog" 1>&2; \
428 @grep -n 'AC_DEFUN([^[]' m4/*.m4 \
429 && { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
432 # Verify that all source files using _() are listed in po/POTFILES.in.
433 # FIXME: don't hard-code file names below; use a more general mechanism.
435 if test -f po/POTFILES.in; then \
436 grep -E -v '^(#|$$)' po/POTFILES.in \
437 | grep -v '^src/false\.c$$' | sort > $@-1; \
439 for file in $$($(CVS_LIST_EXCEPT)) lib/*.[ch]; do \
441 djgpp/* | man/*) continue;; \
442 */c99-to-c89.diff) continue;; \
446 base=`expr " $$file" : ' \(.*\)\..'`; \
447 { test -f $$base.l || test -f $$base.y; } && continue;; \
449 files="$$files $$file"; \
451 grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
453 diff -u $@-1 $@-2 || exit 1; \
457 # In a definition of #define AUTHORS "... and ..." where the RHS contains
458 # the English word `and', the string must be marked with `N_ (...)' so that
459 # gettext recognizes it as a string requiring translation.
461 @grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
462 { echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
465 # Sometimes it is useful to change the PATH environment variable
466 # in Makefiles. When doing so, it's better not to use the Unix-centric
467 # path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'.
468 # It'd be better to use `find -print0 ...|xargs -0 ...', but less portable,
469 # and there probably aren't many projects with so many Makefile.am files
470 # that we'd have to worry about limits on command line length.
471 msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
472 makefile_path_separator_check:
473 @grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
474 && { echo $(msg) 1>&2; exit 1; } || :
476 # Check that `make alpha' will not fail at the end of the process.
478 if test -d $(release_archive_dir); then :; else \
479 for file in $(distdir).tar.gz \
480 $(release_archive_dir)/$(distdir).tar.gz; do \
481 test -e $$file || continue; \
483 || { echo ERROR: $$file is not writable; fail=1; }; \
485 test "$$fail" && exit 1 || :
488 v_etc_file = lib/version-etc.c
489 sample-test = tests/sample-test
490 texi = doc/$(PACKAGE).texi
491 # Make sure that the copyright date in $(v_etc_file) is up to date.
492 # Do the same for the $(sample-test) and the main doc/.texi file.
494 @if test -f $(v_etc_file); then \
495 grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
497 || { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
500 @if test -f $(sample-test); then \
501 grep '# Copyright (C) '$$(date +%Y)' Free' $(sample-test) \
503 || { echo 'out of date copyright in $(sample-test); update it' 1>&2; \
506 @if test -f $(texi); then \
507 grep 'Copyright @copyright{} .*'$$(date +%Y)' Free' $(texi) \
509 || { echo 'out of date copyright in $(texi); update it' 1>&2; \
514 $(VC) diff > vc-diffs || :
515 if test -s vc-diffs; then \
517 echo "Some files are locally modified:" 1>&2; \
523 cvs-check: vc-diff-check
525 maintainer-distcheck:
530 # Don't make a distribution if checks fail.
531 # Also, make sure the NEWS file is up-to-date.
532 vc-dist: $(local-check) cvs-check maintainer-distcheck
535 # Use this to make sure we don't run these programs when building
536 # from a virgin tgz file, below.
537 null_AM_MAKEFLAGS = \
544 built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list)
546 warn_cflags = -Dlint -O -Werror -Wall -Wformat -Wshadow -Wpointer-arith
549 write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
551 # Use -Wformat -Werror to detect format-string/arg-list mismatches.
552 # Also, check for shadowing problems with -Wshadow, and for pointer
553 # arithmetic problems with -Wpointer-arith.
554 # These CFLAGS are pretty strict. If you build this target, you probably
555 # have to have a recent version of gcc and glibc headers.
556 # The for-loop below ensures that there is a bin/ directory full of all
557 # of the programs under test (except the few that are required for basic
558 # Makefile rules), all symlinked to the just-built "false" program.
559 # This is to ensure that if ever a test neglects to make PATH include
560 # the build srcdir, these always-failing programs will run.
561 # Otherwise, it is too easy to test the wrong programs.
562 # Note that "false" itself is a symlink to true, so it too will malfunction.
564 t=$(TMPDIR)/$(PACKAGE)/test
565 my-distcheck: $(local-check) check
568 GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
570 && ./configure --disable-nls \
571 && $(MAKE) CFLAGS='$(warn_cflags)' \
572 AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
575 && ($(write_loser)) > $(bin)/loser \
576 && chmod a+x $(bin)/loser \
577 && for i in $(built_programs); do \
579 rm|expr|basename|echo|sort|ls|tr);; \
580 cat|dirname|mv|wc);; \
581 *) ln $(bin)/loser $(bin)/$$i;; \
584 && ln -sf ../src/true $(bin)/false \
585 && PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \
586 && $(MAKE) -C gnulib-tests check \
589 (cd $(t) && mv $(distdir) $(distdir).old \
590 && $(AMTAR) -zxf - ) < $(distdir).tar.gz
591 diff -ur $(t)/$(distdir).old $(t)/$(distdir)
592 if test -f $(srcdir)/src/c99-to-c89.diff; then \
594 && (cd src && patch -V never --fuzz=0 <c99-to-c89.diff) \
595 && ./configure --disable-largefile \
596 CFLAGS='-Werror -ansi -Wno-long-long' \
600 @echo "========================"; \
601 echo "$(distdir).tar.gz is ready for distribution"; \
602 echo "========================"
608 tarz=/tmp/rel-check-tarz-$$$$; \
609 md5_tmp=/tmp/rel-check-md5-$$$$; \
611 trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
612 $(WGET) $(WGETFLAGS) -q --output-document=$$tarz $(url); \
613 echo "$(md5) -" > $$md5_tmp; \
614 md5sum -c $$md5_tmp < $$tarz
616 rel-files = $(DIST_ARCHIVES)
618 gnulib-version = $$(cd $(gnulib_dir) && git describe)
620 announcement: NEWS ChangeLog $(rel-files)
621 @./build-aux/announce-gen \
622 --release-type=$(RELEASE_TYPE) \
623 --package=$(PACKAGE) \
624 --prev=$(PREV_VERSION) \
626 --gpg-key-id=$(gpg_key_ID) \
628 --bootstrap-tools=autoconf,automake,bison,gnulib \
629 --gnulib-version=$(gnulib-version) \
630 $(addprefix --url-dir=, $(url_dir_list))
632 ## ---------------- ##
633 ## Updating files. ##
634 ## ---------------- ##
636 ftp-gnu = ftp://ftp.gnu.org/gnu
637 www-gnu = http://www.gnu.org
639 # Use mv, if you don't have/want move-if-change.
640 move_if_change ?= move-if-change
642 emit_upload_commands:
643 @echo =====================================
644 @echo =====================================
645 @echo "$(srcdir)/build-aux/gnupload $(GNUPLOADFLAGS) \\"
646 @echo " --to $(gnu_rel_host):$(PACKAGE) \\"
647 @echo " $(rel-files)"
648 @echo '# send the /tmp/announcement e-mail'
649 @echo =====================================
650 @echo =====================================
652 .PHONY: alpha beta major
653 alpha beta major: $(local-check) writable-files
655 && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
656 || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
659 $(MAKE) news-date-check changelog-check
660 $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
661 if test -d $(release_archive_dir); then \
662 ln $(rel-files) $(release_archive_dir); \
663 chmod a-w $(rel-files); \
665 $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
666 echo $(VERSION) > $(prev_version_file)
668 '$(prev_version_file): Record previous version: $(VERSION).' \