From: Nicholas Clark Date: Sat, 12 Sep 2009 14:56:51 +0000 (+0100) Subject: Move Cwd from lib to ext. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=403f501d;p=p5sagit%2Fp5-mst-13.2.git Move Cwd from lib to ext. Obviously, it's going to take a bit more work to piece the PathTools distribution back together. --- diff --git a/MANIFEST b/MANIFEST index 1020195..e5dd605 100644 --- a/MANIFEST +++ b/MANIFEST @@ -551,8 +551,8 @@ ext/CPAN/t/03pkgs.t See if CPAN::Version works ext/CPAN/t/10version.t See if CPAN the module works ext/CPAN/t/11mirroredby.t See if CPAN::Mirrored::By works ext/Cwd/Changes Cwd extension Changelog +ext/Cwd/Cwd.pm Various cwd routines (getcwd, fastcwd, chdir) ext/Cwd/Cwd.xs Cwd extension external subroutines -ext/Cwd/Makefile.PL Cwd extension makefile maker ext/Cwd/t/cwd.t See if Cwd works ext/Cwd/t/taint.t See if Cwd works with taint ext/Cwd/t/win32.t See if Cwd works on Win32 @@ -2812,7 +2812,6 @@ lib/Config/Extensions.t See if Config::Extensions works lib/Config.t See if Config works lib/CORE.pod document the CORE namespace lib/ctime.pl A ctime workalike -lib/Cwd.pm Various cwd routines (getcwd, fastcwd, chdir) lib/DBM_Filter/Changes DBM Filter Change history lib/DBM_Filter/compress.pm DBM Filter to compress keys/values lib/DBM_Filter/encode.pm DBM Filter for encoding diff --git a/Makefile.SH b/Makefile.SH index 5306a69..1249eee 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -467,6 +467,8 @@ obj = $(ndt_obj) $(DTRACE_O) perltoc_pod_prereqs = extra.pods pod/perlapi.pod pod/perldelta.pod pod/perlintern.pod pod/perlmodlib.pod generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs) +Icwd = -Iext/Cwd + lintflags = \ -b \ -n \ @@ -546,7 +548,7 @@ lib/Config_git.pl git_version.h: miniperl$(EXE_EXT) make_patchnum.pl # make sure that we recompile perl.c if the git version changes perl$(OBJ_EXT): git_version.h -translators: miniperl$(EXE_EXT) $(CONFIGPM) FORCE +translators: miniperl$(EXE_EXT) $(CONFIGPM) $(dynamic_ext) FORCE @echo " "; echo " Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all utilities: miniperl$(EXE_EXT) $(CONFIGPM) $(plextract) lib/lib.pm FORCE @@ -936,7 +938,7 @@ makeppport: miniperl\$(EXE_EXT) \$(CONFIGPM) $spitshell >>$Makefile <<'!NO!SUBS!' .PHONY: makeppport makeppport: miniperl$(EXE_EXT) $(CONFIGPM) $(nonxs_ext) - $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib mkppport + $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib $(Icwd) mkppport !NO!SUBS! ;; @@ -957,16 +959,16 @@ lib/re.pm: ext/re/re.pm @-rm -f $@ cp ext/re/re.pm lib/re.pm -$(plextract): miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p +$(plextract): miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p $(dynamic_ext) @-rm -f $@ $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -I"`pwd`/lib" $@.PL -x2p/s2p: miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p.PL +x2p/s2p: miniperl$(EXE_EXT) $(CONFIGPM) $(dynamic_ext) x2p/s2p.PL cd x2p; $(LDLIBPTH) $(MAKE) s2p lib/lib.pm: miniperl$(EXE_EXT) $(CONFIGPM) @-rm -f $@ - $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib lib/lib_pm.PL + $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib $(Icwd) lib/lib_pm.PL unidatafiles $(unidatafiles): uni.data @@ -984,7 +986,7 @@ pod/perlapi.pod pod/perlintern.pod: miniperl$(EXE_EXT) autodoc.pl embed.fnc $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib autodoc.pl pod/perlmodlib.pod: miniperl$(EXE_EXT) pod/perlmodlib.PL MANIFEST - $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib pod/perlmodlib.PL -q + $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib $(Icwd) pod/perlmodlib.PL -q pod/perldelta.pod: pod/perl5110delta.pod $(LNS) perl5110delta.pod pod/perldelta.pod diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index fae4723..a965015 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1150,7 +1150,6 @@ use File::Glob qw(:case); 'FILES' => q[lib/File/Spec.pm lib/File/Spec ext/Cwd - lib/Cwd.pm ], # XXX note that the CPAN and blead Makefile.PL are totally # unrelated. The blead one is described as 'core-only'. @@ -1159,7 +1158,6 @@ use File::Glob qw(:case); 'EXCLUDED' => [ qr{^t/lib/Test/} ], 'MAP' => { 'lib/' => 'lib/', - 'Cwd.pm' => 'lib/Cwd.pm', '' => 'ext/Cwd/', 't/' => 'lib/File/Spec/t/', 't/cwd.t' => 'ext/Cwd/t/cwd.t', diff --git a/lib/Cwd.pm b/ext/Cwd/Cwd.pm similarity index 100% rename from lib/Cwd.pm rename to ext/Cwd/Cwd.pm diff --git a/ext/Cwd/Makefile.PL b/ext/Cwd/Makefile.PL index 1e9a80d..8d6c187 100644 --- a/ext/Cwd/Makefile.PL +++ b/ext/Cwd/Makefile.PL @@ -2,6 +2,6 @@ use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Cwd', - VERSION_FROM => '../../lib/Cwd.pm', + VERSION_FROM => 'Cwd.pm', 'DEFINE' => '-DNO_PPPORT_H', ); diff --git a/lib/.gitignore b/lib/.gitignore index d7c518f..9b761c7 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -114,6 +114,7 @@ /CPANPLUS/Shell/Default/Plugins/HOWTO.pod /CPANPLUS/Shell/Default/Plugins/Remote.pm /CPANPLUS/Shell/Default/Plugins/Source.pm +/Cwd.pm /DB_File.pm /Data /Devel/DProf.pm diff --git a/make_ext.pl b/make_ext.pl index 795b7e5..787254c 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -2,6 +2,7 @@ use strict; use warnings; use Config; +use lib 'ext/Cwd'; use Cwd; # To clarify, this isn't the entire suite of modules considered "toolchain" @@ -11,7 +12,7 @@ use Cwd; # After which, all nonxs modules are in lib, which was always sufficient to # allow miniperl to build everything else. -my @toolchain = qw(ext/constant/lib ext/ExtUtils-Command/lib +my @toolchain = qw(ext/constant/lib ext/Cwd ext/ExtUtils-Command/lib ext/ExtUtils-Install/lib ext/ExtUtils-MakeMaker/lib ext/ExtUtils-Manifest/lib ext/Text-ParseWords/lib ext/File-Path/lib ext/AutoLoader/lib); diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index ee0878b..c25fd0d 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -241,8 +241,8 @@ NOOP = continue # Macros to invoke a copy of miniperl during the build. Targets which # are built using these macros should depend on $(MINIPERL_EXE) MINIPERL_EXE = Sys$Disk:[]miniperl$(E) -MINIPERL = MCR $(MINIPERL_EXE) "-I[.lib]" -MINIPERL_UP = MCR $(MINIPERL_EXE) "-I[-.lib]" +MINIPERL = MCR $(MINIPERL_EXE) "-I[.lib]" "-I[.ext.Cwd]" +MINIPERL_UP = MCR $(MINIPERL_EXE) "-I[-.lib]" "-I[-.ext.Cwd]" MINIPERLQ = MCR $(MINIPERL_EXE) ""-I[.lib]"" XSUBPP = $(MINIPERL) "-I[.ext.re]" [.lib.extutils]xsubpp -noprototypes # Macro to invoke a preexisting copy of Perl. This is used to regenerate diff --git a/win32/Makefile b/win32/Makefile index b7efd2e..1b1f19b 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -831,6 +831,8 @@ CFG_VARS = \ "LINK_FLAGS=$(LINK_FLAGS:"=\")" \ "optimize=$(OPTIMIZE:"=\")" +ICWD = -I..\ext\Cwd + # # Top targets # @@ -987,7 +989,7 @@ $(MINIMOD) : $(MINIPERL) ..\minimod.pl ..\x2p\walk$(o) : ..\x2p\walk.c $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c -$(X2P) : $(MINIPERL) $(X2P_OBJ) +$(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions $(MINIPERL) ..\x2p\find2perl.PL $(MINIPERL) ..\x2p\s2p.PL $(LINK32) -subsystem:console -out:$@ @<< @@ -1049,7 +1051,7 @@ $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs - $(MINIPERL) -I..\lib ..\mkppport + $(MINIPERL) -I..\lib $(ICWD) ..\mkppport MakePPPort_clean: -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\mkppport --clean @@ -1136,11 +1138,11 @@ utils: $(PERLEXE) $(X2P) copy ..\pod\perl5110delta.pod ..\pod\perldelta.pod $(MAKE) -f ..\win32\pod.mak converters cd ..\lib - $(PERLEXE) lib_pm.PL + $(PERLEXE) $(ICWD) lib_pm.PL cd ..\win32 $(PERLEXE) $(PL2BAT) $(UTILS) - $(PERLEXE) ..\autodoc.pl .. - $(PERLEXE) ..\pod\perlmodlib.pl -q + $(PERLEXE) $(ICWD) ..\autodoc.pl .. + $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs $(PERLEXE) ..\pod\buildtoc --build-toc -q diff --git a/win32/makefile.mk b/win32/makefile.mk index 6c5b4db..c439132 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1021,6 +1021,8 @@ ODBCCP32_DLL = $(SystemRoot)\system32\odbccp32.dll ODBCCP32_DLL = $(windir)\system\odbccp32.dll .ENDIF +ICWD = -I..\ext\Cwd + # # Top targets # @@ -1284,7 +1286,7 @@ $(MINIMOD) : $(MINIPERL) ..\minimod.pl ..\x2p\walk$(o) : ..\x2p\walk.c $(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c -$(X2P) : $(MINIPERL) $(X2P_OBJ) +$(X2P) : $(MINIPERL) $(X2P_OBJ) Extensions $(MINIPERL) ..\x2p\find2perl.PL $(MINIPERL) ..\x2p\s2p.PL .IF "$(CCTYPE)" == "BORLAND" @@ -1378,10 +1380,10 @@ $(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs - $(MINIPERL) -I..\lib ..\mkppport + $(MINIPERL) -I..\lib $(ICWD) ..\mkppport MakePPPort_clean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\mkppport --clean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib $(ICWD) ..\mkppport --clean #------------------------------------------------------------------------------- # The rule for $(DYNALOADER).c makes DynaLoader.pm, and that is needed for @@ -1462,10 +1464,10 @@ utils: $(PERLEXE) $(X2P) copy ..\README.win32 ..\pod\perlwin32.pod copy ..\pod\perl5110delta.pod ..\pod\perldelta.pod cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters - cd ..\lib && $(PERLEXE) lib_pm.PL + cd ..\lib && $(PERLEXE) $(ICWD) lib_pm.PL $(PERLEXE) $(PL2BAT) $(UTILS) - $(PERLEXE) ..\autodoc.pl .. - $(PERLEXE) ..\pod\perlmodlib.pl -q + $(PERLEXE) $(ICWD) ..\autodoc.pl .. + $(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q ..\pod\perltoc.pod: $(PERLEXE) Extensions Extensions_nonxs $(PERLEXE) ..\pod\buildtoc --build-toc -q diff --git a/win32/pod.mak b/win32/pod.mak index 9489c22..593c701 100644 --- a/win32/pod.mak +++ b/win32/pod.mak @@ -14,6 +14,8 @@ converters: $(CONVERTERS) PERL = ..\miniperl.exe REALPERL = ..\perl.exe +ICWD = -I..\ext\Cwd + POD = \ perl.pod \ perl5004delta.pod \ @@ -571,22 +573,22 @@ check: podchecker # Dependencies. pod2latex: pod2latex.PL ../lib/Config.pm - $(PERL) -I../lib pod2latex.PL + $(PERL) -I../lib $(ICWD) pod2latex.PL pod2html: pod2html.PL ../lib/Config.pm - $(PERL) -I ../lib pod2html.PL + $(PERL) -I ../lib $(ICWD) pod2html.PL pod2man: pod2man.PL ../lib/Config.pm - $(PERL) -I ../lib pod2man.PL + $(PERL) -I ../lib $(ICWD) pod2man.PL pod2text: pod2text.PL ../lib/Config.pm - $(PERL) -I ../lib pod2text.PL + $(PERL) -I ../lib $(ICWD) pod2text.PL pod2usage: pod2usage.PL ../lib/Config.pm - $(PERL) -I ../lib pod2usage.PL + $(PERL) -I ../lib $(ICWD) pod2usage.PL podchecker: podchecker.PL ../lib/Config.pm - $(PERL) -I ../lib podchecker.PL + $(PERL) -I ../lib $(ICWD) podchecker.PL podselect: podselect.PL ../lib/Config.pm - $(PERL) -I ../lib podselect.PL + $(PERL) -I ../lib $(ICWD) podselect.PL