# New Ticket Created by Jason Gloudon
# Please include the string: [perl #16764]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=16764 >
This is a simple fix to the broken libparrot.a makefile target for Visual C++
win32 builds so that 'nmake test' works. This does not fix other non-UNIX
targets and win32 builds with the borland compilers. The latter should be a
matter of providing the approprate library building tool and options in the
hints file.
--
Jason
-- attachment 1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/35696/28934/434185/lib.patch
Index: config/gen/makefiles/root.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
retrieving revision 1.24
diff -u -r1.24 root.in
--- config/gen/makefiles/root.in 25 Aug 2002 23:39:15 -0000 1.24
+++ config/gen/makefiles/root.in 26 Aug 2002 00:00:26 -0000
@@ -1,9 +1,9 @@
O = ${o}
SO = .so
-A = .a
+A = ${a}
RM_F = ${rm_f}
RM_RF = ${rm_rf}
-AR_CRS = ar crs
+MAKELIB = ${makelib}
LD = ${ld}
LD_SHARED = ${ld_shared}
LD_OUT = ${ld_out}
@@ -160,7 +160,7 @@
# XXX Unix-only for now
libparrot$(A) : $(O_DIRS) $(O_FILES)
- $(AR_CRS) $@ $(O_FILES)
+ $(MAKELIB) ${makelib_opt} ${makelib_out}$@ $(O_FILES)
$(TEST_PROG) : test_main$(O) $(GEN_HEADERS) $(O_DIRS) $(O_FILES)
lib/Parrot/OpLib/core.pm lib/Parrot/PMC.pm
$(LD) ${ld_out}$(TEST_PROG) $(LDFLAGS) $(O_FILES) test_main$(O) $(C_LIBS)
@@ -438,7 +438,7 @@
#
###############################################################################
-test : $(TEST_PROG) libparrot.a assemble.pl test_dummy
+test : $(TEST_PROG) libparrot$(A) assemble.pl test_dummy
test_dummy :
$(PERL) t/harness $(TEST_PROG_ARGS)
Index: config/init/data.pl
===================================================================
RCS file: /cvs/public/parrot/config/init/data.pl,v
retrieving revision 1.3
diff -u -r1.3 data.pl
--- config/init/data.pl 22 Aug 2002 21:55:41 -0000 1.3
+++ config/init/data.pl 26 Aug 2002 00:00:26 -0000
@@ -17,7 +17,9 @@
my(%c)=(
debugging => $debugging ? 1 : 0,
-
+ makelib => $Config{ar}, # tool for building library
+ makelib_opt => 'rcs', # options required by tool
+ makelib_out => '', # option for specifying output file
cc => $Config{cc},
ccflags => $Config{ccflags},
ld => $Config{ld},
@@ -28,6 +30,7 @@
cc_inc => "-I./include",
cc_debug => '-g',
cc_warn => '',
+ a => '.a', # library(archive) file extension
o => '.o', # object files extension
exe => $Config{_exe}, # executable files extension
cc_o_out => '-o ', # cc object output file
Index: config/init/hints/mswin32.pl
===================================================================
RCS file: /cvs/public/parrot/config/init/hints/mswin32.pl,v
retrieving revision 1.1
diff -u -r1.1 mswin32.pl
--- config/init/hints/mswin32.pl 24 May 2002 06:24:27 -0000 1.1
+++ config/init/hints/mswin32.pl 26 Aug 2002 00:00:26 -0000
@@ -20,6 +20,10 @@
$ccflags =~ s/-O1 // if $cc_output =~ m/Standard/;
Configure::Data->set(
+ a => '.lib',
+ makelib => 'lib',
+ makelib_opt=> '',
+ makelib_out=> '-out:',
o => '.obj',
cc_o_out => '-Fo',
cc_exe_out => '-Fe',
@@ -60,4 +64,4 @@
libs => $libs
);
}
-}
\ No newline at end of file
+}