pthread: fix pthread.h creation for srcdir != builddir
[gnulib.git] / modules / getopt-posix
1 Description:
2 getopt() function: process command line arguments.
3
4 Files:
5 lib/getopt.in.h
6 lib/getopt.c
7 lib/getopt1.c
8 lib/getopt_int.h
9 m4/getopt.m4
10
11 Depends-on:
12 gettext-h
13 unistd
14 extensions
15 include_next
16 arg-nonnull
17
18 configure.ac:
19 gl_FUNC_GETOPT_POSIX
20
21 Makefile.am:
22 BUILT_SOURCES += $(GETOPT_H)
23
24 # We need the following in order to create <getopt.h> when the system
25 # doesn't have one that works with the given compiler.
26 getopt.h: getopt.in.h $(ARG_NONNULL_H)
27         $(AM_V_GEN)rm -f $@-t $@ && \
28         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
29           sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
30               -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
31               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
32               -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
33               -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
34               < $(srcdir)/getopt.in.h; \
35         } > $@-t && \
36         mv -f $@-t $@
37 MOSTLYCLEANFILES += getopt.h getopt.h-t
38
39 Include:
40 <unistd.h>
41
42 License:
43 LGPLv2+
44
45 Maintainer:
46 all, glibc