21 BUILT_SOURCES += stdlib.h
23 # We need the following in order to create <stdlib.h> when the system
24 # doesn't have one that works with the given compiler.
25 stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
26 $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
27 $(AM_V_GEN)rm -f $@-t $@ && \
28 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
29 sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
30 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
31 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
32 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
33 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
34 -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
35 -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \
36 -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
37 -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
38 -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
39 -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
40 -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
41 -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
42 -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
43 -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
44 -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
45 -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
46 -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
47 -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
48 -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
49 -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
50 -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \
51 -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
52 -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
53 -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
54 -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
55 -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
56 -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
57 -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
58 -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
59 -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
60 -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
61 -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
62 -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
63 -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
64 -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
65 -e 's/@''GNULIB_STRTOLD''@/$(GNULIB_STRTOLD)/g' \
66 -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
67 -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
68 -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
69 -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
70 -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
71 -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
72 -e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \
73 -e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \
74 -e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \
75 -e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \
76 -e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \
77 < $(srcdir)/stdlib.in.h | \
78 sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
79 -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
80 -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
81 -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
82 -e 's|@''HAVE_DECL_ECVT''@|$(HAVE_DECL_ECVT)|g' \
83 -e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
84 -e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
85 -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
86 -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
87 -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
88 -e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \
89 -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
90 -e 's|@''HAVE_MBTOWC''@|$(HAVE_MBTOWC)|g' \
91 -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
92 -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
93 -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
94 -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
95 -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
96 -e 's|@''HAVE_POSIX_MEMALIGN''@|$(HAVE_POSIX_MEMALIGN)|g' \
97 -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
98 -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
99 -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
100 -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
101 -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
102 -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
103 -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
104 -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
105 -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
106 -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
107 -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
108 -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
109 -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \
110 -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
111 -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
112 -e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \
113 -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
114 -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
115 -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
116 -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
117 -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
118 -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
119 -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
120 -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
121 -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
122 -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
123 -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
124 -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
125 -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
126 -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
127 -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
128 -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
129 -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
130 -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
131 -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
132 -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
133 -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
134 -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
135 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
136 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
137 -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \
138 -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
139 -e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \
140 -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
141 -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
142 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
143 -e '/definition of _Noreturn/r $(_NORETURN_H)' \
144 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
145 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
148 MOSTLYCLEANFILES += stdlib.h stdlib.h-t