This was part of the gmake extensions that we (can) support during makefile-generation time; added because there was there no cross- platform syntax that I knew of that we could use in all of the various makes we have to support.

See perldoc lib/Parrot/Configure/Step.pm look for 'expand_gmake_syntax' for more information.

That said, I don't see '$(basename ...)' used anywhere in the code base. The other three (addprefix, wildcard, and notdir), are all used by Tcl (and only by Tcl)

Regards.

On Aug 19, 2007, at 11:35 AM, James Keenan via RT wrote:

I have been writing tests for previously untested statements in
Parrot::Configure::Step.  In genfile(), there is the following block:

            # documented as removing any .-based suffix
            if (
                $line =~ s{\$ \( basename \s+ ([^)]+) \)}{
                join (' ',
                    map {
                        my @split = File::Spec->splitpath($_);
                        $split[2] =~ s/\.[^.]*$//;
                        File::Spec->catpath(@split);
                    } split(' ', $1)
                )
            }egx
                )
            {
                $any_gmake++;
            }

On the OSes available to me, this code is never reached either during
the normal operation of Configure.pl or in the tests I've written so
far.  My questions therefore are:

(1) What is it for?  (coke, ptc:  svn annotate indicates you've worked
on this code)

(2) Is there any OS on which the code is reached?

(3) If the answer to (2) is 'No' and no one can come up with a good
answer for (1), then is there any reason why we shouldn't cut it out?

kid51


--
Will "Coke" Coleda
[EMAIL PROTECTED]


Reply via email to