[perl #36843] [PATCH] m4 with MinGW

1 view
Skip to first unread message

François PERRAD)

unread,
Aug 9, 2005, 2:48:59 AM8/9/05
to bugs-bi...@rt.perl.org
# New Ticket Created by François PERRAD
# Please include the string: [perl #36843]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36843 >


svn diff
Index: build_tools/parrotdef.pl
===================================================================
--- build_tools/parrotdef.pl (revision 8868)
+++ build_tools/parrotdef.pl (working copy)
@@ -31,6 +31,7 @@
Parrot_debug
Parrot_disassemble
Parrot_load_bytecode
+ Parrot_load_lib
pmc_new
pmc_reuse
pmc_new_noinit
@@ -268,6 +269,8 @@
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";
Index: config/init/data.pl
===================================================================
--- config/init/data.pl (revision 8868)
+++ config/init/data.pl (working copy)
@@ -137,6 +137,8 @@

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 => '/',

Index: config/gen/makefiles/m4.in
===================================================================
--- config/gen/makefiles/m4.in (revision 8868)
+++ config/gen/makefiles/m4.in (working copy)
@@ -19,6 +19,8 @@
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_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 $@
Index: languages/m4/t/basic/003_getopt.t
===================================================================
--- languages/m4/t/basic/003_getopt.t (revision 8868)
+++ languages/m4/t/basic/003_getopt.t (working copy)
@@ -4,10 +4,11 @@
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';


Index: languages/m4/t/basic/012_eval.t
===================================================================
--- languages/m4/t/basic/012_eval.t (revision 8868)
+++ languages/m4/t/basic/012_eval.t (working copy)
@@ -4,10 +4,11 @@
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' );
Index: languages/m4/t/freezing/001_freeze.t
===================================================================
--- languages/m4/t/freezing/001_freeze.t (revision 8868)
+++ languages/m4/t/freezing/001_freeze.t (working copy)
@@ -4,14 +4,15 @@
use FindBin;
use lib "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../../lib";

+use Parrot::Config;
use Test::More tests => 1;

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";


#--------------------------------------------
Index: languages/m4/t/freezing/002_many_files.t
===================================================================
--- languages/m4/t/freezing/002_many_files.t (revision 8868)
+++ languages/m4/t/freezing/002_many_files.t (working copy)
@@ -4,10 +4,11 @@
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";


#--------------------------------------------
Index: languages/m4/t/builtins/010_sysval.t
===================================================================
--- languages/m4/t/builtins/010_sysval.t (revision 8868)
+++ languages/m4/t/builtins/010_sysval.t (working copy)
@@ -8,6 +8,7 @@

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' );
@@ -19,7 +20,10 @@
OUT
}

+SKIP:
{
+ skip( "`true' not available on $^O", 1 ) if ($^O =~ /MSWin32/);
+
language_output_is( 'm4', <<'CODE', <<'OUT', 'substring in middle of string' );
syscmd(`true')
sysval()

Francois PERRAD

unread,
Aug 10, 2005, 8:29:53 AM8/10/05
to Bernhard.S...@gmx.de, parrotbug...@parrotcode.org
At 12:56 09/08/2005 -0700, you wrote:
>Thanks a lot,
>
>I think this is the first large patch for 'm4', that I received.
>Tests are still completing here on my Linux box.

Sorry, but I forgot this part :

Index: languages/m4/t/freezing/001_freeze.t
===================================================================
--- languages/m4/t/freezing/001_freeze.t (revision 8899)


+++ languages/m4/t/freezing/001_freeze.t (working copy)
@@ -4,14 +4,15 @@
use FindBin;
use lib "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../../lib";

+use Parrot::Config;
use Test::More tests => 1;

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";


#--------------------------------------------

François.

>CU, Bernhard
>--
>/* Bernhard.S...@gmx.de */


Reply all
Reply to author
Forward
0 new messages