+2021-12-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ Move AM_V_GEN to recipe start
+ This is especially needed when building Emacs, as it uses
+ ‘AM_V_GEN=@$(info GEN $@)', which means the GEN line is output by
+ GNU make just before the recipe runs, regardless of where AM_V_GEN
+ appears in the recipe. And it’s also good practice even if the
+ default Automake ‘AM_V_GEN=@echo GEN $@;’ is used, as it’s better
+ to output the GEN line consistently at the start of every recipe,
+ even if this precedes a preparatory command that almost always
+ works silently.
+ * modules/arpa_inet, modules/dynarray, modules/net_if:
+ * modules/netinet_in, modules/scratch_buffer, modules/selinux-h:
+ * modules/sys_file, modules/sys_ioctl, modules/sys_random:
+ * modules/sys_resource, modules/sys_select, modules/sys_socket:
+ * modules/sys_stat, modules/sys_time, modules/sys_times:
+ * modules/sys_types, modules/sys_uio, modules/sys_utsname:
+ * modules/sys_wait, modules/unicase/special-casing, top/maint.mk:
+ Use AM_V_GEN only at the start of each recipe.
+
2021-12-21 Bruno Haible <bruno@clisp.org>
c-xvasprintf: Fix declarations (regression 2021-08-07).
# We need the following in order to create <arpa/inet.h> when the system
# doesn't have one.
arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/arpa'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/arpa'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
malloc/dynarray.gl.h: malloc/dynarray.h
- $(AM_V_at)$(MKDIR_P) '%reldir%/malloc'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \
} > $@-t && \
MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
- $(AM_V_at)$(MKDIR_P) '%reldir%/malloc'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
-e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
# doesn't have one.
if GL_GENERATE_NET_IF_H
net/if.h: net_if.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) '%reldir%/net'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/net'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# doesn't have one.
if GL_GENERATE_NETINET_IN_H
netinet/in.h: netinet_in.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) '%reldir%/netinet'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/netinet'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
BUILT_SOURCES += malloc/scratch_buffer.gl.h
malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h
- $(AM_V_at)$(MKDIR_P) '%reldir%/malloc'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \
-e 's|__glibc_likely|_GL_LIKELY|g' \
BUILT_SOURCES += selinux/selinux.h
selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) '%reldir%/selinux'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/selinux'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
BUILT_SOURCES += $(SELINUX_CONTEXT_H)
if GL_GENERATE_SELINUX_CONTEXT_H
selinux/context.h: se-context.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) '%reldir%/selinux'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/selinux'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
cat $(srcdir)/se-context.in.h; \
} > $@-t && \
BUILT_SOURCES += $(SELINUX_LABEL_H)
if GL_GENERATE_SELINUX_LABEL_H
selinux/label.h: se-label.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) '%reldir%/selinux'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/selinux'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
cat $(srcdir)/se-label.in.h; \
} > $@-t && \
# We need the following in order to create <sys/file.h> when the system
# has one that is incomplete.
sys/file.h: sys_file.in.h $(top_builddir)/config.status $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's/@''HAVE_SYS_FILE_H''@/$(HAVE_SYS_FILE_H)/g' \
# We need the following in order to create <sys/ioctl.h> when the system
# does not have a complete one.
sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \
# We need the following in order to create <sys/random.h> when the system
# doesn't have one.
sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# We need the following in order to create <sys/resource.h> when the system
# doesn't have one.
sys/resource.h: sys_resource.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# We need the following in order to create <sys/select.h> when the system
# doesn't have one that works with the given compiler.
sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler.
sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# We need the following in order to create <sys/stat.h> when the system
# has one that is incomplete.
sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# We need the following in order to create <sys/time.h> when the system
# doesn't have one that works with the given compiler.
sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
# We need the following in order to create <sys/times.h> when the system
# doesn't have one that works with the given compiler.
sys/times.h: sys_times.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's/@''HAVE_SYS_TIMES_H''@/$(HAVE_SYS_TIMES_H)/g' \
# We need the following in order to create <sys/types.h> when the system
# doesn't have one that works with the given compiler.
sys/types.h: sys_types.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# We need the following in order to create <sys/uio.h> when the system
# doesn't have one that works with the given compiler.
sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# We need the following in order to create <sys/utsname.h> when the system
# does not have one.
sys/utsname.h: sys_utsname.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's/@''HAVE_SYS_UTSNAME_H''@/$(HAVE_SYS_UTSNAME_H)/g' \
# We need the following in order to create <sys/wait.h> when the system
# has one that is incomplete.
sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
# Generate special-casing.h with a declaration that depends on the gperf version.
unicase/special-casing.h: unicase/special-casing.in.h unicase/special-casing-table.h
- $(AM_V_at)$(MKDIR_P) '%reldir%/unicase'
- $(AM_V_GEN)rm -f $@-t $@ && \
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/unicase'
+ $(AM_V_at)rm -f $@-t $@ && \
declaration=`grep '^gl_unicase_special_lookup' $(srcdir)/unicase/special-casing-table.h | sed -e 's/register //g'` && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e "/gl_unicase_special_lookup/s/gl_unicase_special_lookup.*/$${declaration};/" $(srcdir)/unicase/special-casing.in.h; \
release:
$(AM_V_GEN)$(MAKE) _version
- $(AM_V_GEN)$(MAKE) $(release-type)
+ $(AM_V_at)$(MAKE) $(release-type)
# Override this in cfg.mk if you follow different procedures.
release-prep-hook ?= release-prep