automake
[Top][All Lists]
Advanced

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

Re: Automake 1.16.1: problem with non-gnu make and gnulib


From: Bob Friesenhahn
Subject: Re: Automake 1.16.1: problem with non-gnu make and gnulib
Date: Sun, 25 Aug 2019 08:07:55 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Sat, 24 Aug 2019, Assaf Gordon wrote:

Hello Bob,

On 2019-08-24 5:26 p.m., Bob Friesenhahn wrote:
On Sat, 24 Aug 2019, Assaf Gordon wrote:

hello_LDADD =  $(top_builddir)/lib/lib$(PACKAGE).a
datamash_LDADD =  $(top_builddir)/lib/lib$(PACKAGE).a

This seems like a bug in those two packages.  It should never be desirable to refer to the build directory other than by using the knowledge that the build is done using the current directory.

Why do you say so?
Is there a reference to somewhere authoritative with such recommendation?

I should qualify that as it is not desirable to refer to the build targets with this syntax. There are other valid uses other than to refer to build targets (e.g. to refer to project include directories and other non-target files). There is nothing authoritative, and it is just my own opinion.

"top_builddir" is supposed to point to the build directory,
and similarly there's "abs_top_builddir", as well as some others:
https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Preset-Output-Variables.html

Why shouldn't they be used?

Adding unnecessary syntax to refer to sources and targets does not seem helpful. Indeed, looking at Makefile.am files I have written, the source files in the source directory are listed without an added ${srcdir} component and targets are listed without any added ${builddir} or ${top_builddir}. It would be unhelpful to add such syntax and it seems likely Automake would not accept it.

Unfortunately, the 'hello' program is supposed to be a reference example of the right things to do.

That,
and the fact it it was working fine for many years and automake versions is the reason I ask why do you think it should not be used.

I do think that Automake should support the syntax (only because it worked before) and that old Makefiles should continue working. Supporting and promoting are two different things. It is useful if there is a warning when unnecessary syntax is used.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt


reply via email to

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