From: Paul Eggert Date: Tue, 6 Aug 2024 03:43:36 +0000 (-0700) Subject: Don’t mishandle ‘\’ in VERSION X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=30651cfdd8f5942dbbbb5920a2f4a33797ee6a94;p=thirdparty%2Fautoconf.git Don’t mishandle ‘\’ in VERSION 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 ‘\’. --- diff --git a/Makefile.am b/Makefile.am index dadd2caf..14a81069 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/man/local.mk b/man/local.mk index 33e15971..c6ddabdf 100644 --- a/man/local.mk +++ b/man/local.mk @@ -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)"; \