[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accommodate non-recursive Automake in a less hacky way
From: |
Bruno Haible |
Subject: |
Re: Accommodate non-recursive Automake in a less hacky way |
Date: |
Sat, 18 Dec 2021 00:29:10 +0100 |
These patches contained a mistake regarding module 'getopt-posix':
On AIX I get a build failure
source='../../../getopt-posix/gllib/unistd.c' object='unistd.o' libtool=no
DEPDIR=.deps depmode=xlc /bin/sh ../../../getopt-posix/build-aux/depcomp xlc
-q64 -qthreaded -qtls -DHAVE_CONFIG_H -I. -I../../../getopt-posix/gllib -I..
-DGNULIB_STRICT_CHECKING=1 -I/home/haible/prefix64/include -D_THREAD_SAFE -g
-c -o unistd.o ../../../getopt-posix/gllib/unistd.c
"./unistd.h", line 658.11: 1506-296 (S) #include file <getopt-cdefs.h> not
found.
This patch fixes it.
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.
diff --git a/modules/getopt-posix b/modules/getopt-posix
index b9caa6a47..ff950f2fa 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
- Accommodate non-recursive Automake in a less hacky way, Bruno Haible, 2021/12/15
- Re: Accommodate non-recursive Automake in a less hacky way, Bruno Haible, 2021/12/16
- Re: Accommodate non-recursive Automake in a less hacky way, Paul Eggert, 2021/12/16
- Re: Accommodate non-recursive Automake in a less hacky way,
Bruno Haible <=
- Re: Accommodate non-recursive Automake in a less hacky way, Bruno Haible, 2021/12/18
- Re: Accommodate non-recursive Automake in a less hacky way, Bruno Haible, 2021/12/18