1 # Copyright (C) 2002-2022 Free Software Foundation, Inc.
3 # This file is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
8 # This file is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this file. If not, see <https://www.gnu.org/licenses/>.
16 # As a special exception to the GNU General Public License,
17 # this file may be distributed as part of a program that
18 # contains a configuration script generated by Autoconf, under
19 # the same distribution terms as the rest of that program.
21 ## begin gnulib module gen-header (2022-02-23)
23 # In 'sed', replace the pattern space with a "DO NOT EDIT" comment.
24 SED_HEADER_NOEDIT = s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,
26 # '$(SED_HEADER_STDOUT) -e "..."' runs 'sed' but first outputs "DO NOT EDIT".
27 SED_HEADER_STDOUT = sed -e 1h -e '1$(SED_HEADER_NOEDIT)' -e 1G
29 # '$(SED_HEADER_TO_AT_t) FILE' copies FILE to $@-t, prepending a leading
30 # "DO_NOT_EDIT". Although this could be done more simply via:
31 # SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) > $@-t
32 # the -n and 'w' avoid a fork+exec, at least when GNU Make is used.
33 SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) -n -e 'w $@-t'
35 # Use $(gl_V_at) instead of $(AM_V_GEN) or $(AM_V_at) on a line that
38 ## end gnulib module gen-header
40 ## begin gnulib module sys_types (2022-02-23)
42 BUILT_SOURCES += sys/types.h
44 # We need the following in order to create <sys/types.h> when the system
45 # doesn't have one that works with the given compiler.
46 sys/types.h: sys_types.in.h $(top_builddir)/config.status
47 $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
48 $(AM_V_at)$(SED_HEADER_STDOUT) \
49 -e 's|@''GUARD_PREFIX''@|GL|g' \
50 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
51 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
52 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
53 -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
54 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
55 -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
56 $(srcdir)/sys_types.in.h > $@-t
58 MOSTLYCLEANFILES += sys/types.h sys/types.h-t
60 EXTRA_DIST += sys_types.in.h
62 ## end gnulib module sys_types
64 ## begin gnulib module alloca-opt (2021-03-07)
66 BUILT_SOURCES += $(ALLOCA_H)
68 # We need the following in order to create <alloca.h> when the system
69 # doesn't have one that works with the given compiler.
70 if GL_GENERATE_ALLOCA_H
71 alloca.h: alloca.in.h $(top_builddir)/config.status
72 $(AM_V_GEN)rm -f $@-t $@ && \
73 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
74 sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \
78 alloca.h: $(top_builddir)/config.status
81 MOSTLYCLEANFILES += alloca.h alloca.h-t
83 EXTRA_DIST += alloca.in.h
85 ## end gnulib module alloca-opt
87 ## begin gnulib module stddef (2022-02-23)
89 BUILT_SOURCES += $(STDDEF_H)
91 # We need the following in order to create <stddef.h> when the system
92 # doesn't have one that works with the given compiler.
93 if GL_GENERATE_STDDEF_H
94 stddef.h: stddef.in.h $(top_builddir)/config.status
95 $(gl_V_at)$(SED_HEADER_STDOUT) \
96 -e 's|@''GUARD_PREFIX''@|GL|g' \
97 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
98 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
99 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
100 -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
101 -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
102 -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
103 -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
104 $(srcdir)/stddef.in.h > $@-t
107 stddef.h: $(top_builddir)/config.status
110 MOSTLYCLEANFILES += stddef.h stddef.h-t
112 EXTRA_DIST += stddef.in.h
114 ## end gnulib module stddef