From 76d82d2d7f5ba1a69da6aaa71ff170f5a90a6c94 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 6 Apr 2011 01:55:16 +0200 Subject: [PATCH] Remove leftover generated .h files after config.status changed. * m4/alloca.m4 (gl_FUNC_ALLOCA): New automake conditional GL_GENERATE_ALLOCA_H. * modules/alloca-opt (Makefile.am): Remove alloca.h if GL_GENERATE_ALLOCA_H evaluates to false. * m4/argz.m4 (gl_FUNC_ARGZ): New automake conditional GL_GENERATE_ARGZ_H. * modules/argz (Makefile.am): Remove argz.h if GL_GENERATE_ARGZ_H evaluates to false. * m4/byteswap.m4 (gl_BYTESWAP): New automake conditional GL_GENERATE_BYTESWAP_H. * modules/byteswap (Makefile.am): Remove byteswap.h if GL_GENERATE_BYTESWAP_H evaluates to false. * m4/errno_h.m4 (gl_HEADER_ERRNO_H): New automake conditional GL_GENERATE_ERRNO_H. * modules/errno (Makefile.am): Remove errno.h if GL_GENERATE_ERRNO_H evaluates to false. * m4/float_h.m4 (gl_FLOAT_H): New automake conditional GL_GENERATE_FLOAT_H. * modules/float (Makefile.am): Remove float.h if GL_GENERATE_FLOAT_H evaluates to false. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): New automake conditional GL_GENERATE_FNMATCH_H. * modules/fnmatch (Makefile.am): Remove fnmatch.h if GL_GENERATE_FNMATCH_H evaluates to false. * m4/glob.m4 (gl_GLOB_SUBSTITUTE, gl_GLOB): New automake conditional GL_GENERATE_GLOB_H. * modules/glob (Makefile.am): Remove glob.h if GL_GENERATE_GLOB_H evaluates to false. * m4/iconv_h.m4 (gl_REPLACE_ICONV_H, gl_ICONV_H_DEFAULTS): New automake conditional GL_GENERATE_ICONV_H. * modules/iconv-h (Makefile.am): Remove iconv.h if GL_GENERATE_ICONV_H evaluates to false. * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): New automake conditional GL_GENERATE_NETINET_IN_H. * modules/netinet_in (Makefile.am): Remove netinet/in.h if GL_GENERATE_NETINET_IN_H evaluates to false. * m4/pthread.m4 (gl_PTHREAD_CHECK): Set PTHREAD_H here. New automake conditional GL_GENERATE_PTHREAD_H. (gl_PTHREAD_DEFAULTS): Don't set PTHREAD_H here. * modules/pthread (Makefile.am): Remove pthread.h if GL_GENERATE_PTHREAD_H evaluates to false. * m4/sched_h.m4 (gl_SCHED_H): New automake conditional GL_GENERATE_SCHED_H. * modules/sched (Makefile.am): Remove sched.h if GL_GENERATE_SCHED_H evaluates to false. * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): New automake conditional GL_GENERATE_SELINUX_CONTEXT_H. * modules/selinux-h (Makefile.am): Remove selinux/context.h if GL_GENERATE_SELINUX_CONTEXT_H evaluates to false. * m4/stdarg.m4 (gl_STDARG_H): New automake conditional GL_GENERATE_STDARG_H. * modules/stdarg (Makefile.am): Remove stdarg.h if GL_GENERATE_STDARG_H evaluates to false. * m4/stdbool.m4 (AM_STDBOOL_H): New automake conditional GL_GENERATE_STDBOOL_H. * modules/stdbool (Makefile.am): Remove stdbool.h if GL_GENERATE_STDBOOL_H evaluates to false. * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_H here. New automake conditional GL_GENERATE_STDDEF_H. (gl_STDDEF_H_DEFAULTS): Don't set STDDEF_H here. * modules/stddef (Makefile.am): Remove stddef.h if GL_GENERATE_STDDEF_H evaluates to false. * m4/stdint.m4 (gl_STDINT_H): New automake conditional GL_GENERATE_STDINT_H. * modules/stdint (Makefile.am): Remove stdint.h if GL_GENERATE_STDINT_H evaluates to false. * m4/sysexits.m4 (gl_SYSEXITS): New automake conditional GL_GENERATE_SYSEXITS_H. * modules/sysexits (Makefile.am): Remove sysexits.h if GL_GENERATE_SYSEXITS_H evaluates to false. Reported by Karl Berry and Ralf Wildenhues. --- ChangeLog | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ m4/alloca.m4 | 3 +- m4/argz.m4 | 3 +- m4/byteswap.m4 | 3 +- m4/errno_h.m4 | 3 +- m4/float_h.m4 | 3 +- m4/fnmatch.m4 | 3 +- m4/glob.m4 | 10 ++++-- m4/iconv_h.m4 | 4 ++- m4/netinet_in_h.m4 | 3 +- m4/pthread.m4 | 5 ++- m4/sched_h.m4 | 3 +- m4/selinux-context-h.m4 | 3 +- m4/stdarg.m4 | 9 +++-- m4/stdbool.m4 | 3 +- m4/stddef_h.m4 | 6 ++-- m4/stdint.m4 | 3 +- m4/sysexits.m4 | 3 +- modules/alloca-opt | 7 +++- modules/argz | 7 +++- modules/byteswap | 7 +++- modules/errno | 5 +++ modules/float | 5 +++ modules/fnmatch | 7 +++- modules/glob | 5 +++ modules/iconv-h | 5 +++ modules/netinet_in | 5 +++ modules/pthread | 5 +++ modules/sched | 5 +++ modules/selinux-h | 5 +++ modules/stdarg | 5 +++ modules/stdbool | 5 +++ modules/stddef | 5 +++ modules/stdint | 5 +++ modules/sysexits | 5 +++ 35 files changed, 230 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3dc209bdb..7ac579802 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,98 @@ 2011-04-05 Bruno Haible + Remove leftover generated .h files after config.status changed. + + * m4/alloca.m4 (gl_FUNC_ALLOCA): New automake conditional + GL_GENERATE_ALLOCA_H. + * modules/alloca-opt (Makefile.am): Remove alloca.h if + GL_GENERATE_ALLOCA_H evaluates to false. + + * m4/argz.m4 (gl_FUNC_ARGZ): New automake conditional + GL_GENERATE_ARGZ_H. + * modules/argz (Makefile.am): Remove argz.h if GL_GENERATE_ARGZ_H + evaluates to false. + + * m4/byteswap.m4 (gl_BYTESWAP): New automake conditional + GL_GENERATE_BYTESWAP_H. + * modules/byteswap (Makefile.am): Remove byteswap.h if + GL_GENERATE_BYTESWAP_H evaluates to false. + + * m4/errno_h.m4 (gl_HEADER_ERRNO_H): New automake conditional + GL_GENERATE_ERRNO_H. + * modules/errno (Makefile.am): Remove errno.h if GL_GENERATE_ERRNO_H + evaluates to false. + + * m4/float_h.m4 (gl_FLOAT_H): New automake conditional + GL_GENERATE_FLOAT_H. + * modules/float (Makefile.am): Remove float.h if GL_GENERATE_FLOAT_H + evaluates to false. + + * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): New automake conditional + GL_GENERATE_FNMATCH_H. + * modules/fnmatch (Makefile.am): Remove fnmatch.h if + GL_GENERATE_FNMATCH_H evaluates to false. + + * m4/glob.m4 (gl_GLOB_SUBSTITUTE, gl_GLOB): New automake conditional + GL_GENERATE_GLOB_H. + * modules/glob (Makefile.am): Remove glob.h if GL_GENERATE_GLOB_H + evaluates to false. + + * m4/iconv_h.m4 (gl_REPLACE_ICONV_H, gl_ICONV_H_DEFAULTS): New + automake conditional GL_GENERATE_ICONV_H. + * modules/iconv-h (Makefile.am): Remove iconv.h if GL_GENERATE_ICONV_H + evaluates to false. + + * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): New automake conditional + GL_GENERATE_NETINET_IN_H. + * modules/netinet_in (Makefile.am): Remove netinet/in.h if + GL_GENERATE_NETINET_IN_H evaluates to false. + + * m4/pthread.m4 (gl_PTHREAD_CHECK): Set PTHREAD_H here. New automake + conditional GL_GENERATE_PTHREAD_H. + (gl_PTHREAD_DEFAULTS): Don't set PTHREAD_H here. + * modules/pthread (Makefile.am): Remove pthread.h if + GL_GENERATE_PTHREAD_H evaluates to false. + + * m4/sched_h.m4 (gl_SCHED_H): New automake conditional + GL_GENERATE_SCHED_H. + * modules/sched (Makefile.am): Remove sched.h if GL_GENERATE_SCHED_H + evaluates to false. + + * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): New automake + conditional GL_GENERATE_SELINUX_CONTEXT_H. + * modules/selinux-h (Makefile.am): Remove selinux/context.h if + GL_GENERATE_SELINUX_CONTEXT_H evaluates to false. + + * m4/stdarg.m4 (gl_STDARG_H): New automake conditional + GL_GENERATE_STDARG_H. + * modules/stdarg (Makefile.am): Remove stdarg.h if + GL_GENERATE_STDARG_H evaluates to false. + + * m4/stdbool.m4 (AM_STDBOOL_H): New automake conditional + GL_GENERATE_STDBOOL_H. + * modules/stdbool (Makefile.am): Remove stdbool.h if + GL_GENERATE_STDBOOL_H evaluates to false. + + * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_H here. New automake + conditional GL_GENERATE_STDDEF_H. + (gl_STDDEF_H_DEFAULTS): Don't set STDDEF_H here. + * modules/stddef (Makefile.am): Remove stddef.h if + GL_GENERATE_STDDEF_H evaluates to false. + + * m4/stdint.m4 (gl_STDINT_H): New automake conditional + GL_GENERATE_STDINT_H. + * modules/stdint (Makefile.am): Remove stdint.h if + GL_GENERATE_STDINT_H evaluates to false. + + * m4/sysexits.m4 (gl_SYSEXITS): New automake conditional + GL_GENERATE_SYSEXITS_H. + * modules/sysexits (Makefile.am): Remove sysexits.h if + GL_GENERATE_SYSEXITS_H evaluates to false. + + Reported by Karl Berry and Ralf Wildenhues. + +2011-04-05 Bruno Haible + Ensure to rebuild generated .h files when config.status has changed. * modules/arpa_inet (Makefile.am): Add dependency from .h file to config.status. diff --git a/m4/alloca.m4 b/m4/alloca.m4 index e2e8a05a6..689da75a2 100644 --- a/m4/alloca.m4 +++ b/m4/alloca.m4 @@ -1,4 +1,4 @@ -# alloca.m4 serial 10 +# alloca.m4 serial 11 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -36,6 +36,7 @@ AC_DEFUN([gl_FUNC_ALLOCA], ALLOCA_H=alloca.h fi AC_SUBST([ALLOCA_H]) + AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"]) ]) # Prerequisites of lib/alloca.c. diff --git a/m4/argz.m4 b/m4/argz.m4 index f4fa3a0da..0248a453d 100644 --- a/m4/argz.m4 +++ b/m4/argz.m4 @@ -7,7 +7,7 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 8 argz.m4 +# serial 9 argz.m4 AC_DEFUN([gl_FUNC_ARGZ], [gl_PREREQ_ARGZ @@ -74,6 +74,7 @@ AS_IF([test -z "$ARGZ_H"], AC_LIBOBJ([argz])])]) AC_SUBST([ARGZ_H]) +AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"]) ]) # Prerequisites of lib/argz.c. diff --git a/m4/byteswap.m4 b/m4/byteswap.m4 index a033acd8d..2d4de4659 100644 --- a/m4/byteswap.m4 +++ b/m4/byteswap.m4 @@ -1,4 +1,4 @@ -# byteswap.m4 serial 3 +# byteswap.m4 serial 4 dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -15,4 +15,5 @@ AC_DEFUN([gl_BYTESWAP], BYTESWAP_H='byteswap.h' ]) AC_SUBST([BYTESWAP_H]) + AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"]) ]) diff --git a/m4/errno_h.m4 b/m4/errno_h.m4 index 687bafff2..a6d37f3b3 100644 --- a/m4/errno_h.m4 +++ b/m4/errno_h.m4 @@ -1,4 +1,4 @@ -# errno_h.m4 serial 8 +# errno_h.m4 serial 9 dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -54,6 +54,7 @@ booboo ERRNO_H='errno.h' fi AC_SUBST([ERRNO_H]) + AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) diff --git a/m4/float_h.m4 b/m4/float_h.m4 index 265a4c1a6..21a7529fe 100644 --- a/m4/float_h.m4 +++ b/m4/float_h.m4 @@ -1,4 +1,4 @@ -# float_h.m4 serial 5 +# float_h.m4 serial 6 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,4 +16,5 @@ AC_DEFUN([gl_FLOAT_H], ;; esac AC_SUBST([FLOAT_H]) + AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) ]) diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index 9b537a7e0..c8ed9e74e 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -1,4 +1,4 @@ -# Check for fnmatch - serial 5. +# Check for fnmatch - serial 6. # Copyright (C) 2000-2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -139,6 +139,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], AC_CHECK_HEADERS_ONCE([wctype.h]) fi AC_SUBST([FNMATCH_H]) + AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) ]) # Request a POSIX compliant fnmatch function with GNU extensions. diff --git a/m4/glob.m4 b/m4/glob.m4 index 759c6f84f..4b79148d3 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 11 +# glob.m4 serial 12 dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,11 +10,12 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_GLOB_SUBSTITUTE], [ + AC_LIBOBJ([glob]) gl_PREREQ_GLOB GLOB_H=glob.h - AC_LIBOBJ([glob]) AC_SUBST([GLOB_H]) + AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) ]) AC_DEFUN([gl_GLOB], @@ -65,8 +66,11 @@ if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;]])], rm -f conf$$-globtest if test -n "$GLOB_H"; then - gl_GLOB_SUBSTITUTE + AC_LIBOBJ([glob]) + gl_PREREQ_GLOB fi + AC_SUBST([GLOB_H]) + AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) ]) # Prerequisites of lib/glob.*. diff --git a/m4/iconv_h.m4 b/m4/iconv_h.m4 index abfacffb4..8cca7fd80 100644 --- a/m4/iconv_h.m4 +++ b/m4/iconv_h.m4 @@ -1,4 +1,4 @@ -# iconv_h.m4 serial 7 +# iconv_h.m4 serial 8 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,6 +18,7 @@ AC_DEFUN([gl_REPLACE_ICONV_H], [ AC_REQUIRE([gl_ICONV_H_DEFAULTS]) ICONV_H='iconv.h' + AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"]) ]) AC_DEFUN([gl_ICONV_MODULE_INDICATOR], @@ -36,4 +37,5 @@ AC_DEFUN([gl_ICONV_H_DEFAULTS], REPLACE_ICONV_OPEN=0; AC_SUBST([REPLACE_ICONV_OPEN]) REPLACE_ICONV_UTF=0; AC_SUBST([REPLACE_ICONV_UTF]) ICONV_H=''; AC_SUBST([ICONV_H]) + AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"]) ]) diff --git a/m4/netinet_in_h.m4 b/m4/netinet_in_h.m4 index e2d022df7..87235b73b 100644 --- a/m4/netinet_in_h.m4 +++ b/m4/netinet_in_h.m4 @@ -1,4 +1,4 @@ -# netinet_in_h.m4 serial 4 +# netinet_in_h.m4 serial 5 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -27,4 +27,5 @@ AC_DEFUN([gl_HEADER_NETINET_IN], AC_SUBST([HAVE_NETINET_IN_H]) fi AC_SUBST([NETINET_IN_H]) + AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"]) ]) diff --git a/m4/pthread.m4 b/m4/pthread.m4 index 9f77cde09..6111185fb 100644 --- a/m4/pthread.m4 +++ b/m4/pthread.m4 @@ -30,7 +30,11 @@ AC_DEFUN([gl_PTHREAD_CHECK], test $ac_cv_type_pthread_t != yes || test $ac_cv_type_pthread_spinlock_t != yes; then PTHREAD_H='pthread.h' + else + PTHREAD_H= fi + AC_SUBST([PTHREAD_H]) + AM_CONDITIONAL([GL_GENERATE_PTHREAD_H], [test -n "$PTHREAD_H"]) LIB_PTHREAD= if test $ac_cv_header_pthread_h = yes; then @@ -53,5 +57,4 @@ AC_DEFUN([gl_PTHREAD_DEFAULTS], HAVE_PTHREAD_H=1; AC_SUBST([HAVE_PTHREAD_H]) HAVE_PTHREAD_T=1; AC_SUBST([HAVE_PTHREAD_T]) HAVE_PTHREAD_SPINLOCK_T=1; AC_SUBST([HAVE_PTHREAD_SPINLOCK_T]) - PTHREAD_H=''; AC_SUBST([PTHREAD_H]) ]) diff --git a/m4/sched_h.m4 b/m4/sched_h.m4 index 6a46e4745..9cff89195 100644 --- a/m4/sched_h.m4 +++ b/m4/sched_h.m4 @@ -1,4 +1,4 @@ -# sched_h.m4 serial 3 +# sched_h.m4 serial 4 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -32,4 +32,5 @@ AC_DEFUN([gl_SCHED_H], AC_SUBST([HAVE_STRUCT_SCHED_PARAM]) ]) AC_SUBST([SCHED_H]) + AM_CONDITIONAL([GL_GENERATE_SCHED_H], [test -n "$SCHED_H"]) ]) diff --git a/m4/selinux-context-h.m4 b/m4/selinux-context-h.m4 index 227ab6bfc..54a388db7 100644 --- a/m4/selinux-context-h.m4 +++ b/m4/selinux-context-h.m4 @@ -1,4 +1,4 @@ -# serial 2 -*- Autoconf -*- +# serial 3 -*- Autoconf -*- # Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -18,4 +18,5 @@ AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H], SELINUX_CONTEXT_H=selinux/context.h fi AC_SUBST([SELINUX_CONTEXT_H]) + AM_CONDITIONAL([GL_GENERATE_SELINUX_CONTEXT_H], [test -n "$SELINUX_CONTEXT_H"]) ]) diff --git a/m4/stdarg.m4 b/m4/stdarg.m4 index a1ef178c5..5705de9ec 100644 --- a/m4/stdarg.m4 +++ b/m4/stdarg.m4 @@ -1,4 +1,4 @@ -# stdarg.m4 serial 5 +# stdarg.m4 serial 6 dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,8 +9,8 @@ dnl Provide a working va_copy in combination with . AC_DEFUN([gl_STDARG_H], [ - STDARG_H=''; AC_SUBST([STDARG_H]) - NEXT_STDARG_H=''; AC_SUBST([NEXT_STDARG_H]) + STDARG_H='' + NEXT_STDARG_H='' AC_MSG_CHECKING([for va_copy]) AC_CACHE_VAL([gl_cv_func_va_copy], [ AC_COMPILE_IFELSE( @@ -72,4 +72,7 @@ error, bail out fi fi fi + AC_SUBST([STDARG_H]) + AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"]) + AC_SUBST([NEXT_STDARG_H]) ]) diff --git a/m4/stdbool.m4 b/m4/stdbool.m4 index 838cf0f46..1ebf3e680 100644 --- a/m4/stdbool.m4 +++ b/m4/stdbool.m4 @@ -5,7 +5,7 @@ dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -#serial 4 +#serial 5 # Prepare for substituting if it is not supported. @@ -21,6 +21,7 @@ AC_DEFUN([AM_STDBOOL_H], STDBOOL_H='stdbool.h' fi AC_SUBST([STDBOOL_H]) + AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4 index 1942b6aa0..1ae234431 100644 --- a/m4/stddef_h.m4 +++ b/m4/stddef_h.m4 @@ -1,5 +1,5 @@ dnl A placeholder for POSIX 2008 , for platforms that have issues. -# stddef_h.m4 serial 3 +# stddef_h.m4 serial 4 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,6 +9,7 @@ AC_DEFUN([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) + STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -24,6 +25,8 @@ AC_DEFUN([gl_STDDEF_H], REPLACE_NULL=1 STDDEF_H=stddef.h fi + AC_SUBST([STDDEF_H]) + AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) if test -n "$STDDEF_H"; then gl_NEXT_HEADERS([stddef.h]) fi @@ -41,5 +44,4 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS], dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) - STDDEF_H=''; AC_SUBST([STDDEF_H]) ]) diff --git a/m4/stdint.m4 b/m4/stdint.m4 index e7d0d0765..dff37fe1b 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 39 +# stdint.m4 serial 40 dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -305,6 +305,7 @@ static const char *macro_values[] = STDINT_H=stdint.h fi AC_SUBST([STDINT_H]) + AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) diff --git a/m4/sysexits.m4 b/m4/sysexits.m4 index 4d1457227..cff6606c6 100644 --- a/m4/sysexits.m4 +++ b/m4/sysexits.m4 @@ -1,4 +1,4 @@ -# sysexits.m4 serial 5 +# sysexits.m4 serial 6 dnl Copyright (C) 2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -40,4 +40,5 @@ AC_DEFUN([gl_SYSEXITS], fi AC_SUBST([HAVE_SYSEXITS_H]) AC_SUBST([SYSEXITS_H]) + AM_CONDITIONAL([GL_GENERATE_SYSEXITS_H], [test -n "$SYSEXITS_H"]) ]) diff --git a/modules/alloca-opt b/modules/alloca-opt index 9ced93b29..d4468de5c 100644 --- a/modules/alloca-opt +++ b/modules/alloca-opt @@ -17,12 +17,17 @@ BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. -alloca.h: alloca.in.h +if GL_GENERATE_ALLOCA_H +alloca.h: alloca.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ +else +alloca.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += alloca.h alloca.h-t Include: diff --git a/modules/argz b/modules/argz index 5f9c7499d..0c56ac768 100644 --- a/modules/argz +++ b/modules/argz @@ -22,12 +22,17 @@ BUILT_SOURCES += $(ARGZ_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. -argz.h: argz.in.h +if GL_GENERATE_ARGZ_H +argz.h: argz.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/argz.in.h; \ } > $@-t && \ mv -f $@-t $@ +else +argz.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += argz.h argz.h-t Include: diff --git a/modules/byteswap b/modules/byteswap index 6a3ce1525..c1da40074 100644 --- a/modules/byteswap +++ b/modules/byteswap @@ -15,12 +15,17 @@ BUILT_SOURCES += $(BYTESWAP_H) # We need the following in order to create when the system # doesn't have one. -byteswap.h: byteswap.in.h +if GL_GENERATE_BYTESWAP_H +byteswap.h: byteswap.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/byteswap.in.h; \ } > $@-t && \ mv -f $@-t $@ +else +byteswap.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += byteswap.h byteswap.h-t Include: diff --git a/modules/errno b/modules/errno index cae6bbbdc..951690155 100644 --- a/modules/errno +++ b/modules/errno @@ -16,6 +16,7 @@ BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create when the system # doesn't have one that is POSIX compliant. +if GL_GENERATE_ERRNO_H errno.h: errno.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @@ -32,6 +33,10 @@ errno.h: errno.in.h $(top_builddir)/config.status < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ +else +errno.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += errno.h errno.h-t Include: diff --git a/modules/float b/modules/float index 7f56d6c6b..4a1c16a53 100644 --- a/modules/float +++ b/modules/float @@ -16,6 +16,7 @@ BUILT_SOURCES += $(FLOAT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_FLOAT_H float.h: float.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @@ -26,6 +27,10 @@ float.h: float.in.h $(top_builddir)/config.status < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ +else +float.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += float.h float.h-t Include: diff --git a/modules/fnmatch b/modules/fnmatch index bf7158fb9..fde25a173 100644 --- a/modules/fnmatch +++ b/modules/fnmatch @@ -28,13 +28,18 @@ BUILT_SOURCES += $(FNMATCH_H) # We need the following in order to create when the system # doesn't have one that supports the required API. -fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H) +if GL_GENERATE_FNMATCH_H +fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/fnmatch.in.h; \ } > $@-t && \ mv -f $@-t $@ +else +fnmatch.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t Include: diff --git a/modules/glob b/modules/glob index 15f202207..114cb6d12 100644 --- a/modules/glob +++ b/modules/glob @@ -34,6 +34,7 @@ BUILT_SOURCES += $(GLOB_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_GLOB_H glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -44,6 +45,10 @@ glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( < $(srcdir)/glob.in.h; \ } > $@-t && \ mv -f $@-t $@ +else +glob.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += glob.h glob.h-t Include: diff --git a/modules/iconv-h b/modules/iconv-h index 7cca5c5cc..82330f6d0 100644 --- a/modules/iconv-h +++ b/modules/iconv-h @@ -19,6 +19,7 @@ BUILT_SOURCES += $(ICONV_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_ICONV_H iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @@ -37,6 +38,10 @@ iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) < $(srcdir)/iconv.in.h; \ } > $@-t && \ mv $@-t $@ +else +iconv.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += iconv.h iconv.h-t Include: diff --git a/modules/netinet_in b/modules/netinet_in index b52aa4d9c..da680810b 100644 --- a/modules/netinet_in +++ b/modules/netinet_in @@ -18,6 +18,7 @@ BUILT_SOURCES += $(NETINET_IN_H) # We need the following in order to create when the system # doesn't have one. +if GL_GENERATE_NETINET_IN_H netinet/in.h: netinet_in.in.h $(top_builddir)/config.status $(AM_V_at)$(MKDIR_P) netinet $(AM_V_GEN)rm -f $@-t $@ && \ @@ -30,6 +31,10 @@ netinet/in.h: netinet_in.in.h $(top_builddir)/config.status < $(srcdir)/netinet_in.in.h; \ } > $@-t && \ mv $@-t $@ +else +netinet/in.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t MOSTLYCLEANDIRS += netinet diff --git a/modules/pthread b/modules/pthread index 2a729397a..3a00c7721 100644 --- a/modules/pthread +++ b/modules/pthread @@ -17,6 +17,7 @@ BUILT_SOURCES += $(PTHREAD_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_PTHREAD_H pthread.h: pthread.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -30,6 +31,10 @@ pthread.h: pthread.in.h $(top_builddir)/config.status < $(srcdir)/pthread.in.h; \ } > $@-t && \ mv $@-t $@ +else +pthread.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += pthread.h pthread.h-t Include: diff --git a/modules/sched b/modules/sched index ac17479a0..e0a3936b2 100644 --- a/modules/sched +++ b/modules/sched @@ -16,6 +16,7 @@ BUILT_SOURCES += $(SCHED_H) # We need the following in order to create a replacement for when # the system doesn't have one. +if GL_GENERATE_SCHED_H sched.h: sched.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -28,6 +29,10 @@ sched.h: sched.in.h $(top_builddir)/config.status < $(srcdir)/sched.in.h; \ } > $@-t && \ mv $@-t $@ +else +sched.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += sched.h sched.h-t Include: diff --git a/modules/selinux-h b/modules/selinux-h index 7df7c5a0f..66429f7b5 100644 --- a/modules/selinux-h +++ b/modules/selinux-h @@ -37,6 +37,7 @@ selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAME MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t BUILT_SOURCES += $(SELINUX_CONTEXT_H) +if GL_GENERATE_SELINUX_CONTEXT_H selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) $(AM_V_at)$(MKDIR_P) selinux $(AM_V_GEN)rm -f $@-t $@ && \ @@ -46,6 +47,10 @@ selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAME } > $@-t && \ chmod a-x $@-t && \ mv $@-t $@ +else +selinux/context.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t MOSTLYCLEANDIRS += selinux diff --git a/modules/stdarg b/modules/stdarg index 10ac47410..6cb1db864 100644 --- a/modules/stdarg +++ b/modules/stdarg @@ -23,6 +23,7 @@ BUILT_SOURCES += $(STDARG_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_STDARG_H stdarg.h: stdarg.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @@ -33,6 +34,10 @@ stdarg.h: stdarg.in.h $(top_builddir)/config.status < $(srcdir)/stdarg.in.h; \ } > $@-t && \ mv $@-t $@ +else +stdarg.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += stdarg.h stdarg.h-t Include: diff --git a/modules/stdbool b/modules/stdbool index 7df3cc521..cfb9aac84 100644 --- a/modules/stdbool +++ b/modules/stdbool @@ -16,12 +16,17 @@ BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create when the system # doesn't have one that works. +if GL_GENERATE_STDBOOL_H stdbool.h: stdbool.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ +else +stdbool.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += stdbool.h stdbool.h-t Include: diff --git a/modules/stddef b/modules/stddef index 23a6fb56a..94b57da9b 100644 --- a/modules/stddef +++ b/modules/stddef @@ -17,6 +17,7 @@ BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_STDDEF_H stddef.h: stddef.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @@ -29,6 +30,10 @@ stddef.h: stddef.in.h $(top_builddir)/config.status < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ +else +stddef.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += stddef.h stddef.h-t Include: diff --git a/modules/stdint b/modules/stdint index 2878da6d3..c11825a12 100644 --- a/modules/stdint +++ b/modules/stdint @@ -23,6 +23,7 @@ BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_STDINT_H stdint.h: stdint.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -55,6 +56,10 @@ stdint.h: stdint.in.h $(top_builddir)/config.status < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ +else +stdint.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += stdint.h stdint.h-t Include: diff --git a/modules/sysexits b/modules/sysexits index 616ddb9da..ed0d48866 100644 --- a/modules/sysexits +++ b/modules/sysexits @@ -16,6 +16,7 @@ BUILT_SOURCES += $(SYSEXITS_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_SYSEXITS_H sysexits.h: sysexits.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -27,6 +28,10 @@ sysexits.h: sysexits.in.h $(top_builddir)/config.status < $(srcdir)/sysexits.in.h; \ } > $@-t && \ mv -f $@-t $@ +else +sysexits.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += sysexits.h sysexits.h-t Include: -- 2.11.0