On Mon May 25 10:17:46 2009, DAGOLDEN wrote:
Show quoted text> On Mon, May 25, 2009 at 3:29 AM, Ryan Niebur via RT
> <bug-Module-Build@rt.cpan.org> wrote:
> > The point of "make distclean" in most situations is to return the
> source
> > tree to how it originally was. However, with Module::Build generated
> > Makefiles, this doesn't happen, because Makefile is still there. I
> see
>
> Module::Build doesn't generate Makefiles, though it can generate
> Makefile.PL.
>
Yes, indeed it is Module::Build::Compat, and that's what my patch is
against. Sorry for not being clear in what I wrote.
Show quoted text> Is this an issue with a 'passthrough' Makefile.PL that generates a
> Makefile that runs Build.PL and Build? That's the only case I can
> imagine where a distribution that uses Module::Build would have
> generated (and failed to clean up) a Makefile.
>
yes.
Show quoted text> In that case, there's no point to running Makefile.PL. If Build.PL
> and Makefile.PL exist, you should prefer Build.PL over Makefile.PL.
>
well, this automatic tool that we use can't make that change (yet),
because it would break compatibility with all of the packages that that
already exist.
Show quoted text> Nevertheless, can you give a specific example of a distribution that
> shows this behavior? If passthrough Makefile.PL is the issue, then
> the fix probably needs to be in Module::Build::Compat
>
we've ran into this problem many times in the Debian Perl Group, and we
"only" maintain a thousand or so packages. Anyway, here's an example of
the problem. as you can see, when I untar it, Makefile is not in the
tarball, but after I run "make distclean". The realclean target already
removes Makefile, I'm asking if the distclean target could too. Please
look at the patch, it should explain it more clearly.
$ mkdir env-ps1-test
$ cd env-ps1-test
$ wget
http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/Env-PS1-0.05.tar.gz
--2009-05-25 10:12:44--
http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/Env-PS1-0.05.tar.gz
Resolving search.cpan.org... 64.235.248.44
Connecting to search.cpan.org|64.235.248.44|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location:
http://mirror.cinquix.com/pub/CPAN/authors/id/P/PA/PARDUS/Env-PS1-0.05.tar.gz
[following]
--2009-05-25 10:12:44--
http://mirror.cinquix.com/pub/CPAN/authors/id/P/PA/PARDUS/Env-PS1-0.05.tar.gz
Resolving mirror.cinquix.com... 64.215.216.140
Connecting to mirror.cinquix.com|64.215.216.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7851 (7.7K) [application/x-tar]
Saving to: `Env-PS1-0.05.tar.gz'
100%[==========================================================================================================================================================================>]
7,851 --.-K/s in 0.1s
2009-05-25 10:12:45 (79.6 KB/s) - `Env-PS1-0.05.tar.gz' saved [7851/7851]
$ tar xzvf Env-PS1-0.05.tar.gz
Env-PS1-0.05/
Env-PS1-0.05/META.yml
Env-PS1-0.05/Changes
Env-PS1-0.05/lib/
Env-PS1-0.05/lib/Env/
Env-PS1-0.05/lib/Env/PS1.pm
Env-PS1-0.05/MANIFEST
Env-PS1-0.05/t/
Env-PS1-0.05/t/00_usage.t
Env-PS1-0.05/example.pl
Env-PS1-0.05/Build.PL
Env-PS1-0.05/Makefile.PL
Env-PS1-0.05/README
$ cd Env-PS1-0.05/
$ perl Makefile.PL
# running Build.PL
/usr/bin/perl Build.PL
Checking whether your kit is complete...
Looks good
Checking prerequisites...
Looks good
Creating new 'Build' script for 'Env-PS1' version '0.05'
$ make distclean
/usr/bin/perl Build --makefile_env_macros 1 distclean
Deleting _build
Deleting Build
$ ls Makefile
Makefile
$ exit