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_ATOLL''@/$(GNULIB_ATOLL)/g' \
36 -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
37 -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
38 -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
39 -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
40 -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
41 -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
42 -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
43 -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
44 -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
45 -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
46 -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
47 -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
48 -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
49 -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
50 -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
51 -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
52 -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
53 -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
54 -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
55 -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
56 -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
57 -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
58 -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
59 -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
60 -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
61 -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
62 -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
63 -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
64 -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
65 -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
66 -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
67 -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
68 < $(srcdir)/stdlib.in.h | \
69 sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
70 -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
71 -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
72 -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
73 -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
74 -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
75 -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
76 -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
77 -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
78 -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
79 -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
80 -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
81 -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
82 -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
83 -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
84 -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
85 -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
86 -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
87 -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
88 -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
89 -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
90 -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
91 -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
92 -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
93 -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
94 -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
95 -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
96 -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
97 -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
98 -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
99 -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
100 -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
101 -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
102 -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
103 -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
104 -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
105 -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
106 -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
107 -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
108 -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
109 -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
110 -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
111 -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
112 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
113 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
114 -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
115 -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
116 -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
117 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
118 -e '/definition of _Noreturn/r $(_NORETURN_H)' \
119 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
120 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
123 MOSTLYCLEANFILES += stdlib.h stdlib.h-t