Re: automake warning using lib_LTLIBRARIES
Roger == Roger Leigh [EMAIL PROTECTED] writes: About | if BUILD_LIBGIMPPRINT | lib_LTLIBRARIES = libgimpprint.la | endif | if BUILD_LIBGIMPPRINT | bin_SCRIPTS = gimpprint-config | endif | | EXTRA_SCRIPTS = gimpprint-config | EXTRA_LTLIBRARIES = libgimpprint.la resulting in | `libgimpprint.la' is already going to be installed in `lib' [...] Roger I thought that if you defined something conditionally, Roger you were supposed to put it in an EXTRA_PRIMARY Roger definition too, so that automake knew the full set of Roger stuff that might be built. Roger After all, lib_LTLIBRARIES might just as easily be an Roger @libobject@ autoconf substitution, where automake won't Roger know what might be built. Or, should EXTRA_PRIMARY only Roger be used for this type of conditional? If Automake sees `dir_PRIMARY = fubar' it knows that it must output some rules to build `fubar', even if `dir_PRIMARY' is defined conditionally. However if it sees `dir_PRIMARY = @fubar@', Automake can't guess what `@fubar@' will be substituted with, and can't output any rule to build those unknown targets. That's where the `EXTRA_PRIMARY' helps: it list those targets for which Automake should output build rules. Now, you're right that with most primaries adding a superfluous EXTRA_PRIMARY shouldn't hurt, that's like telling twice to Automake you need building rules for the listed targets. *_LTLIBRARIES is different because in order to build the library you need to know where it will be installed (and pass the appropriate -rpath option to libtool). That means you can't install a library in two different places. From `foo_LTLIBRARIES = mumble.la' Automake knows that `mumble.la' will be installed in `$(foodir)'; but from `EXTRA_LTLIBRARIES = mumble.la' it cannot know where the `mumble.la' will be installed, it could be somewhere else (so this justifies the error message). In the latter case, you have to play some _LDADD trickery to add the right -rpath flag manually, as said in the Automake manual. -- Alexandre Duret-Lutz
Re: automake warning using lib_LTLIBRARIES
On Sat, Jan 26, 2002 at 01:37:26PM +0100, Alexandre Duret-Lutz wrote: If Automake sees `dir_PRIMARY = fubar' it knows that it must output some rules to build `fubar', even if `dir_PRIMARY' is defined conditionally. However if it sees `dir_PRIMARY = @fubar@', Automake can't guess what `@fubar@' will be substituted with, and can't output any rule to build those unknown targets. That's where the `EXTRA_PRIMARY' helps: it list those targets for which Automake should output build rules. Now, you're right that with most primaries adding a superfluous EXTRA_PRIMARY shouldn't hurt, that's like telling twice to Automake you need building rules for the listed targets. *_LTLIBRARIES is different because in order to build the library you need to know where it will be installed (and pass the appropriate -rpath option to libtool). That means you can't install a library in two different places. From `foo_LTLIBRARIES = mumble.la' Automake knows that `mumble.la' will be installed in `$(foodir)'; but from `EXTRA_LTLIBRARIES = mumble.la' it cannot know where the `mumble.la' will be installed, it could be somewhere else (so this justifies the error message). In the latter case, you have to play some _LDADD trickery to add the right -rpath flag manually, as said in the Automake manual. Thanks, that really explains it well. I was using -rpath too, so found the error a bit confusing. Many thanks, Roger -- Roger Leigh ** Registration Number: 151826, http://counter.li.org ** Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/ GPG Public Key: 0x25BFB848 available on public keyservers msg04463/pgp0.pgp Description: PGP signature
automake warning using lib_LTLIBRARIES
I'm getting this warning from automake: roger@whinlatter:~/gimp-print/newbuild$ automake automake: both `configure.ac' and `configure.in' present: ignoring `configure.in' automake: src/main/Makefile.am: `libgimpprint.la' is already going to be installed in `lib' I'm sure this is not my fault. I do not explicitly redefine libdir, and my Makefile.am looks sane. I'm using automake 1.5, and libtool 1.4.2a on Debian GNU/Linux. Is this a libtool issue? The Makefile.am follows. Sorry it's not shortened, but I don't want to cut out the cause of the problem. The '##Programs' section is the relevent one. BTW, just a suggestion. AM_CONDITIONAL only accepts one line for the if or else part. Would it be feasable to use multiple lines? automake could transform multiple lines into several if statements, or there may be a cleaner way. I sometimes wish make conditionals could also be used as well as automake conditionals. Regards, Roger ## $Id: Makefile.am,v 1.31 2001/12/21 01:52:19 rlk Exp $ ## Copyright (C) 2000 Roger Leigh ## ## 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 2, 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, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## Process this file with automake to produce Makefile.in. AUTOMAKE_OPTIONS = 1.4 gnu @SET_MAKE@ MAINT_CHARSET = latin1 ## Variables AM_CFLAGS = $(GNUCFLAGS) INCLUDES = @INCLUDES@ m4datadir = $(datadir)/aclocal pkgconfigdatadir = $(prefix)/lib/pkgconfig ## Programs if BUILD_LIBGIMPPRINT lib_LTLIBRARIES = libgimpprint.la endif if BUILD_LIBGIMPPRINT bin_SCRIPTS = gimpprint-config endif EXTRA_SCRIPTS = gimpprint-config EXTRA_LTLIBRARIES = libgimpprint.la libgimpprint_la_SOURCES = \ gimp-print-internal.h \ print-lexmark.c \ print-canon.c \ print-dither.c \ print-escp2.c \ print-escp2.h \ print-escp2-data.c \ print-pcl.c \ print-ps.c \ print-util.c \ print-color.c \ print-weave.c \ print-version.c \ print-dither-matrices.c \ print-dither.h \ quickmatrix257.h \ ran.367.179.h \ ran.509.131.h libgimpprint_la_LIBADD = $(GIMPPRINT_DEPLIBS) # Uncommment to build an unversioned library (version in soname) libgimpprint_la_LDFLAGS = -release $(GIMPPRINT_VERSION) -rpath $(libdir) # Uncomment to build a versioned library #libgimpprint_la_LDFLAGS = \ # -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ # -rpath $(libdir) ## Data if BUILD_LIBGIMPPRINT m4data_DATA = gimpprint.m4 endif if BUILD_LIBGIMPPRINT pkgconfigdata_DATA = gimpprint.pc endif ## Rules print-util.lo: print-printers.c $(srcdir)/print-util.c print-printers.c: ../printdef/printdef $(srcdir)/printers.xml ../printdef/printdef $(srcdir)/printers.xml print-printers.c printdefl.o: printdefy.o ../printdef/printdef: $(addprefix ../printdef/, printdefl.l printdefy.y printdef.h) cd ../printdef ; \ $(MAKE) ## Clean CLEANFILES = print-printers.c DISTCLEANFILES = gimpprint-config gimpprint-config.in gimpprint.pc gimpprint.pc.in gimpprint.m4 MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = gimpprint.m4.top gimpprint.m4.bot printers.xml -- Roger Leigh ** Registration Number: 151826, http://counter.li.org ** Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/ GPG Public Key: 0x25BFB848 available on public keyservers msg04452/pgp0.pgp Description: PGP signature
Re: automake warning using lib_LTLIBRARIES
Roger Leigh [EMAIL PROTECTED] writes: I'm getting this warning from automake: roger@whinlatter:~/gimp-print/newbuild$ automake automake: both `configure.ac' and `configure.in' present: ignoring `configure.in' automake: src/main/Makefile.am: `libgimpprint.la' is already going to be installed in `lib' [snip] ## Programs if BUILD_LIBGIMPPRINT lib_LTLIBRARIES = libgimpprint.la endif if BUILD_LIBGIMPPRINT bin_SCRIPTS = gimpprint-config endif EXTRA_SCRIPTS = gimpprint-config EXTRA_LTLIBRARIES = libgimpprint.la ^^^ My guess is that it complains about the EXTRA_LTLIBRARIES line. You don't need that line, since automake is supposed to figure it out itself. I'm not sure whether it's a bug or not. - Hari -- Raja R Harinath -- [EMAIL PROTECTED] When all else fails, read the instructions. -- Cahn's Axiom Our policy is, when in doubt, do the right thing. -- Roy L Ash
Re: automake warning using lib_LTLIBRARIES
Raja R Harinath [EMAIL PROTECTED] writes: Roger Leigh [EMAIL PROTECTED] writes: I'm getting this warning from automake: roger@whinlatter:~/gimp-print/newbuild$ automake automake: both `configure.ac' and `configure.in' present: ignoring `configure.in' automake: src/main/Makefile.am: `libgimpprint.la' is already going to be installed in `lib' [snip] ## Programs if BUILD_LIBGIMPPRINT lib_LTLIBRARIES = libgimpprint.la endif if BUILD_LIBGIMPPRINT bin_SCRIPTS = gimpprint-config endif EXTRA_SCRIPTS = gimpprint-config EXTRA_LTLIBRARIES = libgimpprint.la ^^^ My guess is that it complains about the EXTRA_LTLIBRARIES line. You don't need that line, since automake is supposed to figure it out itself. I'm not sure whether it's a bug or not. ^^ I meant, I'm not sure whether the warning above is a bug or not. - Hari -- Raja R Harinath -- [EMAIL PROTECTED] When all else fails, read the instructions. -- Cahn's Axiom Our policy is, when in doubt, do the right thing. -- Roy L Ash