projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
maint.mk: fix "release" target to build _version
[gnulib.git]
/
top
/
maint.mk
diff --git
a/top/maint.mk
b/top/maint.mk
index
cd365e7
..
bf8f53a
100644
(file)
--- a/
top/maint.mk
+++ b/
top/maint.mk
@@
-2,7
+2,7
@@
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
-## Copyright (C) 2001-201
2
Free Software Foundation, Inc.
+## Copyright (C) 2001-201
3
Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@
-155,7
+155,7
@@
export LC_ALL = C
## Sanity checks. ##
## --------------- ##
## Sanity checks. ##
## --------------- ##
-_cfg_mk := $(
shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk'
)
+_cfg_mk := $(
wildcard $(srcdir)/cfg.mk
)
# Collect the names of rules starting with 'sc_'.
syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
# Collect the names of rules starting with 'sc_'.
syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
@@
-809,7
+809,7
@@
sc_prohibit_always_true_header_tests:
$(_sc_search_regexp)
sc_prohibit_defined_have_decl_tests:
$(_sc_search_regexp)
sc_prohibit_defined_have_decl_tests:
- @prohibit='
#[ ]*if(n?def|.*\<defined)\>[
(]+HAVE_DECL_' \
+ @prohibit='
(#[ ]*ifn?def|\<defined)\>[
(]+HAVE_DECL_' \
halt='HAVE_DECL macros are always defined' \
$(_sc_search_regexp)
halt='HAVE_DECL macros are always defined' \
$(_sc_search_regexp)
@@
-1283,7
+1283,7
@@
vc-diff-check:
rel-files = $(DIST_ARCHIVES)
gnulib_dir ?= $(srcdir)/gnulib
rel-files = $(DIST_ARCHIVES)
gnulib_dir ?= $(srcdir)/gnulib
-gnulib-version = $$(cd $(gnulib_dir) && git
describe
)
+gnulib-version = $$(cd $(gnulib_dir) && git
rev-parse --short HEAD
)
bootstrap-tools ?= autoconf,automake,gnulib
# If it's not already specified, derive the GPG key ID from
bootstrap-tools ?= autoconf,automake,gnulib
# If it's not already specified, derive the GPG key ID from
@@
-1315,7
+1315,7
@@
announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
announcement: NEWS ChangeLog $(rel-files)
# Not $(AM_V_GEN) since the output of this command serves as
announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
announcement: NEWS ChangeLog $(rel-files)
# Not $(AM_V_GEN) since the output of this command serves as
-# annoucement message: it would start with " GEN announcement".
+# annou
n
cement message: it would start with " GEN announcement".
$(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
--release-type=$(release-type) \
$(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
--release-type=$(release-type) \
@@
-1370,7
+1370,8
@@
endef
.PHONY: no-submodule-changes
no-submodule-changes:
.PHONY: no-submodule-changes
no-submodule-changes:
- $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
diff=$$(cd $(srcdir) && git submodule -q foreach \
git diff-index --name-only HEAD) \
|| exit 1; \
diff=$$(cd $(srcdir) && git submodule -q foreach \
git diff-index --name-only HEAD) \
|| exit 1; \
@@
-1388,7
+1389,8
@@
submodule-checks ?= no-submodule-changes public-submodule-commit
# cannot be built from a fresh clone.
.PHONY: public-submodule-commit
public-submodule-commit:
# cannot be built from a fresh clone.
.PHONY: public-submodule-commit
public-submodule-commit:
- $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
cd $(srcdir) && \
git submodule --quiet foreach \
test '"$$(git rev-parse "$$sha1")"' \
cd $(srcdir) && \
git submodule --quiet foreach \
test '"$$(git rev-parse "$$sha1")"' \
@@
-1422,6
+1424,7
@@
alpha beta stable: $(local-check) writable-files $(submodule-checks)
$(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
release:
$(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
release:
+ $(AM_V_GEN)$(MAKE) _version
$(AM_V_GEN)$(MAKE) $(release-type)
# Override this in cfg.mk if you follow different procedures.
$(AM_V_GEN)$(MAKE) $(release-type)
# Override this in cfg.mk if you follow different procedures.