[Top][All Lists]

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


From: Bruce Korb
Subject: Re: $(DEPDIR)
Date: Tue, 29 Jun 2010 12:27:41 -0700

Hi Ralf,

I'm at work now, so not too much play time available.
But some.

On Mon, Jun 28, 2010 at 10:02 PM, Ralf Wildenhues
<address@hidden> wrote:
>> >  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 shouldn't ask questions containing "or".

I shouldn't answer "or" questions with "yes". :)
I meant to say I agreed with the latter 3/4 of the question --
more generally available to autogen users, but actually usable by any
tool or script that can produce both a sentinel file and a dependency file.
In my case, they are the same file, but that isn't necessarily so.

>>  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.
> That sounds like a good idea to me, but I haven't had time to think
> through the details yet.  One definite problem is namespace issues:
> stamp-opts is too general for use in Automake; what about at least a
> tool prefix, as in ag-stamp-opts, instead, for the file name as well
> as the rule of course?  Better even a couple of knobs to twist.

The "dependency-file-name" can be anything you like.
It would be nice to know it can be:  $(DEPDIR)/whatever
which would mean that use of module_DEPEND_TARGET
implies support gets added for DEPDIR.  Anyway, "stamp-foo" would
be the's author's responsibility and choice.

> Another is the mymodule_DEPEND_TARGET variable name, I don't like that
> yet either.

If you don't like the "DEPEND_TARGET" suffix, please suggest another. :)

> As long as the feature isn't available in Automake, your users can work
> around by adding
> address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
> to their files; this does require the `no-dependencies'
> Automake option to not be used, and it requires one of the compiler
> macros AC_PROG_{CC,CXX,F77,...} to be used.

Since it isn't documented that AC_PROG_xxx will add those substitutions
to the configured values, there isn't a guarantee that the implementation
would not change.  Furthermore, it is really ugly stuff to put in

> Actually, the idea as it stands does not degrade gracefully when the
> author uses the no-dependencies option; in that case, automatic
> dependencies should not be used, but if we drop your file, I think the
> build will fail, no?

There would need to be a well understood way of telling the tool at hand
that no dependencies should be created.  That, for me, would mean a
way to drop the ``-MFwhatever'' option, which ought to look pretty much
like the alternating build rule for languages.

Puzzling on it, I think I'd use this:

agdeparg = -MF$(mymodule_DEPEND_TARGET)
agdeparg =

and use $(agdeparg) instead of alternating text for the entire command.
But that would have to be magic outside the realm of something_DEPEND_TARGET.

reply via email to

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