19 BUILT_SOURCES += unistd.h
21 # We need the following in order to create an empty placeholder for
22 # <unistd.h> when the system doesn't have one.
23 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
24 $(AM_V_GEN)rm -f $@-t $@ && \
25 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
26 sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
27 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
28 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
29 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
30 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
31 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
32 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
33 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
34 -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
35 -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
36 -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
37 -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
38 -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
39 -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
40 -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
41 -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
42 -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
43 -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
44 -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
45 -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
46 -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
47 -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
48 -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
49 -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
50 -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
51 -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
52 -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
53 -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
54 -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
55 -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
56 -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
57 -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
58 -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
59 -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
60 -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
61 -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
62 -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
63 -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
64 -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
65 -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
66 -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
67 -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
68 -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
69 -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
70 -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
71 -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
72 -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
73 -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
74 -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
75 -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
76 < $(srcdir)/unistd.in.h | \
77 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
78 -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
79 -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
80 -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
81 -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
82 -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
83 -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
84 -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
85 -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
86 -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
87 -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
88 -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
89 -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
90 -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
91 -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
92 -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
93 -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
94 -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
95 -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
96 -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
97 -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
98 -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
99 -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
100 -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
101 -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
102 -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
103 -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
104 -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
105 -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
106 -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
107 -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
108 -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
109 -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
110 -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
111 -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
112 -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
113 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
114 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
116 sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
117 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
118 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
119 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
120 -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
121 -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
122 -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
123 -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
124 -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
125 -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
126 -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
127 -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
128 -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
129 -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
130 -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
131 -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
132 -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
133 -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
134 -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
135 -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
136 -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
137 -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
138 -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
139 -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
140 -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
141 -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
142 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
143 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
144 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
145 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
146 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
149 MOSTLYCLEANFILES += unistd.h unistd.h-t