summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-12 15:56:51 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-12 15:57:59 +0100
commit403f501d5b37ebf0340212b1a7f7c01855cd7b95 (patch)
tree25e4aeac710091a6b8a8c95685db9a7255ed6d7b
parent4527a2238fcb956920c7d18b8aa95a3ff49f0fcb (diff)
downloadperl-403f501d5b37ebf0340212b1a7f7c01855cd7b95.tar.gz
Move Cwd from lib to ext.
Obviously, it's going to take a bit more work to piece the PathTools distribution back together.
-rw-r--r--MANIFEST3
-rw-r--r--Makefile.SH14
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--ext/Cwd/Cwd.pm (renamed from lib/Cwd.pm)0
-rw-r--r--ext/Cwd/Makefile.PL2
-rw-r--r--lib/.gitignore1
-rw-r--r--make_ext.pl3
-rw-r--r--vms/descrip_mms.template4
-rw-r--r--win32/Makefile12
-rw-r--r--win32/makefile.mk14
-rw-r--r--win32/pod.mak16
11 files changed, 39 insertions, 32 deletions
diff --git a/MANIFEST b/MANIFEST
index 10201951be..e5dd605fe9 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 5306a69543..1249eee695 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 fae472382c..a9650159fb 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
index 3a0fda3406..3a0fda3406 100644
--- a/lib/Cwd.pm
+++ b/ext/Cwd/Cwd.pm
diff --git a/ext/Cwd/Makefile.PL b/ext/Cwd/Makefile.PL
index 1e9a80d8a7..8d6c18753c 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 d7c518f909..9b761c7ded 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 795b7e5918..787254cb6a 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 ee0878b2d6..c25fd0dfba 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 b7efd2e134..1b1f19b09a 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 6c5b4db009..c4391325e4 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 9489c22124..593c701aab 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