Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 46338
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: RyanRyan52 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 'make distclean' doesn't remove the Makefile
Hi, 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 that the realclean target takes this into account, which is good. Unfortunately, certain tools used in creating Debian packages try "distclean" by default, and so in those packages Makefile is left behind, causing extra hassle for the packager. It would be very nice if the distclean target removed this file too, and would simplify some of our work. Would you please consider applying my trivial patch? Thanks, Ryan
Subject: remove-makefile-on-distclean-too
Subject: Re: [rt.cpan.org #46338] 'make distclean' doesn't remove the Makefile
Date: Mon, 25 May 2009 10:17:28 -0400
To: bug-Module-Build [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Mon, May 25, 2009 at 3:29 AM, Ryan Niebur via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> 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. 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. 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. 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 -- David
From: RyanRyan52 [...] gmail.com
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
I couldn't read your patch attachment, but I wrote a test case to confirm the bug and did my own quick fix in svn trunk (revision 12790). Thanks for the bug report. -- David