From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23384 invoked by alias); 26 Aug 2009 19:04:53 -0000 Received: (qmail 23217 invoked by uid 22791); 26 Aug 2009 19:04:51 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_102,J_CHICKENPOX_62,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 26 Aug 2009 19:04:46 +0000 Received: (qmail invoked by alias); 26 Aug 2009 19:04:42 -0000 Received: from xdsl-87-78-70-243.netcologne.de (EHLO localhost.localdomain) [87.78.70.243] by mail.gmx.net (mp007) with SMTP; 26 Aug 2009 21:04:42 +0200 Received: from ralf by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1MgNnW-0007cA-8A; Wed, 26 Aug 2009 21:04:42 +0200 Date: Wed, 26 Aug 2009 19:58:00 -0000 From: Ralf Wildenhues To: Rainer Emrich , binutils@sourceware.org Subject: Re: bfdlibdir and bfdincludedir change Message-ID: <20090826190441.GH9074@gmx.de> References: <4A92CE61.6030405@emrich-ebersheim.de> <20090825013103.GI17804@bubble.grove.modra.org> <4A93D50C.4070404@emrich-ebersheim.de> <20090826071947.GN17804@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090826071947.GN17804@bubble.grove.modra.org> User-Agent: Mutt/1.5.20 (2009-08-09) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00488.txt.bz2 Hello Rainer, Alan, * Alan Modra wrote on Wed, Aug 26, 2009 at 09:19:47AM CEST: > On Tue, Aug 25, 2009 at 02:11:56PM +0200, Rainer Emrich wrote: > > That sounds reasonable. But why are the directories created even if > > libbfd is not install at all? > > We used to not create the directories, but Ralf deleted our custom > install rules when converting to the latest autotools. Seems like the > standard automake rules always create the dirs. Thanks for the report and the notification. Indeed the removal of the custom rules changed that. If you'd like the old behavior back, then we can either go back to your old rules, or use the following patch. It uses defined semantics from Automake 1.11 to not create the installation directory if the files aren't installed. However, the Makefile.am files as they are now will currently cause automake to warn unconditionally: $ automake Makefile.am:18: bfdlibdir was already defined in condition TRUE, which includes condition INSTALL_LIBBFD ... configure.in:137: ... `bfdlibdir' previously defined here Makefile.am:19: bfdincludedir was already defined in condition TRUE, which includes condition INSTALL_LIBBFD ... configure.in:137: ... `bfdincludedir' previously defined here Makefile.am:24: bfdlibdir was already defined in condition TRUE, which includes condition !INSTALL_LIBBFD ... Makefile.am:18: ... `bfdlibdir' previously defined here Makefile.am:25: bfdincludedir was already defined in condition TRUE, which includes condition !INSTALL_LIBBFD ... Makefile.am:19: ... `bfdincludedir' previously defined here (-Wno-override won't help here). I can look into fixing the warning in a future automake sometime, but for the moment, you'd have to live with such warnings in opcodes/ and bfd/. (The warning is wrong when AM_SUBST_NOTMAKE is used on these variables, as that prevents the 'foo = @foo@' line in Makefile.in from being produced by automake.) OK to apply? Alternatively, I could also just revert the respective chunks from . Thanks, Ralf Do not create $(bfdlibdir) and $(bfdincludedir) if !INSTALL_LIBBFD. opcodes/ChangeLog: 2009-08-26 Ralf Wildenhues * Makefile.am (bfdlibdir, bfdincludedir): Move definition ... [INSTALL_LIBBFD]: ... here, ... [INSTALL_LIBBFD]: ... and empty overrides here. [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable. [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it. * Makefile.in: Regenerate. * configure: Regenerate. bfd/ChangeLog: 2009-08-26 Ralf Wildenhues * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for bfdlibdir and bfdincludedir. * Makefile.am (bfdlibdir, bfdincludedir): Move definition ... [INSTALL_LIBBFD]: ... here, ... [INSTALL_LIBBFD]: ... and empty overrides here. [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable. [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it. * Makefile.in: Regenerate. * configure: Regenerate. bfd/doc/ChangeLog: 2009-08-26 Ralf Wildenhues * Makefile.in: Regenerate. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 8381492..f6142dc 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -12,16 +12,20 @@ CSEARCH = -I. -I$(srcdir) -I$(INCDIR) SUBDIRS = doc po bfddocdir = doc -bfdlibdir = @bfdlibdir@ -bfdincludedir = @bfdincludedir@ libbfd_la_LDFLAGS = if INSTALL_LIBBFD +bfdlibdir = @bfdlibdir@ +bfdincludedir = @bfdincludedir@ bfdlib_LTLIBRARIES = libbfd.la bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h else !INSTALL_LIBBFD +# Empty these so that the respective installation directories will not be created. +bfdlibdir = +bfdincludedir = +rpath_bfdlibdir = @bfdlibdir@ noinst_LTLIBRARIES = libbfd.la -libbfd_la_LDFLAGS += -rpath $(bfdlibdir) +libbfd_la_LDFLAGS += -rpath $(rpath_bfdlibdir) endif WARN_CFLAGS = @WARN_CFLAGS@ diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4 index cd4fd55..aaa147e 100644 --- a/bfd/acinclude.m4 +++ b/bfd/acinclude.m4 @@ -64,6 +64,8 @@ AC_DEFUN([AM_INSTALL_LIBBFD], bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include' fi AC_SUBST(bfdlibdir) + AM_SUBST_NOTMAKE(bfdlibdir) AC_SUBST(bfdincludedir) + AM_SUBST_NOTMAKE(bfdincludedir) ] ) diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index 465ea05..4f9a390 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -17,16 +17,19 @@ COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(INCLUDES) $(AM_CPPFLAGS) \ $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ -bfdlibdir = @bfdlibdir@ -bfdincludedir = @bfdincludedir@ - libopcodes_la_LDFLAGS = if INSTALL_LIBBFD +bfdlibdir = @bfdlibdir@ +bfdincludedir = @bfdincludedir@ bfdlib_LTLIBRARIES = libopcodes.la bfdinclude_DATA = $(INCDIR)/dis-asm.h else +# Empty these so that the respective installation directories will not be created. +bfdlibdir = +bfdincludedir = +rpath_bfdlibdir = @bfdlibdir@ noinst_LTLIBRARIES = libopcodes.la -libopcodes_la_LDFLAGS += -rpath $(bfdlibdir) +libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) endif # This is where bfd.h lives.