From f223a0bdeb73b0c6bf94ac004330b7b4f8943dbd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 18 Dec 2021 00:26:13 +0100 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ modules/getopt-posix | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6fee602cc3..1b6cc15860 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-12-17 Bruno Haible + + 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 getopt-posix: omit unnessary building of getopt.h diff --git a/modules/getopt-posix b/modules/getopt-posix index b9caa6a471..ff950f2fa0 100644 --- a/modules/getopt-posix +++ b/modules/getopt-posix @@ -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 -- 2.39.5