[svn:parrot] r43920 - in branches/rm_cflags: config/auto config/gen config/gen/makefiles config/init/hints config/inter lib/Parrot/Configure

coke at svn.parrot.org coke at svn.parrot.org
Fri Feb 12 21:03:51 UTC 2010


Author: coke
Date: Fri Feb 12 21:03:49 2010
New Revision: 43920
URL: https://trac.parrot.org/parrot/changeset/43920

Log:
Only use platform specific slashes where necessary.
(basically, need for paths in commands, but not in args)

Modified:
   branches/rm_cflags/config/auto/icu.pm
   branches/rm_cflags/config/auto/perldoc.pm
   branches/rm_cflags/config/auto/pmc.pm
   branches/rm_cflags/config/gen/makefiles.pm
   branches/rm_cflags/config/gen/makefiles/dynoplibs.in
   branches/rm_cflags/config/gen/makefiles/dynpmc.in
   branches/rm_cflags/config/gen/makefiles/root.in
   branches/rm_cflags/config/init/hints/darwin.pm
   branches/rm_cflags/config/init/hints/mswin32.pm
   branches/rm_cflags/config/inter/charset.pm
   branches/rm_cflags/config/inter/encoding.pm
   branches/rm_cflags/config/inter/libparrot.pm
   branches/rm_cflags/lib/Parrot/Configure/Compiler.pm

Modified: branches/rm_cflags/config/auto/icu.pm
==============================================================================
--- branches/rm_cflags/config/auto/icu.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/auto/icu.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -339,8 +339,7 @@
         if (! -d $icuheaders) {
             $without = 1;
         }
-        my $slash = $conf->data->get('slash');
-        $icuheaders .= "${slash}include";
+        $icuheaders .= "/include";
         if (! -d $icuheaders) {
             $without = 1;
         }

Modified: branches/rm_cflags/config/auto/perldoc.pm
==============================================================================
--- branches/rm_cflags/config/auto/perldoc.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/auto/perldoc.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -59,7 +59,6 @@
     my $TEMP_pod = join q{ } =>
         map { my $t = $_; $t =~ s/\.ops$/.pod/; "ops/$t" } @ops;
 
