New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
[gnulib.git] / modules / getopt-posix
index 0a6ee88..63bc6c4 100644 (file)
@@ -13,6 +13,7 @@ gettext-h
 unistd
 extensions
 include_next
+arg-nonnull
 
 configure.ac:
 gl_FUNC_GETOPT_POSIX
@@ -22,7 +23,7 @@ BUILT_SOURCES += $(GETOPT_H)
 
 # We need the following in order to create <getopt.h> when the system
 # doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(LINK_WARNING_H)
+getopt.h: getopt.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
@@ -30,6 +31,7 @@ getopt.h: getopt.in.h $(LINK_WARNING_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
              -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              < $(srcdir)/getopt.in.h; \
        } > $@-t && \
        mv -f $@-t $@