On 4/2/06, A`Tuin <[EMAIL PROTECTED]> wrote:
>
> > I haven't tried that, but doesn't it work if you use wildcards?
> > docs=(subdir1/docs/* subdir2/docs/* subdir3/docs/*)

Watch out for the use of wildcards. They are expanded when the recipe
is sourced, so the results may not be what you want -- current dir is
not $target, at that time they're expanded "the first time"; they will
be a second time _if_ they fail the first time with no matches,
because of bash's weird default behavior and my usage of eval in
Compile. If a match accidentally happens, you're out of luck. The safe
way is to quote the wildcards. Eventually, RecipeLint should check
that, but it is not sophisticated yet to the point of custom-parsing
the recipe.

> That works fine. I have tested it in some recipes. But some times
> doc files are not under a doc dir in the sources.

In the light of your suggestions, I made some changes to Compile which
should improve the behavior of the docs array. But watch out that, for
a program that has a doc/ subdirectory in its sources dir,

docs=("doc")

will copy "doc" itself, ie, it will create /Programs/Foo/1.0/doc/doc.

docs=("doc/*")

will create copy everything under doc/ (including subdirectories,
maintaining path structure), into /Programs/Foo/1.0/doc.

> The major problem is to be able to store files in any place under ./doc.
> I think that the 'doc' array now can't do it.

Yes, it still can't do it. With today's changes, you will get
subdirectories under doc only if you copy entire subdirectories. This
should be enough for most cases, I think.

> At the moment i solve that problems adding code into the recipes (but
> inmo i think that we should try to enable recipes to be as declarative
> as we can).

Sure. This is one of the major tenets of Compile.

> If compile could has a way to adding "plugins" the core of
> Compile could be cleaner and in theory any functionality could be added
> by a "pluging"

I am thinking about ways to do this. Do it while keeping Compile
simple is a major design challenge. The whole autoconf mess started
with this well-intentioned idea of "let's make it extensible".
Extensibility sure is nice, but it has to be done very carefully.

-- Hisham
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to