From 02e842d27a2c4ec1e3c96f596f9ae33ec8ccaa80 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 23 Dec 2021 14:26:06 -0800 Subject: [PATCH 2/4] maint: break out '&& mv $@-t $@' * build-aux/git-version-gen, config/argz.mk, modules/configmake: * modules/posix_spawnp-tests, modules/snippet/link-warning: Break out '&& mv $@-t $@' to a separate line in the Make recipe, as this makes things a bit easier to debug. --- ChangeLog | 7 +++++++ build-aux/git-version-gen | 7 ++++--- config/argz.mk | 6 ++++-- modules/configmake | 4 ++-- modules/posix_spawnp-tests | 10 ++++------ modules/snippet/link-warning | 4 ++-- 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5a9c7b21..d36eada04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2021-12-23 Paul Eggert + maint: break out '&& mv $@-t $@' + * build-aux/git-version-gen, config/argz.mk, modules/configmake: + * modules/posix_spawnp-tests, modules/snippet/link-warning: + * top/maint.mk: + Break out '&& mv $@-t $@' to a separate line in the Make recipe, + as this makes things a bit easier to debug. + sed-header: new module Simplify header generation by using Makefile variables defined by a new sed-header module. diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index da525aa54..a16f1157b 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,6 +1,6 @@ #!/bin/sh # Print a version string. -scriptversion=2019-10-13.15; # UTC +scriptversion=2021-12-22.22; # UTC # Copyright (C) 2007-2021 Free Software Foundation, Inc. # @@ -65,9 +65,10 @@ scriptversion=2019-10-13.15; # UTC # EXTRA_DIST = $(top_srcdir)/.version # BUILT_SOURCES = $(top_srcdir)/.version # $(top_srcdir)/.version: -# echo $(VERSION) > $@-t && mv $@-t $@ +# echo '$(VERSION)' > $@-t +# mv $@-t $@ # dist-hook: -# echo $(VERSION) > $(distdir)/.tarball-version +# echo '$(VERSION)' > $(distdir)/.tarball-version me=$0 diff --git a/config/argz.mk b/config/argz.mk index 1d6d60b9d..87bf02474 100644 --- a/config/argz.mk +++ b/config/argz.mk @@ -46,7 +46,8 @@ argz.c: $(argz_files) perl -pe 's/__(argz_|st|mem)/$$1/g' $$i \ | perl -0x0 -pe 's,/\*(.|\n)+?\*/\n,,' \ | grep -vE '^(#include|INTDEF|weak_alias|libc_hidden_def)'; \ - done) > $@-t && mv $@-t $@ + done) > $@-t + mv $@-t $@ argz.in.h: $(glibc_dir)/string/argz.h perl -pe 's/__(restrict|const|st|mem)/$$1/g;' \ @@ -57,7 +58,8 @@ argz.in.h: $(glibc_dir)/string/argz.h '/^(#include |__(?:BEGIN|END)_DECLS)/ or print' \ | perl -0x3b -pe 's/extern \S+ \*?__argz_(.|\n)*?\)\n*;//' \ | perl -pe 's/__(argz_next)/$$1/g;' \ - > $@-t && mv $@-t $@ + > $@-t + mv $@-t $@ clean: rm -f $(targets) diff --git a/modules/configmake b/modules/configmake index 5de3434cd..398b63525 100644 --- a/modules/configmake +++ b/modules/configmake @@ -50,8 +50,8 @@ configmake.h: Makefile echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - mv $@-t $@ + } | sed '/""/d' > $@-t + $(AM_V_at)mv $@-t $@ BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t diff --git a/modules/posix_spawnp-tests b/modules/posix_spawnp-tests index 79f5d48c8..4ac569e31 100644 --- a/modules/posix_spawnp-tests +++ b/modules/posix_spawnp-tests @@ -42,16 +42,14 @@ check_PROGRAMS += \ BUILT_SOURCES += test-posix_spawn-dup2-stdout.sh test-posix_spawn-dup2-stdout.sh: test-posix_spawn-dup2-stdout.in.sh - $(AM_V_GEN) - cp $(srcdir)/test-posix_spawn-dup2-stdout.in.sh $@-t && \ - mv $@-t $@ + $(AM_V_GEN)cp $(srcdir)/test-posix_spawn-dup2-stdout.in.sh $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += test-posix_spawn-dup2-stdout.sh test-posix_spawn-dup2-stdout.sh-t BUILT_SOURCES += test-posix_spawn-dup2-stdin.sh test-posix_spawn-dup2-stdin.sh: test-posix_spawn-dup2-stdin.in.sh - $(AM_V_GEN) - cp $(srcdir)/test-posix_spawn-dup2-stdin.in.sh $@-t && \ - mv $@-t $@ + $(AM_V_GEN)cp $(srcdir)/test-posix_spawn-dup2-stdin.in.sh $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += test-posix_spawn-dup2-stdin.sh test-posix_spawn-dup2-stdin.sh-t test_posix_spawnp_script_CPPFLAGS = $(AM_CPPFLAGS) -DSRCDIR=\"$(srcdir)/\" diff --git a/modules/snippet/link-warning b/modules/snippet/link-warning index f587fc685..611c108c1 100644 --- a/modules/snippet/link-warning +++ b/modules/snippet/link-warning @@ -30,8 +30,8 @@ link-warning.h: $(top_srcdir)/build-aux/snippet/link-warning.h $(AM_V_at)sed -n -e '/HAVE_FEATURES_H/,$$p' \ < $(top_srcdir)/build-aux/snippet/link-warning.h \ | sed -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - > $@-t && \ - mv $@-t $@ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += link-warning.h link-warning.h-t LINK_WARNING_H=link-warning.h -- 2.32.0