Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #32280] [PATCH] Detects presence of perldoc at configuration time

5 views
Skip to first unread message

James deBoer

unread,
Nov 1, 2004, 5:56:59 PM11/1/04
to bugs-bi...@rt.perl.org
# New Ticket Created by James deBoer
# Please include the string: [perl #32280]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32280 >


Some systems, notable Debian, ship perldoc and perl as seperate
packages. The presence of Perl does not imply the presence of perldoc.

This patch will test to see if perldoc actually works, aborting the
configuration if it does not.

I was considering making the build system not build the documentation if perldoc
did not exist. However, I felt that (a) a perldoc-less Perl is a broken
Perl, and (b) currently, parrot should ship with a lot of documentation. If
somebody feels otherwise, I would be happy to revise the patch.

- James

config_perldoc.patch

Leopold Toetsch

unread,
Nov 2, 2004, 5:41:50 AM11/2/04
to perl6-i...@perl.org
James deBoer <parrotbug...@parrotcode.org> wrote:

> Some systems, notable Debian, ship perldoc and perl as seperate
> packages. The presence of Perl does not imply the presence of perldoc.

> This patch will test to see if perldoc actually works, aborting the
> configuration if it does not.

> I was considering making the build system not build the documentation
> if perldoc did not exist. However, I felt that (a) a perldoc-less Perl

> is a broken Perl ...

Is ok for me.

> - James

[ patch looks fine, let's hear some more opinions on that issue ]

leo

Andy Dougherty

unread,
Nov 2, 2004, 9:22:36 AM11/2/04
to Perl6 Internals
On Mon, 1 Nov 2004, James deBoer wrote:

> Some systems, notable Debian, ship perldoc and perl as seperate
> packages. The presence of Perl does not imply the presence of perldoc.
>
> This patch will test to see if perldoc actually works, aborting the
> configuration if it does not.

I don't feel strongly about this, but I think aborting during
configuration is a bit extreme at present. If I don't have perldoc, the
'make' process currently ends with a loud failure, but at least I can
still see if parrot Configures and builds at all, and I can still run
'make test'. The only thing I can't do is install the documentation,
which really isn't relevant yet because the whole installation system
isn't really designed yet, and because there isn't really much to do (for
most of us) with an installed parrot anyway.

This is not a mere hypothetical case. In the main build environment I use
to test parrot, no perldoc is available, though I certainly have lots of
other copies of perldoc elsewhere available to me. In the long run, parrot
won't be using perldoc to extract documentation anyway. The reliance on
perl is a "temporary" convenience.

If you want to have Configure.pl complain loudly, that's probably a good
idea -- some users may not be aware that there's a separate perldoc
package -- but I don't see the need to require stuff that's not really
necessary.

--
Andy Dougherty doug...@lafayette.edu

Dan Sugalski

unread,
Nov 2, 2004, 9:34:31 AM11/2/04
to l...@toetsch.at, perl6-i...@perl.org
At 11:41 AM +0100 11/2/04, Leopold Toetsch wrote:
>James deBoer <parrotbug...@parrotcode.org> wrote:
>
>> Some systems, notable Debian, ship perldoc and perl as seperate
>> packages. The presence of Perl does not imply the presence of perldoc.
>
>> This patch will test to see if perldoc actually works, aborting the
>> configuration if it does not.
>
>> I was considering making the build system not build the documentation
>> if perldoc did not exist. However, I felt that (a) a perldoc-less Perl
>> is a broken Perl ...
>
>Is ok for me.

And me as well.
--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Nicholas Clark

unread,
Nov 7, 2004, 11:08:41 AM11/7/04
to Andy Dougherty, Perl6 Internals
On Tue, Nov 02, 2004 at 09:22:36AM -0500, Andy Dougherty wrote:
> On Mon, 1 Nov 2004, James deBoer wrote:
>
> > Some systems, notable Debian, ship perldoc and perl as seperate
> > packages. The presence of Perl does not imply the presence of perldoc.
> >
> > This patch will test to see if perldoc actually works, aborting the
> > configuration if it does not.
>
> I don't feel strongly about this, but I think aborting during
> configuration is a bit extreme at present. If I don't have perldoc, the
> 'make' process currently ends with a loud failure, but at least I can
> still see if parrot Configures and builds at all, and I can still run
> 'make test'. The only thing I can't do is install the documentation,
> which really isn't relevant yet because the whole installation system
> isn't really designed yet, and because there isn't really much to do (for
> most of us) with an installed parrot anyway.

I don't like the build blowing up on me when there is no perldoc, and on
some machines that I use I'm not in a position to change this. So I'd
like a way of overriding Configure to skip building the documentation.
I don't see overriding a bail out as incompatible with the sentiment that
the default should be to bail out at Configure time if not found.

I'd prefer it to bail out at Configure time than at make time, as it
results in the problem being shown up far earlier. Unattended builds that
fail at the end for detectable reasons annoy me. Particularly when
something else time consuming was depending on them to pass, and so did
not run.

Nicholas Clark

Leopold Toetsch

unread,
Nov 7, 2004, 3:05:23 PM11/7/04
to Nicholas Clark, perl6-i...@perl.org
Nicholas Clark <ni...@ccl4.org> wrote:

> I don't like the build blowing up on me when there is no perldoc, and on
> some machines that I use I'm not in a position to change this.

So, as opinions aren't really matching, let's try this approach:

The configure step from that patch doesn't bail out, but prints a big
fat warning about the lack of accessing perl and parrot docs, disables
the parrot doc make target and continues.

> Nicholas Clark

leo

Leopold Toetsch

unread,
Nov 13, 2004, 5:10:15 PM11/13/04
to perl6-i...@perl.org
James deBoer <parrotbug...@parrotcode.org> wrote:

[ to OP ]

> This patch will test to see if perldoc actually works, aborting the
> configuration if it does not.

Can you convert that test to produce a fat warning and skip targets
relying on perldoc?

Thanks,
leo

James deBoer

unread,
Nov 19, 2004, 4:49:04 PM11/19/04
to l...@toetsch.at, perl6-i...@perl.org
Sorry for the delay, but here is a revised patch to detect perldoc.

- If Perldoc is detected, no warning messages will be printed and things
will work as before
- If Perldoc is not detected
- Configure.pl will print a message saying that the docs will not
be built
- docs/ will not be built
- When 'make docs' or 'make html' is run, a message will be echoed
to the screen explaining that perldoc is required.

James

config_perldoc.patch

Leopold Toetsch

unread,
Nov 20, 2004, 5:43:49 AM11/20/04
to James deBoer, perl6-i...@perl.org
James deBoer <ja...@huronbox.com> wrote:

> Sorry for the delay, but here is a revised patch to detect perldoc.

No problem, and thanks, applied.

This looks a bit bulky ...

> + Configure::Data->set(perldoc => 0);
> + Configure::Data->set(notperldoc => 1);

... but given that I didn't even know that ...

> +#CONDITIONED_LINE(notperldoc):docs : docs.stub

... this syntax exists, it's a nice solution.

Slightly more elegant is probably a small extension in
lib/Parrot/Configure/Step.pm that handles something like:

#CONDITIONED_LINE(! perldoc):docs : docs.stub

leo

0 new messages