[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automake and make include
From: |
Stefano Lattarini |
Subject: |
Re: Automake and make include |
Date: |
Mon, 23 Apr 2012 17:13:02 +0200 |
On 04/23/2012 04:53 PM, Дилян Палаузов wrote:
> Hello,
>
> that is the point. I want to include "Mfilename" in the very beginning of
> Makefile.in.
>
With the current Automake implementation, you basically can't. Sorry.
> You said, that Automake automatically makes sure, that all variables are
> defined, before they are used, but Automake has not idea what Mfilename
> contains (Mfilename does not exist when Automake is run).
>
Your understanding is correct.
> So how can it make sure, that the variables defined in Mfilename are
> defined at the time they are used, when "-include Mfilename" is put
> near the end of Makefile.in (after _SOURCES is defined) and Automake
> has no idea what Mfilename contains?
>
You can't, not with the current Automake implementation.
[BEGIN SHAMELESS ADVERTISEMENT]
I have recently-ish started a friedly fork of Automake, Automake-NG:
<https://lists.gnu.org/mailman/listinfo/automake-ng>
(sorry, it has no real home page yet) that requires GNU make and
aims, among the other things, at making use cases like your possible
eventually; this has recently been accomplished for the $(TESTS)
special variable:
<http://lists.gnu.org/archive/html/automake-ng/2012-04/msg00054.html>
But it will be quite a long time before this could work for the far
more complex beasts like the _SOURCES primary and friends.
[END SHAMELESS ADVERTISEMENT]
> I cannot insert "-include Mfilename" before using any variable,
> because Automake inserts "-include Mfilename" after I have used
> the variables in "_SOURCES" and "_LDADD".
>
And anyway, even including it before wouldn't halp you, because Automake
must process the definitions of things like foo_SOURCES at automake
runtime, not at make time, in order to work.
> So how can I include Mfilename at the beginning of Makefile.in?
>
The sad bottom line is: you can't, and even if you could, it would not
help your use case :-(
Regards,
Stefano