James Keenan via RT wrote:
On Sun Dec 03 14:08:31 2006, [EMAIL PROTECTED] wrote:
The files attach refactor tools/build/pmc2c.pl, extracting most of its
functionality into lib/
Parrot/Pmc2c/Utils.pm and provide 8 test files to be stored in t/tools/pmc2cutils/. These
substitute for my files originally submitted on (I think) Nov 30. That version of pmc2c.pl and
Utils.pm failed to 'make'; these succeed (at least for me).
Since these tests are meant to be run on the assumption that 'make' has
not yet run, I have found that a good way to run them is this:
$ make realclean
$ svn update
$ perl Configure.pl (# or a shell script that calls Configure.pl)
$ mkdir t/tools/pmc2cutils
$ mv *.t t/tools/pmc2cutils/
$ mv Utils.pm lib/Parrot/Pmc2c/
$ mv tools/build/pmc2c.pl tools/build/oldpmc2c.pl
$ mv pmc2c.pl tools/build/mypmc2c.pl
$ ln -s tools/build/mypmc2c.pl pmc2c.pl
(I submitted a patch on pmc2c.pl last night, but you can pick up my new
version at http://thenceforward.net/parrot/tools/build/pmc2c.pl.)
You have now stashed the current version of pmc2c.pl as oldpmc2c.pl.
pmc2c.pl now links to mypmc2c.pl -- which means that you don't have to
futz with the Makefile.
At this point, call:
$ prove -v t/tools/pmc2cutils/*.t
Alternatively, you could edit the Makefile to include this:
PROVE = /usr/local/bin/prove -v
PMC2CUTILS_DIR = t/tools/pmc2cutils
testbuildtools :
$(PROVE) \
$(PMC2CUTILS_DIR)/00-qualify.t \
$(PMC2CUTILS_DIR)/01-pmc2cutils.t \
$(PMC2CUTILS_DIR)/02-find_file.t \
$(PMC2CUTILS_DIR)/03-dump_vtable.t \
$(PMC2CUTILS_DIR)/04-dump_pmc.t \
$(PMC2CUTILS_DIR)/05-gen_c.t \
$(PMC2CUTILS_DIR)/06-print_tree.t \
$(PMC2CUTILS_DIR)/07-open_file.t
... anywhere after the declaration of the 'all' target. (This is
available at http://thenceforward.net/parrot/my_makefile_additions).
Then call:
$ make testbuildtools
I'd eventually like to have Configure.pl build this into the Makefile,
but I don't know how to do that myself.
Feedback encouraged.
kid51