summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-12-24 17:21:59 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-12-24 17:27:25 -0800
commit53cdf461612c2f6987bc6a920d37b15774ed274c (patch)
treef892f3ac50f831e8c8c193d4c0c3719aa1c2fac3
parent86165a8f8faf913059429476adab999e9031640a (diff)
downloadgnulib-53cdf461612c2f6987bc6a920d37b15774ed274c.tar.gz
gen-header: new module
Simplify header generation by using Makefile variables defined by a new gen-header module. * modules/gen-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 gen-header, and use its macros to simplify header generation.
-rw-r--r--ChangeLog37
-rw-r--r--modules/alloca-opt9
-rw-r--r--modules/argz7
-rw-r--r--modules/arpa_inet10
-rw-r--r--modules/assert-h9
-rw-r--r--modules/byteswap7
-rw-r--r--modules/ctype10
-rw-r--r--modules/dirent10
-rw-r--r--modules/dynarray18
-rw-r--r--modules/errno10
-rw-r--r--modules/execinfo7
-rw-r--r--modules/fcntl-h10
-rw-r--r--modules/float10
-rw-r--r--modules/fnmatch-h10
-rw-r--r--modules/gen-header39
-rw-r--r--modules/getopt-posix19
-rw-r--r--modules/glob-h19
-rw-r--r--modules/iconv-h10
-rw-r--r--modules/ieee754-h10
-rw-r--r--modules/inttypes-incomplete10
-rw-r--r--modules/langinfo10
-rw-r--r--modules/libtextstyle-optional7
-rw-r--r--modules/limits-h10
-rw-r--r--modules/locale10
-rw-r--r--modules/malloc-h10
-rw-r--r--modules/math11
-rw-r--r--modules/monetary10
-rw-r--r--modules/net_if10
-rw-r--r--modules/netdb10
-rw-r--r--modules/netinet_in10
-rw-r--r--modules/openmp-init10
-rw-r--r--modules/poll-h10
-rw-r--r--modules/pthread-h11
-rw-r--r--modules/pty10
-rw-r--r--modules/sched10
-rw-r--r--modules/scratch_buffer10
-rw-r--r--modules/search10
-rw-r--r--modules/selinux-h22
-rw-r--r--modules/signal-h10
-rw-r--r--modules/sigsegv7
-rw-r--r--modules/spawn10
-rw-r--r--modules/stdalign7
-rw-r--r--modules/stdarg10
-rw-r--r--modules/stdbool9
-rw-r--r--modules/stddef10
-rw-r--r--modules/stdint10
-rw-r--r--modules/stdio11
-rw-r--r--modules/stdlib11
-rw-r--r--modules/stdnoreturn10
-rw-r--r--modules/string12
-rw-r--r--modules/strings10
-rw-r--r--modules/sys_file10
-rw-r--r--modules/sys_ioctl10
-rw-r--r--modules/sys_random10
-rw-r--r--modules/sys_resource10
-rw-r--r--modules/sys_select10
-rw-r--r--modules/sys_socket10
-rw-r--r--modules/sys_stat10
-rw-r--r--modules/sys_time10
-rw-r--r--modules/sys_times10
-rw-r--r--modules/sys_types10
-rw-r--r--modules/sys_uio10
-rw-r--r--modules/sys_utsname10
-rw-r--r--modules/sys_wait10
-rw-r--r--modules/sysexits10
-rw-r--r--modules/termios10
-rw-r--r--modules/threads-h10
-rw-r--r--modules/time10
-rw-r--r--modules/uchar10
-rw-r--r--modules/unicase/base7
-rw-r--r--modules/unicase/special-casing9
-rw-r--r--modules/uniconv/base7
-rw-r--r--modules/unictype/base7
-rw-r--r--modules/unigbrk/base7
-rw-r--r--modules/unilbrk/base7
-rw-r--r--modules/uniname/base7
-rw-r--r--modules/uninorm/base7
-rw-r--r--modules/unistd11
-rw-r--r--modules/unistdio/base7
-rw-r--r--modules/unistr/base7
-rw-r--r--modules/unitypes7
-rw-r--r--modules/uniwbrk/base7
-rw-r--r--modules/uniwidth/base7
-rw-r--r--modules/utime-h10
-rw-r--r--modules/wchar11
-rw-r--r--modules/wctype-h10
86 files changed, 483 insertions, 421 deletions
diff --git a/ChangeLog b/ChangeLog
index 4cf5222bb5..c73ea866d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2021-12-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ gen-header: new module
+ Simplify header generation by using Makefile variables
+ defined by a new gen-header module.
+ * modules/gen-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 gen-header, and use its macros to simplify
+ header generation.
+
2021-12-24 Bruno Haible <bruno@clisp.org>
passfd: Fix compilation error on IRIX.
diff --git a/modules/alloca-opt b/modules/alloca-opt
index b8ab4217c2..a08b424eef 100644
--- a/modules/alloca-opt
+++ b/modules/alloca-opt
@@ -8,6 +8,7 @@ lib/alloca.in.h
m4/alloca.m4
Depends-on:
+gen-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 cb85d98665..6d07062548 100644
--- a/modules/argz
+++ b/modules/argz
@@ -7,6 +7,7 @@ lib/argz.c
m4/argz.m4
Depends-on:
+gen-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 51b14f160f..3a6fd69561 100644
--- a/modules/arpa_inet
+++ b/modules/arpa_inet
@@ -8,6 +8,7 @@ m4/sys_socket_h.m4
m4/socklen.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 ad3566bfa2..572f43d252 100644
--- a/modules/assert-h
+++ b/modules/assert-h
@@ -7,6 +7,7 @@ lib/verify.h
m4/assert_h.m4
Depends-on:
+gen-header
include_next
configure.ac:
@@ -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 6e9af748a2..960134810a 100644
--- a/modules/byteswap
+++ b/modules/byteswap
@@ -6,6 +6,7 @@ lib/byteswap.in.h
m4/byteswap.m4
Depends-on:
+gen-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 10d6db43ba..2c1c2b06ab 100644
--- a/modules/ctype
+++ b/modules/ctype
@@ -7,6 +7,7 @@ m4/ctype_h.m4
Depends-on:
extern-inline
+gen-header
include_next
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 0a0989dffb..446ac1b358 100644
--- a/modules/dirent
+++ b/modules/dirent
@@ -8,6 +8,7 @@ m4/unistd_h.m4
m4/pid_t.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 3e5a98425b..668959482e 100644
--- a/modules/dynarray
+++ b/modules/dynarray
@@ -14,6 +14,7 @@ lib/malloc/dynarray_resize_clear.c
Depends-on:
c99
builtin-expect
+gen-header
libc-config
stdbool
stddef
@@ -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|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|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 e3f1dc01c5..c512930102 100644
--- a/modules/errno
+++ b/modules/errno
@@ -6,6 +6,7 @@ lib/errno.in.h
m4/errno_h.m4
Depends-on:
+gen-header
include_next
configure.ac:
@@ -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 779669fa5b..ef8caaea51 100644
--- a/modules/execinfo
+++ b/modules/execinfo
@@ -8,6 +8,7 @@ m4/execinfo.m4
Depends-on:
extern-inline
+gen-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 a80e6bd458..815b17538c 100644
--- a/modules/fcntl-h
+++ b/modules/fcntl-h
@@ -9,6 +9,7 @@ m4/pid_t.m4
Depends-on:
extensions
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 6551e454b4..f894969d10 100644
--- a/modules/float
+++ b/modules/float
@@ -8,6 +8,7 @@ lib/itold.c
m4/float_h.m4
Depends-on:
+gen-header
include_next
configure.ac:
@@ -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 260bbd5750..1e4f55c47d 100644
--- a/modules/fnmatch-h
+++ b/modules/fnmatch-h
@@ -7,6 +7,7 @@ m4/fnmatch_h.m4
Depends-on:
extensions
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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/gen-header b/modules/gen-header
new file mode 100644
index 0000000000..12c5581956
--- /dev/null
+++ b/modules/gen-header
@@ -0,0 +1,39 @@
+Description:
+Generating header files
+
+Applicability:
+all
+
+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/getopt-posix b/modules/getopt-posix
index d6704e7c28..c925465ae0 100644
--- a/modules/getopt-posix
+++ b/modules/getopt-posix
@@ -17,6 +17,7 @@ Depends-on:
unistd
extensions
include_next
+gen-header
gettext-h [test $REPLACE_GETOPT = 1]
snippet/arg-nonnull
@@ -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 97dd26543c..963693ca73 100644
--- a/modules/glob-h
+++ b/modules/glob-h
@@ -8,6 +8,7 @@ m4/glob_h.m4
Depends-on:
extensions
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 41579fb542..dc39894401 100644
--- a/modules/iconv-h
+++ b/modules/iconv-h
@@ -6,6 +6,7 @@ lib/iconv.in.h
m4/iconv_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 124f368cfb..80eeb6299b 100644
--- a/modules/ieee754-h
+++ b/modules/ieee754-h
@@ -6,6 +6,7 @@ lib/ieee754.in.h
m4/ieee754-h.m4
Depends-on:
+gen-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 71165720d9..d32d04b03e 100644
--- a/modules/inttypes-incomplete
+++ b/modules/inttypes-incomplete
@@ -6,6 +6,7 @@ lib/inttypes.in.h
m4/inttypes.m4
Depends-on:
+gen-header
include_next
multiarch
snippet/arg-nonnull
@@ -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 d6b74c9aa7..dab6862da4 100644
--- a/modules/langinfo
+++ b/modules/langinfo
@@ -7,6 +7,7 @@ m4/langinfo_h.m4
Depends-on:
extensions
+gen-header
include_next
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 0a51639298..cd05be2eee 100644
--- a/modules/libtextstyle-optional
+++ b/modules/libtextstyle-optional
@@ -6,6 +6,7 @@ lib/textstyle.in.h
m4/libtextstyle-optional.m4
Depends-on:
+gen-header
libtextstyle
stdbool
stdio
@@ -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 9fc0a2e4cc..c5eb139eb2 100644
--- a/modules/limits-h
+++ b/modules/limits-h
@@ -6,6 +6,7 @@ lib/limits.in.h
m4/limits-h.m4
Depends-on:
+gen-header
include_next
configure.ac:
@@ -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 60bfbe6699..8c88ab1a1a 100644
--- a/modules/locale
+++ b/modules/locale
@@ -7,6 +7,7 @@ m4/locale_h.m4
Depends-on:
extensions
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 3d7afad155..7caada9c7c 100644
--- a/modules/malloc-h
+++ b/modules/malloc-h
@@ -6,6 +6,7 @@ lib/malloc.in.h
m4/malloc_h.m4
Depends-on:
+gen-header
include_next
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 e62ee44092..c4d72b30c7 100644
--- a/modules/math
+++ b/modules/math
@@ -8,6 +8,7 @@ m4/math_h.m4
Depends-on:
extern-inline
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 1b1b91d4ce..95b04f67a7 100644
--- a/modules/monetary
+++ b/modules/monetary
@@ -6,6 +6,7 @@ lib/monetary.in.h
m4/monetary_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 cc1b27f550..d1b4865bdb 100644
--- a/modules/net_if
+++ b/modules/net_if
@@ -6,6 +6,7 @@ lib/net_if.in.h
m4/net_if_h.m4
Depends-on:
+gen-header
include_next
sys_socket
@@ -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 be8280c868..8f71cc878a 100644
--- a/modules/netdb
+++ b/modules/netdb
@@ -6,6 +6,7 @@ lib/netdb.in.h
m4/netdb_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 f97e24b75a..8a51447c62 100644
--- a/modules/netinet_in
+++ b/modules/netinet_in
@@ -6,6 +6,7 @@ lib/netinet_in.in.h
m4/netinet_in_h.m4
Depends-on:
+gen-header
include_next
sys_socket
@@ -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 2c08e5725e..3b857d039a 100644
--- a/modules/openmp-init
+++ b/modules/openmp-init
@@ -7,6 +7,7 @@ lib/omp-init.c
m4/omp_h.m4
Depends-on:
+gen-header
include_next
c-ctype
setenv
@@ -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 ccd5fa4a59..ef5bd7535e 100644
--- a/modules/poll-h
+++ b/modules/poll-h
@@ -8,6 +8,7 @@ m4/sys_socket_h.m4
Depends-on:
extensions
+gen-header
include_next
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 e4f3073ba0..2d792209c1 100644
--- a/modules/pthread-h
+++ b/modules/pthread-h
@@ -9,6 +9,7 @@ m4/threadlib.m4
Depends-on:
extensions
extern-inline
+gen-header
sched
time
snippet/c++defs
@@ -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 2bce022647..523af17c41 100644
--- a/modules/pty
+++ b/modules/pty
@@ -6,6 +6,7 @@ lib/pty.in.h
m4/pty_h.m4
Depends-on:
+gen-header
include_next
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 2babbd61bb..71445a140f 100644
--- a/modules/sched
+++ b/modules/sched
@@ -7,6 +7,7 @@ m4/sched_h.m4
m4/pid_t.m4
Depends-on:
+gen-header
include_next
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 f350586afa..921c8f5497 100644
--- a/modules/scratch_buffer
+++ b/modules/scratch_buffer
@@ -12,6 +12,7 @@ lib/malloc/scratch_buffer_set_array_size.c
Depends-on:
c99
builtin-expect
+gen-header
libc-config
stdbool
stddef
@@ -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 8c3c4fccec..04029b1433 100644
--- a/modules/search
+++ b/modules/search
@@ -6,6 +6,7 @@ lib/search.in.h
m4/search_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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/selinux-h b/modules/selinux-h
index 4b6c3b2f5d..6eaaaa83d6 100644
--- a/modules/selinux-h
+++ b/modules/selinux-h
@@ -16,6 +16,7 @@ m4/selinux-selinux-h.m4
Depends-on:
errno
extern-inline
+gen-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 b12879a7b5..cd45d5a040 100644
--- a/modules/signal-h
+++ b/modules/signal-h
@@ -7,6 +7,7 @@ m4/signal_h.m4
m4/pid_t.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 747eb78dbd..4b58adf0cc 100644
--- a/modules/sigsegv
+++ b/modules/sigsegv
@@ -23,6 +23,7 @@ m4/libsigsegv.m4
m4/sigsegv.m4
Depends-on:
+gen-header
havelib
host-cpu-c-abi
stdint
@@ -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 c2d35ef555..ebb3f2ec0e 100644
--- a/modules/spawn
+++ b/modules/spawn
@@ -7,6 +7,7 @@ m4/spawn_h.m4
m4/pid_t.m4
Depends-on:
+gen-header
include_next
sched
signal-h
@@ -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 af363fa9e7..e89eb8a3d1 100644
--- a/modules/stdalign
+++ b/modules/stdalign
@@ -6,6 +6,7 @@ lib/stdalign.in.h
m4/stdalign.m4
Depends-on:
+gen-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 5502f6c1d5..086019aa4c 100644
--- a/modules/stdarg
+++ b/modules/stdarg
@@ -6,6 +6,7 @@ lib/stdarg.in.h
m4/stdarg.m4
Depends-on:
+gen-header
include_next
configure.ac-early:
@@ -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 a07d7c4be1..bda6904c0e 100644
--- a/modules/stdbool
+++ b/modules/stdbool
@@ -7,6 +7,7 @@ lib/stdbool.in.h
m4/stdbool.m4
Depends-on:
+gen-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 547ade1633..11cec9b137 100644
--- a/modules/stddef
+++ b/modules/stddef
@@ -7,6 +7,7 @@ m4/stddef_h.m4
m4/wchar_t.m4
Depends-on:
+gen-header
include_next
extensions
@@ -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 8279c39adf..89f2fa0302 100644
--- a/modules/stdint
+++ b/modules/stdint
@@ -13,6 +13,7 @@ m4/stdint.m4
m4/wint_t.m4
Depends-on:
+gen-header
include_next
limits-h
multiarch
@@ -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 f16e6d20fe..69e770bccc 100644
--- a/modules/stdio
+++ b/modules/stdio
@@ -7,6 +7,7 @@ m4/stdio_h.m4
Depends-on:
extensions
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 f2d685ee9d..7f0d7ca934 100644
--- a/modules/stdlib
+++ b/modules/stdlib
@@ -6,6 +6,7 @@ lib/stdlib.in.h
m4/stdlib_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 05d88a18d3..2a785afd39 100644
--- a/modules/stdnoreturn
+++ b/modules/stdnoreturn
@@ -6,6 +6,7 @@ lib/stdnoreturn.in.h
m4/stdnoreturn.m4
Depends-on:
+gen-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 53d52bb69b..445c865476 100644
--- a/modules/string
+++ b/modules/string
@@ -8,6 +8,7 @@ m4/string_h.m4
Depends-on:
extensions
extern-inline
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 5da6ad0820..ebee51631d 100644
--- a/modules/strings
+++ b/modules/strings
@@ -6,6 +6,7 @@ lib/strings.in.h
m4/strings_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 bf50d920d3..a06a2f4376 100644
--- a/modules/sys_file
+++ b/modules/sys_file
@@ -6,6 +6,7 @@ lib/sys_file.in.h
m4/sys_file_h.m4
Depends-on:
+gen-header
include_next
snippet/warn-on-use
@@ -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 83db3046ae..cf99b56252 100644
--- a/modules/sys_ioctl
+++ b/modules/sys_ioctl
@@ -6,6 +6,7 @@ lib/sys_ioctl.in.h
m4/sys_ioctl_h.m4
Depends-on:
+gen-header
include_next
snippet/c++defs
snippet/warn-on-use
@@ -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 f550dd0790..1f86b97b9b 100644
--- a/modules/sys_random
+++ b/modules/sys_random
@@ -6,6 +6,7 @@ lib/sys_random.in.h
m4/sys_random_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 24bc561774..3cdac75a18 100644
--- a/modules/sys_resource
+++ b/modules/sys_resource
@@ -6,6 +6,7 @@ lib/sys_resource.in.h
m4/sys_resource_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 a3790184d0..5c8934ec29 100644
--- a/modules/sys_select
+++ b/modules/sys_select
@@ -7,6 +7,7 @@ m4/sys_select_h.m4
m4/sys_socket_h.m4
Depends-on:
+gen-header
include_next
signal-h
snippet/c++defs
@@ -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 928573a755..44b2792669 100644
--- a/modules/sys_socket
+++ b/modules/sys_socket
@@ -10,6 +10,7 @@ m4/sockpfaf.m4
Depends-on:
errno
extern-inline
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 b34773e3df..629eac1b41 100644
--- a/modules/sys_stat
+++ b/modules/sys_stat
@@ -8,6 +8,7 @@ m4/unistd_h.m4
m4/pid_t.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 0379556baf..73965fd954 100644
--- a/modules/sys_time
+++ b/modules/sys_time
@@ -7,6 +7,7 @@ m4/sys_time_h.m4
m4/sys_socket_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 91aa2436ca..6a4a092963 100644
--- a/modules/sys_times
+++ b/modules/sys_times
@@ -6,6 +6,7 @@ lib/sys_times.in.h
m4/sys_times_h.m4
Depends-on:
+gen-header
include_next
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 5524b731bb..db64116702 100644
--- a/modules/sys_types
+++ b/modules/sys_types
@@ -8,6 +8,7 @@ m4/off_t.m4
m4/pid_t.m4
Depends-on:
+sed-header
include_next
ssize_t
@@ -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 cdf0b934eb..d7234ee355 100644
--- a/modules/sys_uio
+++ b/modules/sys_uio
@@ -6,6 +6,7 @@ lib/sys_uio.in.h
m4/sys_uio_h.m4
Depends-on:
+gen-header
include_next
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 0242a42e26..f8aa62f5c2 100644
--- a/modules/sys_utsname
+++ b/modules/sys_utsname
@@ -6,6 +6,7 @@ lib/sys_utsname.in.h
m4/sys_utsname_h.m4
Depends-on:
+gen-header
include_next
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 1cb2eea142..455cf961fb 100644
--- a/modules/sys_wait
+++ b/modules/sys_wait
@@ -7,6 +7,7 @@ m4/sys_wait_h.m4
m4/pid_t.m4
Depends-on:
+gen-header
include_next
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 a6ccc03891..2f4f46307c 100644
--- a/modules/sysexits
+++ b/modules/sysexits
@@ -6,6 +6,7 @@ lib/sysexits.in.h
m4/sysexits.m4
Depends-on:
+gen-header
include_next
stdlib
@@ -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 fa8ed61fe4..2a256482fb 100644
--- a/modules/termios
+++ b/modules/termios
@@ -7,6 +7,7 @@ m4/termios_h.m4
m4/pid_t.m4
Depends-on:
+gen-header
include_next
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 ffb9309cf6..e2c2617740 100644
--- a/modules/threads-h
+++ b/modules/threads-h
@@ -17,6 +17,7 @@ m4/threadlib.m4
build-aux/config.rpath
Depends-on:
+gen-header
include_next
snippet/c++defs
snippet/_Noreturn
@@ -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 83c926202e..449bbcd1ec 100644
--- a/modules/time
+++ b/modules/time
@@ -7,6 +7,7 @@ m4/time_h.m4
Depends-on:
extensions
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 608e8c8021..d6ee0ceb84 100644
--- a/modules/uchar
+++ b/modules/uchar
@@ -7,6 +7,7 @@ m4/uchar_h.m4
m4/stdint.m4
Depends-on:
+gen-header
include_next
snippet/c++defs
stdint
@@ -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 209d0b36dc..658da2415b 100644
--- a/modules/unicase/base
+++ b/modules/unicase/base
@@ -6,6 +6,7 @@ lib/unicase.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 b4eee8e7af..6884785207 100644
--- a/modules/unicase/special-casing
+++ b/modules/unicase/special-casing
@@ -7,6 +7,7 @@ lib/unicase/special-casing.c
lib/unicase/special-casing-table.gperf
Depends-on:
+gen-header
gperf
configure.ac:
@@ -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 de9188ad93..1b6f363ee0 100644
--- a/modules/uniconv/base
+++ b/modules/uniconv/base
@@ -9,6 +9,7 @@ lib/localcharset.h
m4/libunistring-base.m4
Depends-on:
+gen-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 41571dc43b..f63605c409 100644
--- a/modules/unictype/base
+++ b/modules/unictype/base
@@ -6,6 +6,7 @@ lib/unictype.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 4a34048852..4c5663698e 100644
--- a/modules/unigbrk/base
+++ b/modules/unigbrk/base
@@ -6,6 +6,7 @@ lib/unigbrk.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 0edce62649..4b1ca60f5b 100644
--- a/modules/unilbrk/base
+++ b/modules/unilbrk/base
@@ -6,6 +6,7 @@ lib/unilbrk.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 80e26224f6..d5a9c64948 100644
--- a/modules/uniname/base
+++ b/modules/uniname/base
@@ -6,6 +6,7 @@ lib/uniname.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 bc23064311..40f40c6fe7 100644
--- a/modules/uninorm/base
+++ b/modules/uninorm/base
@@ -6,6 +6,7 @@ lib/uninorm.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 130b7e5f0f..b0052ef3ae 100644
--- a/modules/unistd
+++ b/modules/unistd
@@ -10,6 +10,7 @@ m4/pid_t.m4
Depends-on:
extern-inline
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 9c746835b7..883305f6e5 100644
--- a/modules/unistdio/base
+++ b/modules/unistdio/base
@@ -6,6 +6,7 @@ lib/unistdio.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 16806eadd1..da47fde431 100644
--- a/modules/unistr/base
+++ b/modules/unistr/base
@@ -6,6 +6,7 @@ lib/unistr.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 14e44a2b3f..c753b36197 100644
--- a/modules/unitypes
+++ b/modules/unitypes
@@ -6,6 +6,7 @@ lib/unitypes.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 f2120f4031..94f7641c49 100644
--- a/modules/uniwbrk/base
+++ b/modules/uniwbrk/base
@@ -6,6 +6,7 @@ lib/uniwbrk.in.h
m4/libunistring-base.m4
Depends-on:
+gen-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 d2cff47eae..6065de69f9 100644
--- a/modules/uniwidth/base
+++ b/modules/uniwidth/base
@@ -7,6 +7,7 @@ lib/localcharset.h
m4/libunistring-base.m4
Depends-on:
+gen-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 54d5cfcc3b..834034c898 100644
--- a/modules/utime-h
+++ b/modules/utime-h
@@ -6,6 +6,7 @@ lib/utime.in.h
m4/utime_h.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 a09e3511a7..556701fd85 100644
--- a/modules/wchar
+++ b/modules/wchar
@@ -8,6 +8,7 @@ m4/wchar_h.m4
m4/wint_t.m4
Depends-on:
+gen-header
include_next
snippet/arg-nonnull
snippet/c++defs
@@ -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 7e2eaddf9f..f4949fab77 100644
--- a/modules/wctype-h
+++ b/modules/wctype-h
@@ -9,6 +9,7 @@ m4/wint_t.m4
Depends-on:
extern-inline
+gen-header
include_next
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: