1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

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.
This commit is contained in:
Paul Eggert
2021-12-24 17:21:59 -08:00
parent 53cdf46161
commit 0f71c53437
6 changed files with 23 additions and 15 deletions

View File

@@ -1,5 +1,12 @@
2021-12-24 Paul Eggert <eggert@cs.ucla.edu>
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.
gen-header: new module
Simplify header generation by using Makefile variables
defined by a new gen-header module.

View File

@@ -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

View File

@@ -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 <features\.h>|__(?: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)

View File

@@ -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

View File

@@ -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)/\"

View File

@@ -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