-    my $slash       = $conf->data->get('slash');
     my $new_perldoc = $conf->data->get('new_perldoc');
 
     foreach my $ops (@ops) {
@@ -67,17 +66,17 @@
         $pod =~ s/\.ops$/.pod/;
         if ( $new_perldoc ) {
             $TEMP_pod_build .= <<"END"
-ops$slash$pod: ..${slash}src${slash}ops${slash}$ops
-\t\$(PERLDOC) -ud ops${slash}$pod ..${slash}src${slash}ops${slash}$ops
-\t\$(CHMOD) 0644 ops${slash}$pod
+ops/$pod: ../src/ops/$ops
+\t\$(PERLDOC) -ud ops/$pod ../src/ops/$ops
+\t\$(CHMOD) 0644 ops/$pod
 
 END
         }
         else {
             $TEMP_pod_build .= <<"END"
-ops$slash$pod: ..${slash}src${slash}ops${slash}$ops
-\t\$(PERLDOC) -u ..${slash}ops${slash}$ops > ops${slash}$pod
-\t\$(CHMOD) 0644 ..${slash}ops${slash}$pod
+ops/$pod: ../src/ops/$ops
+\t\$(PERLDOC) -u ../ops/$ops > ops/$pod
+\t\$(CHMOD) 0644 ../ops/$pod
 
 END
         }

Modified: branches/rm_cflags/config/auto/pmc.pm
==============================================================================
--- branches/rm_cflags/config/auto/pmc.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/auto/pmc.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -115,10 +115,9 @@
 
 
     # build list of libraries for link line in Makefile
-    my $slash = $conf->data->get('slash');
-    ( my $TEMP_pmc_classes_o   = $TEMP_pmc_o )   =~ s/^| / src${slash}pmc${slash}/g;
-    ( my $TEMP_pmc_classes_str = $TEMP_pmc_str ) =~ s/^| / src${slash}pmc${slash}/g;
-    ( my $TEMP_pmc_classes_pmc = $pmc_list )     =~ s/^| / src${slash}pmc${slash}/g;
+    ( my $TEMP_pmc_classes_o   = $TEMP_pmc_o )   =~ s{^| }{ src/pmc/}g;
+    ( my $TEMP_pmc_classes_str = $TEMP_pmc_str ) =~ s{^| }{ src/pmc/}g;
+    ( my $TEMP_pmc_classes_pmc = $pmc_list )     =~ s{^| }{ src/pmc/}g;
 
     # Gather the actual names (with MixedCase) of all of the non-abstract
     # built-in PMCs in rough hierarchical order.

Modified: branches/rm_cflags/config/gen/makefiles.pm
==============================================================================
--- branches/rm_cflags/config/gen/makefiles.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/gen/makefiles.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -27,12 +27,13 @@
     $data{description} = q{Generate makefiles and other build files};
     $data{result}      = q{};
     $data{makefiles}   = {
-        'Makefile' => { SOURCE => 'config/gen/makefiles/root.in' },
-        'ext/Makefile' => { SOURCE => 'config/gen/makefiles/ext.in', },
+        'Makefile' => { SOURCE => 'config/gen/makefiles/root.in',
+        },
+        'ext/Makefile' => { SOURCE => 'config/gen/makefiles/ext.in',
+        },
 
         'ext/Parrot-Embed/Makefile.PL' => {
             SOURCE            => 'config/gen/makefiles/parrot_embed_pl.in',
-            replace_slashes   => 0,
             conditioned_lines => 1,
         },
 
@@ -96,7 +97,6 @@
         : keys %{ $self->{makefiles} };
 
     foreach my $target (@targets) {
-        $target =~ s/\\/\//g if $^O eq 'MSWin32';
         my $args   = $self->{makefiles}->{$target};
         my $source = delete $args->{SOURCE};
 

Modified: branches/rm_cflags/config/gen/makefiles/dynoplibs.in
==============================================================================
--- branches/rm_cflags/config/gen/makefiles/dynoplibs.in	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/gen/makefiles/dynoplibs.in	Fri Feb 12 21:03:49 2010	(r43920)
@@ -17,9 +17,9 @@
 CFLAGS        = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
 LIBPARROT     = @libparrot_ldflags@
 
-BUILD_TOOLS_DIR = $(BUILD_DIR)@slash at tools@slash at build
-OPS2C           = $(PERL) -I$(BUILD_DIR)@slash at lib $(BUILD_TOOLS_DIR)@slash at ops2c.pl
-INCLUDES        = -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at src@slash at pmc
+BUILD_TOOLS_DIR = $(BUILD_DIR)/tools/build
+OPS2C           = $(PERL) -I$(BUILD_DIR)/lib $(BUILD_TOOLS_DIR)/ops2c.pl
+INCLUDES        = -I$(BUILD_DIR)/include -I at build_dir@/src/pmc
 LINKARGS        = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
 
 OPS_TARGETS = \

Modified: branches/rm_cflags/config/gen/makefiles/dynpmc.in
==============================================================================
--- branches/rm_cflags/config/gen/makefiles/dynpmc.in	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/gen/makefiles/dynpmc.in	Fri Feb 12 21:03:49 2010	(r43920)
@@ -8,7 +8,7 @@
 LOAD_EXT      = @load_ext@
 BUILD_DIR     = @build_dir@
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-INSTALL_DIR   = $(BUILD_DIR)@slash at runtime@slash at parrot@slash at dynext
+INSTALL_DIR   = $(BUILD_DIR)/runtime/parrot/dynext
 O             = @o@
 CC            = @cc@
 LD            = @ld@
@@ -17,10 +17,10 @@
 CFLAGS        = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
 LIBPARROT     = @libparrot_ldflags@
 
-BUILD_TOOLS_DIR = $(BUILD_DIR)@slash at tools@slash at build
-BUILD_LIB_DIR   = $(BUILD_DIR)@slash at blib@slash at lib
-PMC2C           = $(PERL) $(BUILD_TOOLS_DIR)@slash at pmc2c.pl
-INCLUDES        = -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at include@slash at pmc
+BUILD_TOOLS_DIR = $(BUILD_DIR)/tools/build
+BUILD_LIB_DIR   = $(BUILD_DIR)/blib/lib
+PMC2C           = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl
+INCLUDES        = -I$(BUILD_DIR)/include -I at build_dir@/include/pmc
 LINKARGS        = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
 
 PMC2CD = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump

Modified: branches/rm_cflags/config/gen/makefiles/root.in
==============================================================================
--- branches/rm_cflags/config/gen/makefiles/root.in	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/gen/makefiles/root.in	Fri Feb 12 21:03:49 2010	(r43920)
@@ -514,26 +514,26 @@
 ###############################################################################
 
 # Executables
-PARROT              = ./@test_prog@$(EXE)
-MINIPARROT          = ./miniparrot$(EXE)
-DIS                 = ./pbc_disassemble$(EXE)
-PDUMP               = ./pbc_dump$(EXE)
-PBC_MERGE           = ./pbc_merge$(EXE)
-PDB                 = ./parrot_debugger$(EXE)
-PBC_TO_EXE          = ./pbc_to_exe$(EXE)
-PARROT_CONFIG       = ./parrot_config$(EXE)
-PIRC                = ./pirc$(EXE)
-NQP_RX              = ./parrot-nqp$(EXE)
+PARROT              = . at slash@@test_prog@$(EXE)
+MINIPARROT          = . at slash@miniparrot$(EXE)
+DIS                 = . at slash@pbc_disassemble$(EXE)
+PDUMP               = . at slash@pbc_dump$(EXE)
+PBC_MERGE           = . at slash@pbc_merge$(EXE)
+PDB                 = . at slash@parrot_debugger$(EXE)
+PBC_TO_EXE          = . at slash@pbc_to_exe$(EXE)
+PARROT_CONFIG       = . at slash@parrot_config$(EXE)
+PIRC                = . at slash@pirc$(EXE)
+NQP_RX              = . at slash@parrot-nqp$(EXE)
 
 # Installable executables
-INSTALLABLEPARROT    = ./installable_parrot$(EXE)
-INSTALLABLEDIS       = ./installable_pbc_disassemble$(EXE)
-INSTALLABLEPDUMP     = ./installable_pbc_dump$(EXE)
-INSTALLABLEPBC_MERGE = ./installable_pbc_merge$(EXE)
-INSTALLABLEPBCTOEXE  = ./installable_pbc_to_exe$(EXE)
-INSTALLABLEPDB       = ./installable_parrot_debugger$(EXE)
-INSTALLABLECONFIG    = ./installable_parrot_config$(EXE)
-INSTALLABLENQP       = ./installable_parrot-nqp$(EXE)
+INSTALLABLEPARROT    = . at slash@installable_parrot$(EXE)
+INSTALLABLEDIS       = . at slash@installable_pbc_disassemble$(EXE)
+INSTALLABLEPDUMP     = . at slash@installable_pbc_dump$(EXE)
+INSTALLABLEPBC_MERGE = . at slash@installable_pbc_merge$(EXE)
+INSTALLABLEPBCTOEXE  = . at slash@installable_pbc_to_exe$(EXE)
+INSTALLABLEPDB       = . at slash@installable_parrot_debugger$(EXE)
+INSTALLABLECONFIG    = . at slash@installable_parrot_config$(EXE)
+INSTALLABLENQP       = . at slash@installable_parrot-nqp$(EXE)
 
 # Libraries
 LIBPARROT_STATIC    = @blib_dir@/@libparrot_static@
@@ -1128,7 +1128,7 @@
 
 # hello
 hello: test_prep examples/pasm/hello$(EXE)
-	./examples/pasm/hello$(EXE) "from your friendly makefile"
+	. at slash@examples at slash@pasm at slash@hello$(EXE) "from your friendly makefile"
 
 examples/pasm/hello.pbc: examples/pasm/hello.pasm
 	$(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm

Modified: branches/rm_cflags/config/init/hints/darwin.pm
==============================================================================
--- branches/rm_cflags/config/init/hints/darwin.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/init/hints/darwin.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -90,8 +90,7 @@
         rpath                  => "-L",
         libparrot_soname       => "-install_name "
             . $lib_dir
-            . $conf->data->get('slash')
-            . "libparrot"
+            . '/libparrot'
             . $conf->data->get('share_ext')
     );
 }

Modified: branches/rm_cflags/config/init/hints/mswin32.pm
==============================================================================
--- branches/rm_cflags/config/init/hints/mswin32.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/init/hints/mswin32.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -101,7 +101,6 @@
             ar_flags            => '',
             ar_out              => '-out:',
             slash               => '\\',
-            blib_dir            => 'blib\\lib',
             ccflags             => $ccflags,
             ccwarn              => $ccwarn,
             has_dynamic_linking => 1,
@@ -153,7 +152,6 @@
             ar_flags            => '',
             ar_out              => '-out:',
             slash               => '\\',
-            blib_dir            => 'blib\\lib',
             ccflags             => $ccflags,
             ccwarn              => '',
             has_dynamic_linking => 1
@@ -200,7 +198,6 @@
             ar_out   => '',
             ar_extra => '',
             slash    => '\\',
-            blib_dir => 'blib\\lib',
             make_and => "\n\t",
         );
     }
