bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake conditional for visibility?


From: Bruno Haible
Subject: Re: automake conditional for visibility?
Date: Wed, 4 Mar 2009 12:04:21 +0100
User-agent: KMail/1.9.9

Simon Josefsson wrote:
> How about this patch?
> +2009-03-04  Simon Josefsson  <address@hidden>
> +
> +       * gnulib-tool (func_emit_lib_Makefile_am): When using the
> +       visibility module, add $(CFLAG_VISIBILITY) to AM_CFLAGS.

This does not need special code in gnulib-tool; you can do it in the
module description.

> +  if echo $modules | grep -q visibility; then

"grep -q" is not portable. The autoconf manual says:

     Don't use `grep -q' to suppress output, because many `grep'
     implementations (e.g., Solaris) do not support `-q'.

I'm adding this:


2009-03-04  Bruno Haible  <address@hidden>

        * modules/visibility (Makefile.am): Augment AM_CFLAGS.
        * gnulib-tool (func_emit_lib_Makefile_am): Emit initialization of
        AM_CFLAGS.
        Reported by Simon Josefsson.

--- gnulib-tool.orig    2009-03-04 12:03:41.000000000 +0100
+++ gnulib-tool 2009-03-04 11:57:20.000000000 +0100
@@ -1932,6 +1932,7 @@
   if test -z "$makefile_name"; then
     echo
     echo "AM_CPPFLAGS ="
+    echo "AM_CFLAGS ="
   fi
   echo
   if LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *+\{0,1\}= 
*$libname\\.$libext\$" allsnippets.tmp > /dev/null; then
--- modules/visibility.orig     2009-03-04 12:03:41.000000000 +0100
+++ modules/visibility  2009-03-04 12:03:14.000000000 +0100
@@ -10,6 +10,11 @@
 gl_VISIBILITY
 
 Makefile.am:
+# The value of $(CFLAG_VISIBILITY) needs to be added to the CFLAGS for the
+# compilation of all sources that make up the library. This line here does it
+# only for the gnulib part of it. The developer is responsible for adding
+# $(CFLAG_VISIBILITY) to the Makefile.ams of the other portions of the library.
+AM_CFLAGS += $(CFLAG_VISIBILITY)
 
 Include:
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]