A. Pagaltzis wrote:
* demerphq <[EMAIL PROTECTED]> [2006-03-31 10:10]:

Something like dieing on a use warnings statement in the
makefile or whatever to me constitutes a pre-build failure, not
an install failure.


`s/installer/build script/gi` on Adam’s post and his points still
stand. The whatever-it’s-called whose job it is to generate the
dependency information must take care to never abort and always
produce some useful information, else there’s nothing useful to
do for the whatever-it’s-called whose job it is to take this
information and act on it.

Gtk2-Perl had this problem, where the `Makefile.PL` in Gtk2
depends on the code generation stuff in the Glib distribution,
and both that and the `Makefile.PL` in Glib depend on
ExtUtils::PkgConfig and ExtUtils::Depend. Because of this, it
used to be that saying `cpan -i Gtk2` would fail unless you
manually installed the modules in the right order. Now there is
some hackery to avoid bombing out completely uselessly, but you
still end up having to re-run the command a few times until it
actually succeeds.

I think the way to address this would be for `Makefile.PL` or
equiv. to be able to tell the shell that it couldn’t actually
complete because it requires some missing dependencies, so that
the shell can then go and fetch/build/install those dependencies
and then re-run the `Makefile.PL`. Then the hackery used by the
Gtk2-Perl suite would actually work correctly, without the user
having to re-run commands manually in order to unwind the build
dependency tree.

I guess the problem is that in Makefile.PL strictly speaking you're not _really_ meant to be doing any building of stuff.

That's supposed to be what you do in make.

So one solution to your problem might be to add something that defers that part until make.

For example...erm... take a --make flag in the Makefile.PL that tells it to go off and do the generation of things, and then if not passed --make, run the normal stuff, but add an entry into the appropriate place so that a Makefile rule is added to trigger that callback.

Adam K

Reply via email to