@@ -261,7 +258,6 @@
             sym_export          => '__declspec(dllexport)',
             sym_import          => '__declspec(dllimport)',
             slash               => '\\',
-            blib_dir            => 'blib\\lib',
         );
     }
 }

Modified: branches/rm_cflags/config/inter/charset.pm
==============================================================================
--- branches/rm_cflags/config/inter/charset.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/inter/charset.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -75,8 +75,7 @@
     }
 
     # build list of libraries for link line in Makefile
-    my $slash = $conf->data->get('slash');
-    $TEMP_charset_o =~ s/^| / src${slash}string${slash}charset${slash}/g;
+    $TEMP_charset_o =~ s{^| }{ src/string/charset/}g;
 
     $conf->data->set(
         charset            => $charset_list,

Modified: branches/rm_cflags/config/inter/encoding.pm
==============================================================================
--- branches/rm_cflags/config/inter/encoding.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/inter/encoding.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -75,8 +75,7 @@
     }
 
     # build list of libraries for link line in Makefile
-    my $slash = $conf->data->get('slash');
-    $TEMP_encoding_o =~ s/^| / src${slash}string${slash}encoding${slash}/g;
+    $TEMP_encoding_o =~ s{^| }{ src/string/encoding/}g;
 
     $conf->data->set(
         encoding            => $encoding_list,

Modified: branches/rm_cflags/config/inter/libparrot.pm
==============================================================================
--- branches/rm_cflags/config/inter/libparrot.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/config/inter/libparrot.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -105,7 +105,7 @@
                                      && $conf->data->get('rpath') )
         ? $conf->data->get('rpath')
             . $conf->data->get('build_dir')
