]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Don’t mishandle ‘\’ in VERSION
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Aug 2024 03:43:36 +0000 (20:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 7 Aug 2024 00:59:36 +0000 (17:59 -0700)
This is minor, it’s just allowing more chars (though not all)
in $(VERSION).
* Makefile.am (edit, top_srcdir.version, dist-hook)
(check-coverage-report):
* man/local.mk (VERSION):
Work even if VERSION contains ‘\’.

Makefile.am
man/local.mk

index dadd2caf3d9bf9baf753df9e3d237b309e16bf36..14a810690058d8bd789c0e90402a978ea40acc86 100644 (file)
@@ -52,7 +52,7 @@ edit = sed \
        -e 's|@M4_GNU[@]|$(M4_GNU)|g' \
        -e 's|@AWK[@]|$(AWK)|g' \
        -e 's|@RELEASE_YEAR[@]|$(RELEASE_YEAR)|g' \
-       -e 's|@VERSION[@]|$(VERSION)|g' \
+       -e 's'\''@VERSION[@]'\''$(VERSION)'\''g' \
        -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
        -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
 
@@ -115,12 +115,12 @@ ChangeLog:
 #   want to depend on config.h but do want to track version changes.
 BUILT_SOURCES = $(top_srcdir)/.version
 $(top_srcdir)/.version:
-       echo $(VERSION) > $@-t && mv $@-t $@
+       printf '%s\n' '$(VERSION)' > $@-t && mv $@-t $@
 
 # Arrange so that .tarball-version appears only in distribution tarballs,
 # never in a checked-out repository.
 dist-hook: gen-ChangeLog
-       echo $(VERSION) > $(distdir)/.tarball-version
+       printf '%s\n' '$(VERSION)' > $(distdir)/.tarball-version
 
 # Arrange to remove the symlink to GNUmakefile in VPATH builds.
 # TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed.
@@ -151,8 +151,8 @@ check-coverage-run: all
 
 check-coverage-report:
        @if test ! -d $(PERL_COVERAGE_DB); then \
-         echo "No coverage database found in '$(PERL_COVERAGE_DB)'." >&2; \
-         echo "Please run '$(MAKE) check-coverage' first" >&2; \
+         printf '%s\n' "No coverage database in '$(PERL_COVERAGE_DB)'." >&2; \
+         printf '%s\n' "Please run '$(MAKE) check-coverage' first" >&2; \
          exit 1; \
        fi
        $(PERL_COVER) $(PERL_COVERAGE_DB) $(PERL_COVER_FLAGS)
index 33e1597175bf608a893e32bca4f87498a9b1e854..c6ddabdfbebb92b6aa6caa4e2a328cf7d84ab16d 100644 (file)
@@ -79,7 +79,7 @@ SUFFIXES += .w .1
        PATH="$(top_srcdir)/man$(PATH_SEPARATOR)$$PATH"; \
        PERL="$(PERL)"; \
        PACKAGE_NAME="$(PACKAGE_NAME)"; \
-       VERSION="$(VERSION)"; \
+       VERSION='$(VERSION)'; \
        RELEASE_YEAR="$(RELEASE_YEAR)"; \
        top_srcdir="$(top_srcdir)"; \
        channeldefs_pm="$(channeldefs_pm)"; \