[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake conditional for visibility?
From: |
Simon Josefsson |
Subject: |
Re: automake conditional for visibility? |
Date: |
Wed, 04 Mar 2009 11:33:40 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> Simon Josefsson wrote:
>> However, one question. The document says:
>>
>> 1. Add address@hidden@' or (in a Makefile.am)
>> `$(CFLAG_VISIBILITY)' to the CFLAGS for the compilation of the
>> sources that make up the library.
>>
>> Does this include source code in helper libraries, such as gnulib?
>
> Yes, sure. Otherwise the symbols coming from these source files will be
> exported from the library.
Ok.
>> In other words, should the gnulib generated Makefile.am add the
>> $(CFLAG_VISIBILITY) to AM_CFLAGS?
>
> Good question. I would assume that you are using the --makefile-name option,
> so that you can augment/customize AM_CPPFLAGS and other automake variables?
Actually I am not. How about this patch?
/Simon
diff --git a/ChangeLog b/ChangeLog
index 86a7852..f59284d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2009-03-03 Bruno Haible <address@hidden>
* doc/visibility.texi: Recommend to use HAVE_VISIBILITY as a C macro.
diff --git a/gnulib-tool b/gnulib-tool
index 5882c68..56f51dc 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -1933,6 +1933,9 @@ func_emit_lib_Makefile_am ()
echo
echo "AM_CPPFLAGS ="
fi
+ if echo $modules | grep -q visibility; then
+ echo "AM_CFLAGS $assign \$(CFLAG_VISIBILITY)"
+ fi
echo
if LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *+\{0,1\}=
*$libname\\.$libext\$" allsnippets.tmp > /dev/null; then
# One of the snippets already specifies an installation location for the