Author: bernhard
Date: Tue Aug 9 12:49:17 2005
New Revision: 8896
Modified:
trunk/build_tools/parrotdef.pl
trunk/config/gen/makefiles/m4.in
trunk/config/init/data.pl
trunk/languages/m4/t/basic/003_getopt.t
trunk/languages/m4/t/basic/012_eval.t
trunk/languages/m4/t/builtins/010_sysval.t
trunk/languages/m4/t/freezing/002_many_files.t
Log:
Allow 'm4' to be built on MinGW32.
Thanks to François Perrad, [perl #36843].
Modified: trunk/build_tools/parrotdef.pl
==============================================================================
--- trunk/build_tools/parrotdef.pl (original)
+++ trunk/build_tools/parrotdef.pl Tue Aug 9 12:49:17 2005
@@ -244,7 +244,7 @@ my @funcnames = qw(
scratchpad_store_by_index
scratchpad_get_current
lexicals_mark
- scratchpad_delete
+ scratchpad_delete
Parrot_register_HLL
Parrot_register_HLL_type
Parrot_get_HLL_id
@@ -269,6 +269,8 @@ my @funcnames = qw(
Parrot_call_method
string_replace
Parrot_make_COW_reference
+ Parrot_switch_to_cs
+ PackFile_Segment_new_seg
);
push @funcnames, "PMCNULL DATA";
push @funcnames, "Parrot_base_vtables DATA";
Modified: trunk/config/gen/makefiles/m4.in
==============================================================================
--- trunk/config/gen/makefiles/m4.in (original)
+++ trunk/config/gen/makefiles/m4.in Tue Aug 9 12:49:17 2005
@@ -19,6 +19,8 @@ WARN = ${ccwarn}
LD = ${ld}
LDFLAGS = ${ldflags}
LD_SHARE_FLAGS = ${ld_share_flags} # e.g. -shared
+#CONDITIONED_LINE(parrot_exe_def):LIBPARROT = ${build_dir}/parrot${a}
+#INVERSE_CONDITIONED_LINE(parrot_exe_def):LIBPARROT =
# some constants
M4_EVAL_COMPILER_SO =
..${slash}..${slash}runtime${slash}parrot${slash}dynext${slash}m4_eval_compiler${share_ext}
@@ -56,7 +58,7 @@ m4.pbc: src/m4.pir
$(M4_EVAL_COMPILER_SO): src/eval.c
$(CC) $(CFLAGS) $(CC_SHARED) $(DEBUG) $(WARN) -c src/eval.c
- $(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) ${ld_out}$@ eval$(O)
+ $(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) ${ld_out}$@ eval$(O) $(LIBPARROT)
src/m4.pir: src/builtin.pir src/freeze.pir src/input.pir src/macro.pir
src/output.pir
touch $@
Modified: trunk/config/init/data.pl
==============================================================================
--- trunk/config/init/data.pl (original)
+++ trunk/config/init/data.pl Tue Aug 9 12:49:17 2005
@@ -137,6 +137,8 @@ sub runstep {
cp => 'cp',
lns => $Config{lns}, # soft link
+ # On all platform slash == slash_exec, except with MinGW
+ # slash_exec is needed by pathname of executable in test or makefile
slash => '/',
slash_exec => '/',
Modified: trunk/languages/m4/t/basic/003_getopt.t
==============================================================================
--- trunk/languages/m4/t/basic/003_getopt.t (original)
+++ trunk/languages/m4/t/basic/003_getopt.t Tue Aug 9 12:49:17 2005
@@ -4,10 +4,11 @@ use strict;
use FindBin;
use lib "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../../lib";
+use Parrot::Config;
use Test::More tests => 25;
my $real_out;
-my $parrot_m4 = 'cd .. && ./parrot languages/m4/m4.pbc';
+my $parrot_m4 = "cd .. && .$PConfig{slash_exec}parrot$PConfig{exe}
languages/m4/m4.pbc";
my $examples_dir = 'languages/m4/examples';
Modified: trunk/languages/m4/t/basic/012_eval.t
==============================================================================
--- trunk/languages/m4/t/basic/012_eval.t (original)
+++ trunk/languages/m4/t/basic/012_eval.t Tue Aug 9 12:49:17 2005
@@ -4,10 +4,11 @@ use strict;
use FindBin;
use lib "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../../lib";
+use Parrot::Config;
use Test::More tests => 1;
my $real_out;
-my $parrot = 'cd .. && ./parrot';
+my $parrot = "cd .. && .$PConfig{slash_exec}parrot$PConfig{exe}";
$real_out = `$parrot languages/m4/examples/eval.imc 2>&1`;
is( $real_out, << 'END_OUT', 'single expression' );
Modified: trunk/languages/m4/t/builtins/010_sysval.t
==============================================================================
--- trunk/languages/m4/t/builtins/010_sysval.t (original)
+++ trunk/languages/m4/t/builtins/010_sysval.t Tue Aug 9 12:49:17 2005
@@ -8,9 +8,9 @@ use Parrot::Test tests => 1 + 1;
SKIP:
{
+ skip( "`false' not available on $^O", 1 ) if ($^O =~ /MSWin32/);
skip( "difference between running a process in a fork, or with system()", 1
);
-
- language_output_is( 'm4', <<'CODE', <<'OUT', 'substring in middle of string'
);
+ language_output_is( 'm4', <<'CODE', <<'OUT', 'output of "false"' );
syscmd(`false')
sysval()
CODE
@@ -20,7 +20,9 @@ OUT
}
{
- language_output_is( 'm4', <<'CODE', <<'OUT', 'substring in middle of string'
);
+ skip( "`true' not available on $^O", 1 ) if ($^O =~ /MSWin32/);
+
+ language_output_is( 'm4', <<'CODE', <<'OUT', 'output of "true"' );
syscmd(`true')
sysval()
CODE
Modified: trunk/languages/m4/t/freezing/002_many_files.t
==============================================================================
--- trunk/languages/m4/t/freezing/002_many_files.t (original)
+++ trunk/languages/m4/t/freezing/002_many_files.t Tue Aug 9 12:49:17 2005
@@ -4,10 +4,11 @@ use strict;
use FindBin;
use lib "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../../lib";
+use Parrot::Config;
use Test::More tests => 3;
my $real_out;
-my $parrot_m4 = 'cd .. && ./parrot languages/m4/m4.pbc';
+my $parrot_m4 = "cd .. && .$PConfig{slash_exec}parrot$PConfig{exe}
languages/m4/m4.pbc";
#--------------------------------------------