Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit b8a48b5

Browse files
author
Reini Urban
committed
Config: writable ext/Config/Makefile.PL
The src tarball changes ext/Config/Makefile.PL ro readonly. Special case that in makerel, and check for -w Makefile.PL Thanks to sten for reporting that. Fixes #142.
1 parent 8f7e9f7 commit b8a48b5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Porting/makerel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ my @writables = qw(
150150
cpan/Devel-PPPort/module2.c
151151
cpan/Devel-PPPort/module3.c
152152
cpan/autodie/t/touch_me
153+
ext/Config/Makefile.PL
153154
ext/Config/Config_xs.in
154155
ext/Config/Config_xs.out
155156
reentr.c

ext/Config/Makefile.PL

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ use ExtUtils::Command ();
6262
# touch what we plan for UNINST to be in the makefile
6363
@ARGV = 'UNINST_'.($uninst ? '1' : '0');
6464
ExtUtils::Command::touch();
65-
# now touch Makefile.PL so the above doesn't trigger a rebuild
66-
@ARGV = 'Makefile.PL';
67-
ExtUtils::Command::touch();
65+
# now touch Makefile.PL so the above doesn't trigger a rebuild.
66+
# note that with a src tarball, Makefile.PL is readonly
67+
if (-w 'Makefile.PL') {
68+
@ARGV = 'Makefile.PL';
69+
ExtUtils::Command::touch();
70+
}
6871
@ARGV = 'Makefile'; #we aren't inside WriteMakefile with open FH anymore
6972
ExtUtils::Command::touch();
7073
# if Makefile.PL and poison target are the same second, no rebuild happens

0 commit comments

Comments
 (0)