In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4e73d6a402bc493d66d19c409c41e1e271c6450b?hp=e27b5b51275a893e82bce85334679ee38d3d6bf8>

- Log -----------------------------------------------------------------
commit 4e73d6a402bc493d66d19c409c41e1e271c6450b
Author: Nicholas Clark <[email protected]>
Date:   Wed Sep 23 11:59:31 2009 +0100

    Add a --chdir option to configpm, and use this in the Win32 Makfiles.
    
    A slight Makefile simplification, and another move towards Win32 
standardising
    on running miniperl as $(MINIPERL), which currently is ..\miniperl.exe
-----------------------------------------------------------------------

Summary of changes:
 configpm          |    6 ++++++
 win32/Makefile    |    8 ++------
 win32/makefile.mk |    4 ++--
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/configpm b/configpm
index 5baed2b..5b6a4e6 100755
--- a/configpm
+++ b/configpm
@@ -34,6 +34,7 @@ sub usage { die <<EOF }
 usage: $0  [ options ]
     --cross=PLATFORM    cross-compile for a different platform
     --no-glossary       don't include Porting/Glossary in lib/Config.pod
+    --chdir=dir         change directory before writing files
 EOF
 
 use strict;
@@ -60,6 +61,7 @@ my %Allowed_Opts = (
     'cross'    => '', # --cross=PLATFORM - crosscompiling for PLATFORM
     'glossary' => 1,  # --no-glossary  - no glossary file inclusion,
                       #                  for compactness
+    'chdir'    => '', # --chdir=dir    - change directory before writing files
 );
 
 sub opts {
@@ -85,6 +87,10 @@ sub opts {
 
 my %Opts = opts();
 
+if ($Opts{chdir}) {
+    chdir $Opts{chdir} or die "$0: could not chdir $Opts{chdir}: $!"
+}
+
 my ($Config_SH, $Config_PM, $Config_heavy, $Config_POD);
 my $Glossary = 'Porting/Glossary';
 
diff --git a/win32/Makefile b/win32/Makefile
index 5c53cb8..8be691a 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -894,17 +894,13 @@ config.w32 : $(CFGSH_TMPL)
 # the special __GNUC__ handling that is otherwise lost.
 regen_config_h:
        $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > 
..\config.sh
-       cd ..
-       miniperl configpm
-       cd win32
+       $(MINIPERL) -I..\lib ..\configpm --chdir=..
        -del /f $(CFGH_TMPL)
        -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)"
        rename config.h $(CFGH_TMPL)
 
 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
-       cd ..
-       miniperl configpm
-       cd win32
+       $(MINIPERL) -I..\lib ..\configpm --chdir=..
        if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
        $(XCOPY) ..\*.h $(COREDIR)\*.*
        $(XCOPY) *.h $(COREDIR)\*.*
diff --git a/win32/makefile.mk b/win32/makefile.mk
index faf080a..38b89d9 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1144,13 +1144,13 @@ config.w32 : $(CFGSH_TMPL)
 regen_config_h:
        $(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file $(mktmp 
$(CFG_VARS)) \
            $(CFGSH_TMPL) > ..\config.sh
-       cd .. && miniperl configpm
+       $(MINIPERL) -I..\lib ..\configpm --chdir=..
        -del /f $(CFGH_TMPL)
        -$(MINIPERL) -I..\lib $(ICWD) config_h.PL "INST_VER=$(INST_VER)"
        rename config.h $(CFGH_TMPL)
 
 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
-       cd .. && miniperl configpm
+       $(MINIPERL) -I..\lib ..\configpm --chdir=..
        if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
        $(XCOPY) ..\*.h $(COREDIR)\*.*
        $(XCOPY) *.h $(COREDIR)\*.*

--
Perl5 Master Repository

Reply via email to