19 BUILT_SOURCES += dirent.h
21 # We need the following in order to create <dirent.h> when the system
22 # doesn't have one that works with the given compiler.
23 dirent.h: dirent.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_DIRENT_H''@|$(HAVE_DIRENT_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_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
32 -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
33 -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
34 -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
35 -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
36 -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
37 -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
38 -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
39 -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
40 -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
41 -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
42 -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
43 -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
44 -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
45 -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
46 -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
47 -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
48 -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
49 -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
50 -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
51 -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
52 -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
53 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
54 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
55 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
56 < $(srcdir)/dirent.in.h; \
59 MOSTLYCLEANFILES += dirent.h dirent.h-t