[Top][All Lists]

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

RE: monolithic

From: Robert Collins
Subject: RE: monolithic
Date: Sun, 5 May 2002 12:58:27 +1000

> -----Original Message-----
> From: Tom Tromey [mailto:address@hidden 
> Sent: Sunday, May 05, 2002 11:18 AM

> Long term I'd like us to ease this sort of thing.
> My working idea is to have a new `import' command which is 
> like `include' but understands about directory structure.  So 
> for instance it would know that `bin_PROGRAMS = foo' in 
> subdir would really mean `bin_PROGRAMS = subdir/foo'.  Also 
> all the normal targets would have subdir versions, so you 
> could invoke `make subdir/mostlyclean'.

I hacked up an import command. It was simply a variant on include, that
appended the include prefix to any relative paths. It worked so-so, but
I didn't have time to make it work well enough to submit it. Anyway, for
someone who actually understands automakes innards, it should be pretty
simple: refactor the standard include to perform canonicalisation with a
handed-in prefix, and then for normal include statements, use no prefix,
for imports use the path to the importee as the prefix. I don't have the
code around now, but IIRC I sent a proof-of-concept patch to the list.
> There are a lot of details to solve.  And the implementation 
> will be hard, since it will touch basically everything.

It didn't need to when I fiddled. The things that I ran into have
largely been solved now (subdir_objects etc were more buggy then). All
the rules are subdir and other dir aware, so it's only the
transformation of the include that matters. And I accomplished that by
setting the current logical dir to the one the importee was in before
processing, and restoring the logical dir afterwards.


reply via email to

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