]> Savannah Git Hosting - gnulib.git/commitdiff
getopt-posix: Fix build on AIX (regression 2021-12-15).
authorBruno Haible <bruno@clisp.org>
Fri, 17 Dec 2021 23:26:13 +0000 (00:26 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 17 Dec 2021 23:26:13 +0000 (00:26 +0100)
* modules/getopt-posix (configure.ac): Arrange to generate
getopt-cdefs.h.
(Makefile.am): Separate the rules for getopt.h and getopt-cdefs.h.

ChangeLog
modules/getopt-posix

index 6fee602cc3e63c9b2ae70cddb31b70e3f43972a9..1b6cc1586046b1b1156469d2d51dcf0b6bfc9dc8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-12-17  Bruno Haible  <bruno@clisp.org>
+
+       getopt-posix: Fix build on AIX (regression 2021-12-15).
+       * modules/getopt-posix (configure.ac): Arrange to generate
+       getopt-cdefs.h.
+       (Makefile.am): Separate the rules for getopt.h and getopt-cdefs.h.
+
 2021-12-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        getopt-posix: omit unnessary building of getopt.h
index b9caa6a4719dd290d18f5ae3a6bf3ef994f68d02..ff950f2fa086868228f7b96e88fa00701b9998d6 100644 (file)
@@ -23,6 +23,7 @@ snippet/arg-nonnull
 configure.ac:
 gl_FUNC_GETOPT_POSIX
 gl_CONDITIONAL_HEADER([getopt.h])
+gl_CONDITIONAL_HEADER([getopt-cdefs.h])
 AC_PROG_MKDIR_P
 if test $REPLACE_GETOPT = 1; then
   AC_LIBOBJ([getopt])
@@ -53,7 +54,12 @@ getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
              < $(srcdir)/getopt.in.h; \
        } > $@-t && \
        mv -f $@-t $@
+else
+getopt.h: $(top_builddir)/config.status
+       rm -f $@
+endif
 
+if GL_GENERATE_GETOPT_CDEFS_H
 getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@@ -62,7 +68,7 @@ getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
        } > $@-t && \
        mv -f $@-t $@
 else
-getopt.h getopt-cdefs.h: $(top_builddir)/config.status
+getopt-cdefs.h: $(top_builddir)/config.status
        rm -f $@
 endif