automake
[Top][All Lists]
Advanced

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

Re: CPPFLAGS for LIBOBJS


From: Ralf Wildenhues
Subject: Re: CPPFLAGS for LIBOBJS
Date: Wed, 23 Apr 2008 21:57:46 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hi Russ,

* Russ Allbery wrote on Wed, Apr 23, 2008 at 02:16:34AM CEST:
> > If I add:
> >
> > portable_libportable_a_CPPFLAGS = $(KRB5_LDFLAGS) $(KAFS_LDFLAGS)
> 
> Er, obviously that should be KRB5_CPPFLAGS and KAFS_CPPFLAGS.  Sorry about
> the confusion.

Should it also be libportable_a_CPPFLAGS instead of portable_&?

> > it has no effect, which after thinking about it for a moment makes some
> > sense.

Unless the above was just a typo, I'm not sure I follow.  The following
test passes with current git Automake as well as with 1.9.6.

Cheers,
Ralf

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8cddc57..91a0e11 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -335,6 +335,7 @@ libobj14.test \
 library.test \
 library2.test \
 library3.test \
+library4.test \
 libtool.test \
 libtool2.test \
 libtool3.test \
diff --git a/tests/library4.test b/tests/library4.test
new file mode 100755
index 0000000..d4f530b
--- /dev/null
+++ b/tests/library4.test
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test for _CPPFLAGS and _CFLAGS with libraries.
+
+. ./defs || exit 1
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_RANLIB
+AM_MAINTAINER_MODE
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+libfoo_a_CPPFLAGS = -Dfoo
+libfoo_a_CFLAGS = -Dbar
+END
+
+cat >foo.c <<'END'
+#ifndef foo
+  choke me
+#endif
+#ifndef bar
+  choke me
+#endif
+int i = 42;
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+./configure
+$MAKE




reply via email to

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