-            . $conf->data->get('slash')
+            . '/'
             . $conf->data->get('blib_dir')
         : ''
     );
@@ -144,7 +144,7 @@
         $conf->data->set(libparrot_linkflags =>
         '-L'
         . $conf->data->get('build_dir')
-        . $conf->data->get('slash')
+        . '/'
         . $conf->data->get('blib_dir')
         . ' -lparrot'
         );

Modified: branches/rm_cflags/lib/Parrot/Configure/Compiler.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Configure/Compiler.pm	Fri Feb 12 20:44:11 2010	(r43919)
+++ branches/rm_cflags/lib/Parrot/Configure/Compiler.pm	Fri Feb 12 21:03:49 2010	(r43920)
@@ -210,8 +210,8 @@
 
 If set to a C<makefile>, C<c> or C<perl> value, C<comment_type> will be set
 to corresponding value.
-Moreover, when set to a C<makefile> value, it will set C<replace_slashes> to
-enabled, and C<conditioned_lines> to enabled.
+Moreover, when set to a C<makefile> value, it will enable
+C<conditioned_lines>.
 
 Its value will be detected automatically by target file name unless you set
 it to a special value C<none>.
@@ -294,12 +294,6 @@
 this evaluation occurs, any substitution of @@ values is performed on the
 original text.
 
-=item replace_slashes
-
-If set to a true value, this causes any C</>s in the file to automatically
-be replaced with an architecture appropriate slash. C</> or C<\>. This is
-a very helpful option when writing Makefiles.
-
 =item expand_gmake_syntax
 
 If set to a true value, then certain types of I<gmake> syntax will be expanded
@@ -378,7 +372,6 @@
                 $file_types_info{$options{file_type}}{comment_type};
         }
         if ( $options{file_type} eq 'makefile' ) {
-            $options{replace_slashes}   = 1;
             $options{conditioned_lines} = 1;
         }
     }
@@ -548,21 +541,6 @@
             }
         }egx;
 
-        if ( $options{replace_slashes} ) {
-            if ( $line =~ m{/$} ) {
-                croak "$source:$.: line ends in a slash\n";
-            }
-
-            $line =~ s{(/+)}{
-                my $len = length $1;
-                my $slash = $conf->data->get('slash');
-                '/' x ($len/2) . ($len%2 ? $slash : '');
-            }eg;
-
-            # replace \* with \\*, so make will not eat the \
-            $line =~ s{(\\\*)}{\\$1}g;
-        }
-
         print $out $line;
     }
 


More information about the parrot-commits mailing list