From a31740110bfcb31f03f526d2beea12b881e24444 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 23 Dec 2021 14:20:52 -0800 Subject: [PATCH 1/4] sed-header: new module Simplify header generation by using Makefile variables defined by a new sed-header module. * modules/sed-header: New module. * modules/alloca-opt, modules/argz, modules/arpa_inet: * modules/assert-h, modules/byteswap: * modules/ctype, modules/dirent, modules/dynarray, modules/errno: * modules/execinfo, modules/fcntl-h, modules/float: * modules/fnmatch-h, modules/getopt-posix, modules/glob-h: * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete: * modules/langinfo, modules/libtextstyle-optional, modules/limits-h: * modules/locale, modules/malloc-h, modules/math, modules/monetary: * modules/net_if, modules/netdb, modules/netinet_in: * modules/openmp-init, modules/poll-h: * modules/pthread-h, modules/pty, modules/sched: * modules/scratch_buffer, modules/search, modules/selinux-h: * modules/signal-h, modules/sigsegv: * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool: * modules/stddef, modules/stdint, modules/stdio, modules/stdlib: * modules/stdnoreturn, modules/string, modules/strings: * 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/sysexits, modules/termios: * modules/threads-h, modules/time, modules/uchar: * modules/unicase/base, modules/unicase/special-casing: * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base: * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base: * modules/unistd, modules/unistdio/base, modules/unistr/base: * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base: * modules/utime-h, modules/wchar, modules/wctype-h: Depend on sed-header, and use its macros to simplify header generation. --- ChangeLog | 37 ++++++++++++++++++++++++++++++++++ modules/alloca-opt | 9 +++++---- modules/argz | 7 +++---- modules/arpa_inet | 10 ++++----- modules/assert-h | 9 +++++---- modules/byteswap | 7 +++---- modules/ctype | 10 ++++----- modules/dirent | 10 ++++----- modules/dynarray | 18 ++++++++--------- modules/errno | 10 ++++----- modules/execinfo | 7 +++---- modules/fcntl-h | 10 ++++----- modules/float | 10 ++++----- modules/fnmatch-h | 10 ++++----- modules/getopt-posix | 19 +++++++++-------- modules/glob-h | 19 +++++++++-------- modules/iconv-h | 10 ++++----- modules/ieee754-h | 10 ++++----- modules/inttypes-incomplete | 10 ++++----- modules/langinfo | 10 ++++----- modules/libtextstyle-optional | 7 +++---- modules/limits-h | 10 ++++----- modules/locale | 10 ++++----- modules/malloc-h | 10 ++++----- modules/math | 11 +++++----- modules/monetary | 10 ++++----- modules/net_if | 10 ++++----- modules/netdb | 10 ++++----- modules/netinet_in | 10 ++++----- modules/openmp-init | 10 ++++----- modules/poll-h | 10 ++++----- modules/pthread-h | 11 +++++----- modules/pty | 10 ++++----- modules/sched | 10 ++++----- modules/scratch_buffer | 10 ++++----- modules/search | 10 ++++----- modules/sed-header | 36 +++++++++++++++++++++++++++++++++ modules/selinux-h | 22 +++++++++----------- modules/signal-h | 10 ++++----- modules/sigsegv | 7 +++---- modules/spawn | 10 ++++----- modules/stdalign | 7 +++---- modules/stdarg | 10 ++++----- modules/stdbool | 9 +++++---- modules/stddef | 10 ++++----- modules/stdint | 10 ++++----- modules/stdio | 11 +++++----- modules/stdlib | 11 +++++----- modules/stdnoreturn | 10 ++++----- modules/string | 12 +++++------ modules/strings | 10 ++++----- modules/sys_file | 10 ++++----- modules/sys_ioctl | 10 ++++----- modules/sys_random | 10 ++++----- modules/sys_resource | 10 ++++----- modules/sys_select | 10 ++++----- modules/sys_socket | 10 ++++----- modules/sys_stat | 10 ++++----- modules/sys_time | 10 ++++----- modules/sys_times | 10 ++++----- modules/sys_types | 10 ++++----- modules/sys_uio | 10 ++++----- modules/sys_utsname | 10 ++++----- modules/sys_wait | 10 ++++----- modules/sysexits | 10 ++++----- modules/termios | 10 ++++----- modules/threads-h | 10 ++++----- modules/time | 10 ++++----- modules/uchar | 10 ++++----- modules/unicase/base | 7 +++---- modules/unicase/special-casing | 9 +++++---- modules/uniconv/base | 7 +++---- modules/unictype/base | 7 +++---- modules/unigbrk/base | 7 +++---- modules/unilbrk/base | 7 +++---- modules/uniname/base | 7 +++---- modules/uninorm/base | 7 +++---- modules/unistd | 11 +++++----- modules/unistdio/base | 7 +++---- modules/unistr/base | 7 +++---- modules/unitypes | 7 +++---- modules/uniwbrk/base | 7 +++---- modules/uniwidth/base | 7 +++---- modules/utime-h | 10 ++++----- modules/wchar | 11 +++++----- modules/wctype-h | 10 ++++----- 86 files changed, 480 insertions(+), 421 deletions(-) create mode 100644 modules/sed-header diff --git a/ChangeLog b/ChangeLog index 719a934ae..e5a9c7b21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +2021-12-23 Paul Eggert + + sed-header: new module + Simplify header generation by using Makefile variables + defined by a new sed-header module. + * modules/sed-header: New module. + * modules/alloca-opt, modules/argz, modules/arpa_inet: + * modules/assert-h, modules/byteswap: + * modules/ctype, modules/dirent, modules/dynarray, modules/errno: + * modules/execinfo, modules/fcntl-h, modules/float: + * modules/fnmatch-h, modules/getopt-posix, modules/glob-h: + * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete: + * modules/langinfo, modules/libtextstyle-optional, modules/limits-h: + * modules/locale, modules/malloc-h, modules/math, modules/monetary: + * modules/net_if, modules/netdb, modules/netinet_in: + * modules/openmp-init, modules/poll-h: + * modules/pthread-h, modules/pty, modules/sched: + * modules/scratch_buffer, modules/search, modules/selinux-h: + * modules/signal-h, modules/sigsegv: + * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool: + * modules/stddef, modules/stdint, modules/stdio, modules/stdlib: + * modules/stdnoreturn, modules/string, modules/strings: + * 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/sysexits, modules/termios: + * modules/threads-h, modules/time, modules/uchar: + * modules/unicase/base, modules/unicase/special-casing: + * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base: + * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base: + * modules/unistd, modules/unistdio/base, modules/unistr/base: + * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base: + * modules/utime-h, modules/wchar, modules/wctype-h: + Depend on sed-header, and use its macros to simplify + header generation. + 2021-12-22 Paul Eggert libgmp: omit redundant 'mkdir -p .' diff --git a/modules/alloca-opt b/modules/alloca-opt index b8ab4217c..b29d59d67 100644 --- a/modules/alloca-opt +++ b/modules/alloca-opt @@ -8,6 +8,7 @@ lib/alloca.in.h m4/alloca.m4 Depends-on: +sed-header configure.ac: gl_FUNC_ALLOCA @@ -23,10 +24,10 @@ if GL_GENERATE_ALLOCA_H alloca.h: alloca.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' \ + $(srcdir)/alloca.in.h > $@-t + $(AM_V_at)mv $@-t $@ else alloca.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/argz b/modules/argz index cb85d9866..396b48f13 100644 --- a/modules/argz +++ b/modules/argz @@ -7,6 +7,7 @@ lib/argz.c m4/argz.m4 Depends-on: +sed-header memmove [test -n "$ARGZ_H"] mempcpy [test -n "$ARGZ_H"] stpcpy [test -n "$ARGZ_H"] @@ -31,10 +32,8 @@ if GL_GENERATE_ARGZ_H argz.h: argz.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/argz.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/argz.in.h + $(AM_V_at)mv $@-t $@ else argz.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/arpa_inet b/modules/arpa_inet index 51b14f160..1fe832975 100644 --- a/modules/arpa_inet +++ b/modules/arpa_inet @@ -9,6 +9,7 @@ m4/socklen.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ BUILT_SOURCES += arpa/inet.h # 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_GEN)$(MKDIR_P) '%reldir%/arpa' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -44,9 +45,8 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/arpa_inet.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/arpa_inet.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t MOSTLYCLEANDIRS += arpa diff --git a/modules/assert-h b/modules/assert-h index ad3566bfa..c2ff5ebdc 100644 --- a/modules/assert-h +++ b/modules/assert-h @@ -8,6 +8,7 @@ m4/assert_h.m4 Depends-on: include_next +sed-header configure.ac: gl_ASSERT_H @@ -23,8 +24,8 @@ if GL_GENERATE_ASSERT_H assert.h: assert.in.h verify.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + $(AM_V_at){ $(SED_HEADER_STDOUT) \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \ @@ -34,8 +35,8 @@ assert.h: assert.in.h verify.h $(top_builddir)/config.status -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \ -e 's|_GL\(_STATIC_ASSERT_H\)|_${gl_include_guard_prefix}\1|g' \ < $(srcdir)/verify.h; \ - } > $@-t && \ - mv $@-t $@ + } > $@-t + $(AM_V_at)mv $@-t $@ else assert.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/byteswap b/modules/byteswap index 6e9af748a..f22fe3f99 100644 --- a/modules/byteswap +++ b/modules/byteswap @@ -6,6 +6,7 @@ lib/byteswap.in.h m4/byteswap.m4 Depends-on: +sed-header configure.ac: gl_BYTESWAP @@ -21,10 +22,8 @@ if GL_GENERATE_BYTESWAP_H byteswap.h: byteswap.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/byteswap.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/byteswap.in.h + $(AM_V_at)mv $@-t $@ else byteswap.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/ctype b/modules/ctype index 10d6db43b..4090e1e51 100644 --- a/modules/ctype +++ b/modules/ctype @@ -8,6 +8,7 @@ m4/ctype_h.m4 Depends-on: extern-inline include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += ctype.h ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -34,9 +35,8 @@ ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/ctype.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/ctype.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += ctype.h ctype.h-t Include: diff --git a/modules/dirent b/modules/dirent index 0a0989dff..1b96c73c9 100644 --- a/modules/dirent +++ b/modules/dirent @@ -9,6 +9,7 @@ m4/pid_t.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ BUILT_SOURCES += dirent.h dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -57,9 +58,8 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/dirent.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/dirent.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += dirent.h dirent.h-t Include: diff --git a/modules/dynarray b/modules/dynarray index 3e5a98425..45013bed3 100644 --- a/modules/dynarray +++ b/modules/dynarray @@ -15,6 +15,7 @@ Depends-on: c99 builtin-expect libc-config +sed-header stdbool stddef intprops @@ -27,24 +28,23 @@ BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h malloc/dynarray.gl.h: malloc/dynarray.h $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e '/libc_hidden_proto/d' \ + $(srcdir)/malloc/dynarray.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|||g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|||g' \ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \ -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \ -e 's|__glibc_likely|_GL_LIKELY|g' \ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ - < $(srcdir)/malloc/dynarray-skeleton.c; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/malloc/dynarray-skeleton.c > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t lib_SOURCES += malloc/dynarray_at_failure.c \ diff --git a/modules/errno b/modules/errno index e3f1dc01c..af5264d0c 100644 --- a/modules/errno +++ b/modules/errno @@ -7,6 +7,7 @@ m4/errno_h.m4 Depends-on: include_next +sed-header configure.ac: gl_HEADER_ERRNO_H @@ -22,8 +23,8 @@ if GL_GENERATE_ERRNO_H errno.h: errno.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -34,9 +35,8 @@ errno.h: errno.in.h $(top_builddir)/config.status -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/errno.in.h > $@-t + $(AM_V_at)mv $@-t $@ else errno.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/execinfo b/modules/execinfo index 779669fa5..7de0be74f 100644 --- a/modules/execinfo +++ b/modules/execinfo @@ -8,6 +8,7 @@ m4/execinfo.m4 Depends-on: extern-inline +sed-header configure.ac: gl_EXECINFO_H @@ -26,10 +27,8 @@ if GL_GENERATE_EXECINFO_H execinfo.h: execinfo.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/execinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/execinfo.in.h + $(AM_V_at)mv $@-t $@ else execinfo.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/fcntl-h b/modules/fcntl-h index a80e6bd45..3dbc1010b 100644 --- a/modules/fcntl-h +++ b/modules/fcntl-h @@ -10,6 +10,7 @@ m4/pid_t.m4 Depends-on: extensions include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -29,8 +30,8 @@ BUILT_SOURCES += fcntl.h fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -51,9 +52,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/fcntl.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/fcntl.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += fcntl.h fcntl.h-t Include: diff --git a/modules/float b/modules/float index 6551e454b..e9b35701f 100644 --- a/modules/float +++ b/modules/float @@ -9,6 +9,7 @@ m4/float_h.m4 Depends-on: include_next +sed-header configure.ac: gl_FLOAT_H @@ -30,16 +31,15 @@ if GL_GENERATE_FLOAT_H float.h: float.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ - < $(srcdir)/float.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/float.in.h > $@-t + $(AM_V_at)mv $@-t $@ else float.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/fnmatch-h b/modules/fnmatch-h index 260bbd575..305f5fe85 100644 --- a/modules/fnmatch-h +++ b/modules/fnmatch-h @@ -8,6 +8,7 @@ m4/fnmatch_h.m4 Depends-on: extensions include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ if GL_GENERATE_FNMATCH_H fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -39,9 +40,8 @@ fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/fnmatch.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/fnmatch.in.h > $@-t + $(AM_V_at)mv $@-t $@ else fnmatch.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/getopt-posix b/modules/getopt-posix index d6704e7c2..c3b3d831b 100644 --- a/modules/getopt-posix +++ b/modules/getopt-posix @@ -18,6 +18,7 @@ unistd extensions include_next gettext-h [test $REPLACE_GETOPT = 1] +sed-header snippet/arg-nonnull configure.ac: @@ -43,17 +44,16 @@ if GL_GENERATE_GETOPT_H getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/getopt.in.h > $@-t + $(AM_V_at)mv $@-t $@ else getopt.h: $(top_builddir)/config.status rm -f $@ @@ -61,11 +61,10 @@ endif if GL_GENERATE_GETOPT_CDEFS_H getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status - $(AM_V_GEN){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ - < $(srcdir)/getopt-cdefs.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_GEN)$(SED_HEADER_STDOUT) \ + -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ + $(srcdir)/getopt-cdefs.in.h > $@-t + $(AM_V_at)mv $@-t $@ else getopt-cdefs.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/glob-h b/modules/glob-h index 97dd26543..2663c6d0a 100644 --- a/modules/glob-h +++ b/modules/glob-h @@ -9,6 +9,7 @@ m4/glob_h.m4 Depends-on: extensions include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -30,8 +31,8 @@ if GL_GENERATE_GLOB_H glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_GLOB_H''@|$(HAVE_GLOB_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -45,9 +46,8 @@ glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/glob.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/glob.in.h > $@-t + $(AM_V_at)mv $@-t $@ else glob.h: $(top_builddir)/config.status rm -f $@ @@ -57,8 +57,8 @@ MOSTLYCLEANFILES += glob.h glob.h-t BUILT_SOURCES += glob-libc.gl.h glob-libc.gl.h: glob-libc.h - $(AM_V_GEN){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/__BEGIN_DECLS/{ s/__BEGIN_DECLS/#ifdef __cplusplus%extern "C" {%#endif/; y/%/\n/; }' \ + $(AM_V_GEN)$(SED_HEADER_STDOUT) \ + -e '/__BEGIN_DECLS/{ s/__BEGIN_DECLS/#ifdef __cplusplus%extern "C" {%#endif/; y/%/\n/; }' \ -e '/__END_DECLS/{ s/__END_DECLS/#ifdef __cplusplus%}%#endif/; y/%/\n/; }' \ -e 's|__THROWNL||g' \ -e 's|__THROW||g' \ @@ -66,9 +66,8 @@ glob-libc.gl.h: glob-libc.h -e 's|defined __USE_MISC|1|' \ -e 's|ifdef __USE_GNU|if 1|' \ -e 's|ifdef __USE_LARGEFILE64|if 0|' \ - < $(srcdir)/glob-libc.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/glob-libc.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += glob-libc.gl.h glob-libc.gl.h-t diff --git a/modules/iconv-h b/modules/iconv-h index 41579fb54..3720c4cc0 100644 --- a/modules/iconv-h +++ b/modules/iconv-h @@ -7,6 +7,7 @@ m4/iconv_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ if GL_GENERATE_ICONV_H iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -40,9 +41,8 @@ iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/iconv.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/iconv.in.h > $@-t + $(AM_V_at)mv $@-t $@ else iconv.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/ieee754-h b/modules/ieee754-h index 124f368cf..9b672fc47 100644 --- a/modules/ieee754-h +++ b/modules/ieee754-h @@ -6,6 +6,7 @@ lib/ieee754.in.h m4/ieee754-h.m4 Depends-on: +sed-header configure.ac: gl_IEEE754_H @@ -21,11 +22,10 @@ if GL_GENERATE_IEEE754_H ieee754.h: ieee754.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/ifndef _GL_GNULIB_HEADER/if 0/g' \ - $(srcdir)/ieee754.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's/ifndef _GL_GNULIB_HEADER/if 0/g' \ + $(srcdir)/ieee754.in.h > $@-t + $(AM_V_at)mv $@-t $@ else ieee754.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/inttypes-incomplete b/modules/inttypes-incomplete index 71165720d..ddfecb5f5 100644 --- a/modules/inttypes-incomplete +++ b/modules/inttypes-incomplete @@ -7,6 +7,7 @@ m4/inttypes.m4 Depends-on: include_next +sed-header multiarch snippet/arg-nonnull snippet/c++defs @@ -26,8 +27,8 @@ BUILT_SOURCES += inttypes.h inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -52,9 +53,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/inttypes.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/inttypes.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t Include: diff --git a/modules/langinfo b/modules/langinfo index d6b74c9aa..1fce5ce00 100644 --- a/modules/langinfo +++ b/modules/langinfo @@ -8,6 +8,7 @@ m4/langinfo_h.m4 Depends-on: extensions include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += langinfo.h langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -41,9 +42,8 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/langinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/langinfo.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += langinfo.h langinfo.h-t Include: diff --git a/modules/libtextstyle-optional b/modules/libtextstyle-optional index 0a5163929..c1ae8a0ed 100644 --- a/modules/libtextstyle-optional +++ b/modules/libtextstyle-optional @@ -7,6 +7,7 @@ m4/libtextstyle-optional.m4 Depends-on: libtextstyle +sed-header stdbool stdio unistd @@ -30,10 +31,8 @@ if GL_GENERATE_TEXTSTYLE_H textstyle.h: textstyle.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/textstyle.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/textstyle.in.h + $(AM_V_at)mv $@-t $@ else textstyle.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/limits-h b/modules/limits-h index 9fc0a2e4c..eae031a92 100644 --- a/modules/limits-h +++ b/modules/limits-h @@ -7,6 +7,7 @@ m4/limits-h.m4 Depends-on: include_next +sed-header configure.ac: gl_LIMITS_H @@ -22,15 +23,14 @@ if GL_GENERATE_LIMITS_H limits.h: limits.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ - < $(srcdir)/limits.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/limits.in.h > $@-t + $(AM_V_at)mv $@-t $@ else limits.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/locale b/modules/locale index 60bfbe669..f1d577c83 100644 --- a/modules/locale +++ b/modules/locale @@ -8,6 +8,7 @@ m4/locale_h.m4 Depends-on: extensions include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ BUILT_SOURCES += locale.h locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -51,9 +52,8 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/locale.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/locale.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += locale.h locale.h-t Include: diff --git a/modules/malloc-h b/modules/malloc-h index 3d7afad15..48ddf35d5 100644 --- a/modules/malloc-h +++ b/modules/malloc-h @@ -7,6 +7,7 @@ m4/malloc_h.m4 Depends-on: include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -22,8 +23,8 @@ BUILT_SOURCES += malloc.h malloc.h: malloc.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_MALLOC_H''@|$(HAVE_MALLOC_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -34,9 +35,8 @@ malloc.h: malloc.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H -e 's|@''REPLACE_MEMALIGN''@|$(REPLACE_MEMALIGN)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/malloc.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/malloc.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc.h malloc.h-t Include: diff --git a/modules/math b/modules/math index e62ee4409..c94f39d62 100644 --- a/modules/math +++ b/modules/math @@ -9,6 +9,7 @@ m4/math_h.m4 Depends-on: extern-inline include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -28,8 +29,8 @@ lib_SOURCES += math.c math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -316,9 +317,9 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += math.h math.h-t Include: diff --git a/modules/monetary b/modules/monetary index 1b1b91d4c..807859d67 100644 --- a/modules/monetary +++ b/modules/monetary @@ -7,6 +7,7 @@ m4/monetary_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ if GL_GENERATE_MONETARY_H monetary.h: monetary.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_MONETARY_H''@|$(HAVE_MONETARY_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -40,9 +41,8 @@ monetary.h: monetary.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/monetary.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/monetary.in.h > $@-t + $(AM_V_at)mv $@-t $@ else monetary.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/net_if b/modules/net_if index cc1b27f55..ee651ef3f 100644 --- a/modules/net_if +++ b/modules/net_if @@ -7,6 +7,7 @@ m4/net_if_h.m4 Depends-on: include_next +sed-header sys_socket configure.ac: @@ -22,16 +23,15 @@ BUILT_SOURCES += $(NET_IF_H) if GL_GENERATE_NET_IF_H net/if.h: net_if.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) '%reldir%/net' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_NET_IF_H''@|$(NEXT_NET_IF_H)|g' \ -e 's|@''HAVE_NET_IF_H''@|$(HAVE_NET_IF_H)|g' \ - < $(srcdir)/net_if.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/net_if.in.h > $@-t + $(AM_V_at)mv $@-t $@ else net/if.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/netdb b/modules/netdb index be8280c86..ddfce7b5a 100644 --- a/modules/netdb +++ b/modules/netdb @@ -7,6 +7,7 @@ m4/netdb_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -25,8 +26,8 @@ BUILT_SOURCES += netdb.h netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -43,9 +44,8 @@ netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/netdb.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/netdb.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += netdb.h netdb.h-t Include: diff --git a/modules/netinet_in b/modules/netinet_in index f97e24b75..2de9f0048 100644 --- a/modules/netinet_in +++ b/modules/netinet_in @@ -7,6 +7,7 @@ m4/netinet_in_h.m4 Depends-on: include_next +sed-header sys_socket configure.ac: @@ -22,16 +23,15 @@ BUILT_SOURCES += $(NETINET_IN_H) if GL_GENERATE_NETINET_IN_H netinet/in.h: netinet_in.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) '%reldir%/netinet' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ - < $(srcdir)/netinet_in.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/netinet_in.in.h > $@-t + $(AM_V_at)mv $@-t $@ else netinet/in.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/openmp-init b/modules/openmp-init index 2c08e5725..c9a2c027c 100644 --- a/modules/openmp-init +++ b/modules/openmp-init @@ -9,6 +9,7 @@ m4/omp_h.m4 Depends-on: include_next c-ctype +sed-header setenv configure.ac: @@ -24,15 +25,14 @@ omp.h: omp.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_OMP_H''@|$(NEXT_OMP_H)|g' \ - < $(srcdir)/omp.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/omp.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += omp.h omp.h-t lib_SOURCES += omp-init.c diff --git a/modules/poll-h b/modules/poll-h index ccd5fa4a5..31f4fdf2b 100644 --- a/modules/poll-h +++ b/modules/poll-h @@ -9,6 +9,7 @@ m4/sys_socket_h.m4 Depends-on: extensions include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -25,8 +26,8 @@ BUILT_SOURCES += poll.h poll.h: poll.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_POLL_H''@|$(HAVE_POLL_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -38,9 +39,8 @@ poll.h: poll.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) -e 's|@''REPLACE_POLL''@|$(REPLACE_POLL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/poll.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/poll.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += poll.h poll.h-t Include: diff --git a/modules/pthread-h b/modules/pthread-h index e4f3073ba..7fff7e60f 100644 --- a/modules/pthread-h +++ b/modules/pthread-h @@ -10,6 +10,7 @@ Depends-on: extensions extern-inline sched +sed-header time snippet/c++defs snippet/_Noreturn @@ -32,8 +33,8 @@ BUILT_SOURCES += pthread.h pthread.h: pthread.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -159,9 +160,9 @@ pthread.h: pthread.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += pthread.h pthread.h-t Include: diff --git a/modules/pty b/modules/pty index 2bce02264..0ec3700bc 100644 --- a/modules/pty +++ b/modules/pty @@ -7,6 +7,7 @@ m4/pty_h.m4 Depends-on: include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -23,8 +24,8 @@ BUILT_SOURCES += pty.h pty.h: pty.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_PTY_H''@|$(HAVE_PTY_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -40,9 +41,8 @@ pty.h: pty.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) -e 's|@''REPLACE_OPENPTY''@|$(REPLACE_OPENPTY)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/pty.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/pty.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += pty.h pty.h-t Include: diff --git a/modules/sched b/modules/sched index 2babbd61b..e19603af4 100644 --- a/modules/sched +++ b/modules/sched @@ -8,6 +8,7 @@ m4/pid_t.m4 Depends-on: include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += sched.h sched.h: sched.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \ -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @@ -38,9 +39,8 @@ sched.h: sched.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) -e 's|@''REPLACE_SCHED_YIELD''@|$(REPLACE_SCHED_YIELD)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sched.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sched.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sched.h sched.h-t Include: diff --git a/modules/scratch_buffer b/modules/scratch_buffer index f350586af..b69a7800f 100644 --- a/modules/scratch_buffer +++ b/modules/scratch_buffer @@ -13,6 +13,7 @@ Depends-on: c99 builtin-expect libc-config +sed-header stdbool stddef malloc-posix @@ -27,14 +28,13 @@ BUILT_SOURCES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ -e 's|__glibc_likely|_GL_LIKELY|g' \ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ -e '/libc_hidden_proto/d' \ - < $(srcdir)/malloc/scratch_buffer.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/malloc/scratch_buffer.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h-t lib_SOURCES += malloc/scratch_buffer_dupfree.c \ diff --git a/modules/search b/modules/search index 8c3c4fcce..cacabbd73 100644 --- a/modules/search +++ b/modules/search @@ -7,6 +7,7 @@ m4/search_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += search.h search.h: search.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_SEARCH_H''@|$(HAVE_SEARCH_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -41,9 +42,8 @@ search.h: search.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/search.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/search.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += search.h search.h-t Include: diff --git a/modules/sed-header b/modules/sed-header new file mode 100644 index 000000000..bf7278723 --- /dev/null +++ b/modules/sed-header @@ -0,0 +1,36 @@ +Description: +Makefile definitions for running 'sed' on header files + +Files: + +Depends-on: + +configure.ac: + +Makefile.am: +# In 'sed', prepend a "DO NOT EDIT" comment to the pattern space. +SED_HEADER_NOEDIT = s,^,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */, + +# '$(SED_HEADER_STDOUT) -e "..."' runs 'sed' but first outputs "DO NOT EDIT". +SED_HEADER_STDOUT = sed \ + -e x \ + -e '1$(SED_HEADER_NOEDIT)p' \ + -e x + +# '$(SED_HEADER_TO_AT_t) FILE' copies FILE to $@-t, prepending a leading +# "DO_NOT_EDIT". Although this could be done more simply via: +# SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) > $@-t +# the -n and 'w's avoid a fork+exec, at least when GNU Make is used. +SED_HEADER_TO_AT_t = sed -n \ + -e x \ + -e '1$(SED_HEADER_NOEDIT)w $@-t' \ + -e x \ + -e 'w $@-t' + +Include: + +License: +LGPLv2+ + +Maintainer: +bug-gnulib@gnu.org diff --git a/modules/selinux-h b/modules/selinux-h index 4b6c3b2f5..15ddae682 100644 --- a/modules/selinux-h +++ b/modules/selinux-h @@ -16,6 +16,7 @@ m4/selinux-selinux-h.m4 Depends-on: errno extern-inline +sed-header configure.ac: gl_HEADERS_SELINUX_SELINUX_H @@ -35,25 +36,22 @@ lib_SOURCES += se-context.in.h se-label.in.h se-selinux.in.h \ BUILT_SOURCES += selinux/selinux.h selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) '%reldir%/selinux' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ - < $(srcdir)/se-selinux.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/se-selinux.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t BUILT_SOURCES += $(SELINUX_CONTEXT_H) if GL_GENERATE_SELINUX_CONTEXT_H selinux/context.h: se-context.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) '%reldir%/selinux' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - cat $(srcdir)/se-context.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/se-context.in.h + $(AM_V_at)mv $@-t $@ else selinux/context.h: $(top_builddir)/config.status rm -f $@ @@ -64,10 +62,8 @@ BUILT_SOURCES += $(SELINUX_LABEL_H) if GL_GENERATE_SELINUX_LABEL_H selinux/label.h: se-label.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) '%reldir%/selinux' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - cat $(srcdir)/se-label.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/se-label.in.h + $(AM_V_at)mv $@-t $@ else selinux/label.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/signal-h b/modules/signal-h index b12879a7b..8f6cc76ca 100644 --- a/modules/signal-h +++ b/modules/signal-h @@ -8,6 +8,7 @@ m4/pid_t.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ BUILT_SOURCES += signal.h signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -51,9 +52,8 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/signal.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/signal.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += signal.h signal.h-t Include: diff --git a/modules/sigsegv b/modules/sigsegv index 747eb78db..873235170 100644 --- a/modules/sigsegv +++ b/modules/sigsegv @@ -25,6 +25,7 @@ m4/sigsegv.m4 Depends-on: havelib host-cpu-c-abi +sed-header stdint getpagesize @@ -72,10 +73,8 @@ if GL_GENERATE_SIGSEGV_H sigsegv.h: sigsegv.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/sigsegv.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/sigsegv.in.h + $(AM_V_at)mv $@-t $@ else sigsegv.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/spawn b/modules/spawn index c2d35ef55..2cb1f54be 100644 --- a/modules/spawn +++ b/modules/spawn @@ -9,6 +9,7 @@ m4/pid_t.m4 Depends-on: include_next sched +sed-header signal-h snippet/arg-nonnull snippet/c++defs @@ -27,8 +28,8 @@ BUILT_SOURCES += spawn.h spawn.h: spawn.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -71,9 +72,8 @@ spawn.h: spawn.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/spawn.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/spawn.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += spawn.h spawn.h-t Include: diff --git a/modules/stdalign b/modules/stdalign index af363fa9e..e367fd080 100644 --- a/modules/stdalign +++ b/modules/stdalign @@ -6,6 +6,7 @@ lib/stdalign.in.h m4/stdalign.m4 Depends-on: +sed-header configure.ac: gl_STDALIGN_H @@ -21,10 +22,8 @@ if GL_GENERATE_STDALIGN_H stdalign.h: stdalign.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/stdalign.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h + $(AM_V_at)mv $@-t $@ else stdalign.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/stdarg b/modules/stdarg index 5502f6c1d..1bc6d238d 100644 --- a/modules/stdarg +++ b/modules/stdarg @@ -7,6 +7,7 @@ m4/stdarg.m4 Depends-on: include_next +sed-header configure.ac-early: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode @@ -27,15 +28,14 @@ if GL_GENERATE_STDARG_H stdarg.h: stdarg.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ - < $(srcdir)/stdarg.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/stdarg.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stdarg.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/stdbool b/modules/stdbool index a07d7c4be..8143ba248 100644 --- a/modules/stdbool +++ b/modules/stdbool @@ -7,6 +7,7 @@ lib/stdbool.in.h m4/stdbool.m4 Depends-on: +sed-header configure.ac: gl_STDBOOL_H @@ -22,10 +23,10 @@ if GL_GENERATE_STDBOOL_H stdbool.h: stdbool.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \ + $(srcdir)/stdbool.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stdbool.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/stddef b/modules/stddef index 547ade163..d281d068e 100644 --- a/modules/stddef +++ b/modules/stddef @@ -9,6 +9,7 @@ m4/wchar_t.m4 Depends-on: include_next extensions +sed-header configure.ac: gl_STDDEF_H @@ -25,8 +26,8 @@ if GL_GENERATE_STDDEF_H stddef.h: stddef.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -34,9 +35,8 @@ stddef.h: stddef.in.h $(top_builddir)/config.status -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/stddef.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stddef.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/stdint b/modules/stdint index 8279c39ad..dea1950a0 100644 --- a/modules/stdint +++ b/modules/stdint @@ -16,6 +16,7 @@ Depends-on: include_next limits-h multiarch +sed-header sys_types configure.ac: @@ -34,8 +35,8 @@ if GL_GENERATE_STDINT_H stdint.h: stdint.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -62,9 +63,8 @@ stdint.h: stdint.in.h $(top_builddir)/config.status -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/stdint.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stdint.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/stdio b/modules/stdio index f16e6d20f..87d15db43 100644 --- a/modules/stdio +++ b/modules/stdio @@ -8,6 +8,7 @@ m4/stdio_h.m4 Depends-on: extensions include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -53,8 +54,8 @@ BUILT_SOURCES += stdio.h stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -171,9 +172,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t Include: diff --git a/modules/stdlib b/modules/stdlib index f2d685ee9..8d2da19ed 100644 --- a/modules/stdlib +++ b/modules/stdlib @@ -7,6 +7,7 @@ m4/stdlib_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -28,8 +29,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -154,9 +155,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t Include: diff --git a/modules/stdnoreturn b/modules/stdnoreturn index 05d88a18d..5214f1739 100644 --- a/modules/stdnoreturn +++ b/modules/stdnoreturn @@ -6,6 +6,7 @@ lib/stdnoreturn.in.h m4/stdnoreturn.m4 Depends-on: +sed-header snippet/_Noreturn configure.ac: @@ -22,11 +23,10 @@ if GL_GENERATE_STDNORETURN_H stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e '/definition of _Noreturn/r $(_NORETURN_H)' \ - < $(srcdir)/stdnoreturn.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e '/definition of _Noreturn/r $(_NORETURN_H)' \ + $(srcdir)/stdnoreturn.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stdnoreturn.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/string b/modules/string index 53d52bb69..67135a732 100644 --- a/modules/string +++ b/modules/string @@ -9,6 +9,7 @@ Depends-on: extensions extern-inline include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -28,8 +29,8 @@ BUILT_SOURCES += string.h string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -123,10 +124,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t Include: diff --git a/modules/strings b/modules/strings index 5da6ad082..0431753e4 100644 --- a/modules/strings +++ b/modules/strings @@ -7,6 +7,7 @@ m4/strings_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -25,8 +26,8 @@ BUILT_SOURCES += strings.h strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -39,9 +40,8 @@ strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/strings.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/strings.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += strings.h strings.h-t Include: diff --git a/modules/sys_file b/modules/sys_file index bf50d920d..68d1a4204 100644 --- a/modules/sys_file +++ b/modules/sys_file @@ -7,6 +7,7 @@ m4/sys_file_h.m4 Depends-on: include_next +sed-header snippet/warn-on-use configure.ac: @@ -21,8 +22,8 @@ BUILT_SOURCES += sys/file.h # has one that is incomplete. sys/file.h: sys_file.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_SYS_FILE_H''@/$(HAVE_SYS_FILE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -31,9 +32,8 @@ sys/file.h: sys_file.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) -e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \ -e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_file.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_file.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/file.h sys/file.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_ioctl b/modules/sys_ioctl index 83db3046a..ceb83faa3 100644 --- a/modules/sys_ioctl +++ b/modules/sys_ioctl @@ -7,6 +7,7 @@ m4/sys_ioctl_h.m4 Depends-on: include_next +sed-header snippet/c++defs snippet/warn-on-use unistd @@ -23,8 +24,8 @@ BUILT_SOURCES += sys/ioctl.h # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -36,9 +37,8 @@ sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_ioctl.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_ioctl.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_random b/modules/sys_random index f550dd079..ebb1c6c1a 100644 --- a/modules/sys_random +++ b/modules/sys_random @@ -7,6 +7,7 @@ m4/sys_random_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -23,8 +24,8 @@ BUILT_SOURCES += sys/random.h # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -36,9 +37,8 @@ sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_random.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_random.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/random.h sys/random.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_resource b/modules/sys_resource index 24bc56177..6581bcb9b 100644 --- a/modules/sys_resource +++ b/modules/sys_resource @@ -7,6 +7,7 @@ m4/sys_resource_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += sys/resource.h # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -36,9 +37,8 @@ sys/resource.h: sys_resource.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(A -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_resource.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_resource.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/resource.h sys/resource.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_select b/modules/sys_select index a3790184d..2a2e8c827 100644 --- a/modules/sys_select +++ b/modules/sys_select @@ -8,6 +8,7 @@ m4/sys_socket_h.m4 Depends-on: include_next +sed-header signal-h snippet/c++defs snippet/warn-on-use @@ -25,8 +26,8 @@ BUILT_SOURCES += sys/select.h # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -40,9 +41,8 @@ sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_select.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_select.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/select.h sys/select.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_socket b/modules/sys_socket index 928573a75..816a6aa82 100644 --- a/modules/sys_socket +++ b/modules/sys_socket @@ -11,6 +11,7 @@ Depends-on: errno extern-inline include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -32,8 +33,8 @@ lib_SOURCES += sys_socket.c # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -64,9 +65,8 @@ sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_socket.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_socket.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_stat b/modules/sys_stat index b34773e3d..1f0defe6b 100644 --- a/modules/sys_stat +++ b/modules/sys_stat @@ -9,6 +9,7 @@ m4/pid_t.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -27,8 +28,8 @@ BUILT_SOURCES += sys/stat.h # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -81,9 +82,8 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_stat.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_time b/modules/sys_time index 0379556ba..46e603144 100644 --- a/modules/sys_time +++ b/modules/sys_time @@ -8,6 +8,7 @@ m4/sys_socket_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += sys/time.h # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -40,9 +41,8 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_time.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_time.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t Include: diff --git a/modules/sys_times b/modules/sys_times index 91aa2436c..83d45b7d0 100644 --- a/modules/sys_times +++ b/modules/sys_times @@ -7,6 +7,7 @@ m4/sys_times_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/warn-on-use @@ -22,8 +23,8 @@ BUILT_SOURCES += sys/times.h # 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_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_SYS_TIMES_H''@/$(HAVE_SYS_TIMES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -34,9 +35,8 @@ sys/times.h: sys_times.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG -e 's|@''HAVE_TIMES''@|$(HAVE_TIMES)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_times.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_times.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/times.h sys/times.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_types b/modules/sys_types index 5524b731b..89c8da989 100644 --- a/modules/sys_types +++ b/modules/sys_types @@ -9,6 +9,7 @@ m4/pid_t.m4 Depends-on: include_next +sed-header ssize_t configure.ac: @@ -23,17 +24,16 @@ BUILT_SOURCES += sys/types.h # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_types.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/types.h sys/types.h-t Include: diff --git a/modules/sys_uio b/modules/sys_uio index cdf0b934e..1a0d84245 100644 --- a/modules/sys_uio +++ b/modules/sys_uio @@ -7,6 +7,7 @@ m4/sys_uio_h.m4 Depends-on: include_next +sed-header ssize_t sys_types @@ -22,16 +23,15 @@ BUILT_SOURCES += sys/uio.h # doesn't have one that works with the given compiler. sys/uio.h: sys_uio.in.h $(top_builddir)/config.status $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ - < $(srcdir)/sys_uio.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_uio.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_utsname b/modules/sys_utsname index 0242a42e2..d65c82e48 100644 --- a/modules/sys_utsname +++ b/modules/sys_utsname @@ -7,6 +7,7 @@ m4/sys_utsname_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/warn-on-use @@ -22,8 +23,8 @@ BUILT_SOURCES += sys/utsname.h # does not have one. sys/utsname.h: sys_utsname.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_SYS_UTSNAME_H''@/$(HAVE_SYS_UTSNAME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -34,9 +35,8 @@ sys/utsname.h: sys_utsname.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $ -e 's|@''HAVE_UNAME''@|$(HAVE_UNAME)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_utsname.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_utsname.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/utsname.h sys/utsname.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sys_wait b/modules/sys_wait index 1cb2eea14..173a3faeb 100644 --- a/modules/sys_wait +++ b/modules/sys_wait @@ -8,6 +8,7 @@ m4/pid_t.m4 Depends-on: include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -23,8 +24,8 @@ BUILT_SOURCES += sys/wait.h # has one that is incomplete. sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -32,9 +33,8 @@ sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_wait.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_wait.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t MOSTLYCLEANDIRS += sys diff --git a/modules/sysexits b/modules/sysexits index a6ccc0389..8f219e2a9 100644 --- a/modules/sysexits +++ b/modules/sysexits @@ -7,6 +7,7 @@ m4/sysexits.m4 Depends-on: include_next +sed-header stdlib configure.ac: @@ -23,16 +24,15 @@ if GL_GENERATE_SYSEXITS_H sysexits.h: sysexits.in.h $(top_builddir)/config.status $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYSEXITS_H''@|$(NEXT_SYSEXITS_H)|g' \ - < $(srcdir)/sysexits.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sysexits.in.h > $@-t + $(AM_V_at)mv $@-t $@ else sysexits.h: $(top_builddir)/config.status rm -f $@ diff --git a/modules/termios b/modules/termios index fa8ed61fe..43b489abb 100644 --- a/modules/termios +++ b/modules/termios @@ -8,6 +8,7 @@ m4/pid_t.m4 Depends-on: include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += termios.h termios.h: termios.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -35,9 +36,8 @@ termios.h: termios.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE -e 's|@''HAVE_TERMIOS_H''@|$(HAVE_TERMIOS_H)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/termios.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/termios.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += termios.h termios.h-t Include: diff --git a/modules/threads-h b/modules/threads-h index ffb9309cf..1f1eb0113 100644 --- a/modules/threads-h +++ b/modules/threads-h @@ -18,6 +18,7 @@ build-aux/config.rpath Depends-on: include_next +sed-header snippet/c++defs snippet/_Noreturn snippet/arg-nonnull @@ -41,8 +42,8 @@ BUILT_SOURCES += threads.h threads.h: threads.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_THREADS_H''@|$(HAVE_THREADS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -63,9 +64,8 @@ threads.h: threads.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/threads.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/threads.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += threads.h threads.h-t Include: diff --git a/modules/time b/modules/time index 83c926202..36d3dece6 100644 --- a/modules/time +++ b/modules/time @@ -8,6 +8,7 @@ m4/time_h.m4 Depends-on: extensions include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -26,8 +27,8 @@ BUILT_SOURCES += time.h time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -67,9 +68,8 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/time.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t Include: diff --git a/modules/uchar b/modules/uchar index 608e8c802..ddd5944db 100644 --- a/modules/uchar +++ b/modules/uchar @@ -8,6 +8,7 @@ m4/stdint.m4 Depends-on: include_next +sed-header snippet/c++defs stdint wchar @@ -23,8 +24,8 @@ BUILT_SOURCES += uchar.h uchar.h: uchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_UCHAR_H''@/$(HAVE_UCHAR_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -61,9 +62,8 @@ uchar.h: uchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) -e 's|@''REPLACE_C32RTOMB''@|$(REPLACE_C32RTOMB)|g' \ -e 's|@''REPLACE_MBRTOC32''@|$(REPLACE_MBRTOC32)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - < $(srcdir)/uchar.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/uchar.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += uchar.h uchar.h-t Include: diff --git a/modules/unicase/base b/modules/unicase/base index 209d0b36d..f9a99c848 100644 --- a/modules/unicase/base +++ b/modules/unicase/base @@ -6,6 +6,7 @@ lib/unicase.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes uninorm/base stdbool @@ -20,10 +21,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNICASE_H) unicase.h: unicase.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unicase.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/unicase.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unicase.h unicase.h-t Include: diff --git a/modules/unicase/special-casing b/modules/unicase/special-casing index b4eee8e7a..14877325e 100644 --- a/modules/unicase/special-casing +++ b/modules/unicase/special-casing @@ -8,6 +8,7 @@ lib/unicase/special-casing-table.gperf Depends-on: gperf +sed-header configure.ac: AC_PROG_MKDIR_P @@ -27,10 +28,10 @@ EXTRA_DIST += unicase/special-casing-table.h unicase/special-casing.h: unicase/special-casing.in.h unicase/special-casing-table.h $(AM_V_GEN)$(MKDIR_P) '%reldir%/unicase' $(AM_V_at)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; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e "/gl_unicase_special_lookup/s/gl_unicase_special_lookup.*/$${declaration};/" \ + $(srcdir)/unicase/special-casing.in.h > $@-t + $(AM_V_at)mv $@-t $@ BUILT_SOURCES += unicase/special-casing.h MOSTLYCLEANFILES += unicase/special-casing.h unicase/special-casing.h-t diff --git a/modules/uniconv/base b/modules/uniconv/base index de9188ad9..6dbbbbe6a 100644 --- a/modules/uniconv/base +++ b/modules/uniconv/base @@ -9,6 +9,7 @@ lib/localcharset.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes configure.ac: @@ -21,10 +22,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNICONV_H) uniconv.h: uniconv.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/uniconv.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/uniconv.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += uniconv.h uniconv.h-t Include: diff --git a/modules/unictype/base b/modules/unictype/base index 41571dc43..d5c73c9fe 100644 --- a/modules/unictype/base +++ b/modules/unictype/base @@ -6,6 +6,7 @@ lib/unictype.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes stdbool @@ -19,10 +20,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNICTYPE_H) unictype.h: unictype.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unictype.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/unictype.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unictype.h unictype.h-t Include: diff --git a/modules/unigbrk/base b/modules/unigbrk/base index 4a3404885..2672e6ef9 100644 --- a/modules/unigbrk/base +++ b/modules/unigbrk/base @@ -6,6 +6,7 @@ lib/unigbrk.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes stdbool @@ -19,10 +20,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNIGBRK_H) unigbrk.h: unigbrk.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unigbrk.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/unigbrk.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unigbrk.h unigbrk.h-t Include: diff --git a/modules/unilbrk/base b/modules/unilbrk/base index 0edce6264..4deda4436 100644 --- a/modules/unilbrk/base +++ b/modules/unilbrk/base @@ -6,6 +6,7 @@ lib/unilbrk.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes localcharset @@ -19,10 +20,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNILBRK_H) unilbrk.h: unilbrk.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unilbrk.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/unilbrk.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unilbrk.h unilbrk.h-t Include: diff --git a/modules/uniname/base b/modules/uniname/base index 80e26224f..c573d089a 100644 --- a/modules/uniname/base +++ b/modules/uniname/base @@ -6,6 +6,7 @@ lib/uniname.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes configure.ac: @@ -18,10 +19,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNINAME_H) uniname.h: uniname.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/uniname.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/uniname.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += uniname.h uniname.h-t Include: diff --git a/modules/uninorm/base b/modules/uninorm/base index bc2306431..51139fa53 100644 --- a/modules/uninorm/base +++ b/modules/uninorm/base @@ -6,6 +6,7 @@ lib/uninorm.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes configure.ac: @@ -18,10 +19,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNINORM_H) uninorm.h: uninorm.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/uninorm.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/uninorm.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += uninorm.h uninorm.h-t Include: diff --git a/modules/unistd b/modules/unistd index 130b7e5f0..86acab3e6 100644 --- a/modules/unistd +++ b/modules/unistd @@ -11,6 +11,7 @@ m4/pid_t.m4 Depends-on: extern-inline include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -32,8 +33,8 @@ lib_SOURCES += unistd.c unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -219,9 +220,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t Include: diff --git a/modules/unistdio/base b/modules/unistdio/base index 9c746835b..6838cbb9b 100644 --- a/modules/unistdio/base +++ b/modules/unistdio/base @@ -6,6 +6,7 @@ lib/unistdio.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes configure.ac: @@ -18,10 +19,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNISTDIO_H) unistdio.h: unistdio.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unistdio.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/unistdio.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unistdio.h unistdio.h-t Include: diff --git a/modules/unistr/base b/modules/unistr/base index 16806eadd..ae9ad1985 100644 --- a/modules/unistr/base +++ b/modules/unistr/base @@ -6,6 +6,7 @@ lib/unistr.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes stdbool inline @@ -20,10 +21,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNISTR_H) unistr.h: unistr.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unistr.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/unistr.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unistr.h unistr.h-t Include: diff --git a/modules/unitypes b/modules/unitypes index 14e44a2b3..8c85c5afe 100644 --- a/modules/unitypes +++ b/modules/unitypes @@ -6,6 +6,7 @@ lib/unitypes.in.h m4/libunistring-base.m4 Depends-on: +sed-header stdint configure.ac: @@ -34,10 +35,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) unitypes.h: unitypes.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unitypes.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/unitypes.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unitypes.h unitypes.h-t Include: diff --git a/modules/uniwbrk/base b/modules/uniwbrk/base index f2120f403..4697972fd 100644 --- a/modules/uniwbrk/base +++ b/modules/uniwbrk/base @@ -6,6 +6,7 @@ lib/uniwbrk.in.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes configure.ac: @@ -18,10 +19,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNIWBRK_H) uniwbrk.h: uniwbrk.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/uniwbrk.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/uniwbrk.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += uniwbrk.h uniwbrk.h-t Include: diff --git a/modules/uniwidth/base b/modules/uniwidth/base index d2cff47ea..25423c64d 100644 --- a/modules/uniwidth/base +++ b/modules/uniwidth/base @@ -7,6 +7,7 @@ lib/localcharset.h m4/libunistring-base.m4 Depends-on: +sed-header unitypes configure.ac: @@ -19,10 +20,8 @@ BUILT_SOURCES += $(LIBUNISTRING_UNIWIDTH_H) uniwidth.h: uniwidth.in.h $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/uniwidth.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/uniwidth.in.h + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += uniwidth.h uniwidth.h-t Include: diff --git a/modules/utime-h b/modules/utime-h index 54d5cfcc3..8e27bf0b1 100644 --- a/modules/utime-h +++ b/modules/utime-h @@ -7,6 +7,7 @@ m4/utime_h.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -24,8 +25,8 @@ BUILT_SOURCES += utime.h utime.h: utime.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_UTIME_H''@/$(HAVE_UTIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -38,9 +39,8 @@ utime.h: utime.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/utime.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/utime.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += utime.h utime.h-t Include: diff --git a/modules/wchar b/modules/wchar index a09e3511a..dd5826de7 100644 --- a/modules/wchar +++ b/modules/wchar @@ -9,6 +9,7 @@ m4/wint_t.m4 Depends-on: include_next +sed-header snippet/arg-nonnull snippet/c++defs snippet/warn-on-use @@ -29,8 +30,8 @@ BUILT_SOURCES += wchar.h wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -145,9 +146,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t Include: diff --git a/modules/wctype-h b/modules/wctype-h index 7e2eaddf9..312371493 100644 --- a/modules/wctype-h +++ b/modules/wctype-h @@ -10,6 +10,7 @@ m4/wint_t.m4 Depends-on: extern-inline include_next +sed-header snippet/c++defs snippet/warn-on-use @@ -27,8 +28,8 @@ lib_SOURCES += wctype-h.c wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN) @NMD@ $(AM_V_at)$(MKDIR_P) '%reldir%' - $(AM_V_at){ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -55,9 +56,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/wctype.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/wctype.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += wctype.h wctype.h-t Include: -- 2.32.0