fchdir: use more consistent macro convention
[gnulib.git] / modules / sys_stat
1 Description:
2 A <sys/stat.h> for systems with missing declarations.
3
4 Files:
5 lib/sys_stat.in.h
6 m4/sys_stat_h.m4
7 m4/unistd_h.m4
8
9 Depends-on:
10 include_next
11 link-warning
12
13 configure.ac:
14 gl_HEADER_SYS_STAT_H
15 AC_PROG_MKDIR_P
16
17 Makefile.am:
18 BUILT_SOURCES += $(SYS_STAT_H)
19
20 # We need the following in order to create <sys/stat.h> when the system
21 # has one that is incomplete.
22 sys/stat.h: sys_stat.in.h
23         $(AM_V_at)$(MKDIR_P) sys
24         $(AM_V_GEN)rm -f $@-t $@ && \
25         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
26           sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
27               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
28               -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
29               -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
30               -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
31               -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
32               -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
33               -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
34               -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
35               -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
36               -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
37               < $(srcdir)/sys_stat.in.h; \
38         } > $@-t && \
39         mv $@-t $@
40 MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
41 MOSTLYCLEANDIRS += sys
42
43 Include:
44 #include <sys/stat.h>
45
46 License:
47 LGPLv2+
48
49 Maintainer:
50 all