automake
[Top][All Lists]
Advanced

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

Re: $(DEPDIR)


From: Bruce Korb
Subject: Re: $(DEPDIR)
Date: Sat, 26 Jun 2010 15:56:02 -0700

Hi Ralf,

On Sat, Jun 26, 2010 at 12:19 PM, Ralf Wildenhues
<address@hidden> wrote:
> Hi Bruce,
>
> * Bruce Korb wrote on Sat, Jun 26, 2010 at 06:30:29PM CEST:
>> I've fiddled my playtime tool "autogen" to emit dependency info:

>> > stamp-opts : $(AUTOGEN_opts_SList)
>> >
>> > $(AUTOGEN_opts_TList) : stamp-opts
>>
>> and now I'd like to integrate that with the @AMDEP_TRUE@ / $(DEPDIR)
>> scheme.  However, I find it a bit daunting to wend my way through
>> the perl stuff to figure out exactly how to play nice with all the
>> make file conditional stuff.  A few pointers to get me started in
>> the right direction would be Very Nice, indeed.
>
> I'm not sure I understand.  What is it that autogen does (sample input X
> leads to output Y when run like Z) and what is it that you want
> Automake (or another tool) to do (input X leads to output Y)?

There are problems with getting make file dependencies correct when
multiple inputs yield multiple output files.  I have resolved this by creating
an output file that will always be older than any other output file.  Thus,
it can be the sentinel file that attests to the build rule having been applied.
Conveniently enough, this sentinel file also contains make file syntax
dependency information.  So, with the addition of:

    include dependency-file-name

make would then know when source files become out of date with
respect to this sentinel file ("dependency-file-name").  However,
looking at the Makefile.in include line:

   @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@

I am guessing that when make supports include and what the include
syntax might be varies from platform to platform.  Further, buried down
in the generated configure somewhere is some code that will create
an essentially empty (dummy) dependency file so that the make include
directive will not fail.

>  Do you
> intend to write a patch for Automake, or is this something purely
> external for one specific project, or to be more generally usable for
> all users of Autogen inside a project using Automake for building?

That would be the hope.  I'd like to augment automake with a standalone
capability to say, "'dependency-file-name' is a build target and it contains
make dependency information for makes that can cope with reading it."
Perhaps along the lines of:

    mymodule_DEPEND_TARGET := dependency-file-name

and a dummy dependency-file-name gets created along with all that
sedding magic to convert that "@am__include@" line into a make inclusion.

I *think* that is what I want, but I am certainly open to a better
suggestion. :-D

Thank you!   Regards, Bruce



reply via email to

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