[Top][All Lists]

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

Re: Conventions on build variables

From: Bob Friesenhahn
Subject: Re: Conventions on build variables
Date: Mon, 26 Aug 2019 09:40:22 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Mon, 26 Aug 2019, Sébastien Hinderer wrote:

For instance, regarding variables such as CC or CFLAGS, when they are
passed to configure, should they be recorded somewhere so that a future
invocation of make takes them into account?

Yes, they should normally be recorded in the Makefile so that they are used
in the build.

Okay. Still, I guess if make is invoked with a different value of CC it
is then expected that this new value takes precedence over then one
stored in the Makefile, right?

I would expect that to be true, but I would also expect that the new CC or CFLAGS might not be compatible with what configure figured out using the original settings.

Similarly, I kind of remember that if, say, make install is invoked with
a different value of PREFIX that value must be taken into acocunt and
that it is required that PREFIX can have different values during make
and make isntall. I am wondering whether there is a document which
specifies clearly for which variable this is expected to work that way
and couldn't find anything relevant on the web site of the FSF.

You are likely thinking of 'DESTDIR', which is different than prefix. DESTDIR comes from the build environment and not from the Makefile or configure script.

Otherwise you need to make sure that the necessary
artifacts are in

I don't mind taking care of this, I am just unsure at the moment about
what exactly is expected.

If you are preparing your own Makefile, then following the GNU coding standards as well as the standard definitions documented in the GNU make manual will help quite a lot. The standard INSTALL text file documents many of these conventions.

You will find available substitutions stored in the generated config.status script.

Bob Friesenhahn
GraphicsMagick Maintainer,
Public Key,

reply via email to

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