# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #31860]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31860 >


I tried to clear out some of dependency issues in Makefile, and got lost. Instead, you 
get:

Minor updates checked in to the root makefile (gen'd from 
config/gen/makefiles/root.in) to:

- don't treat parrotlib.pbc specially, but just like the other generated .pbc files. *
- Added in a missing dependency to the .imc -> .pbc rule I added earlier (need parrot 
built first, duh!)
- changed all the ./parrot's to .${slash}$(TEST_PROG) {arguably, the ./ should be 
included =in= TEST_PROG if necessary, though I don't personally use OS where this 
would break. At least it's a step in the right direction.} 

Builds fine with:

make realclean;perl Configure.pl;make;make test

Regards.

*  side effect of this is that we now build parrotlib.imc into library/, not include/. 
which makes sense to me, though I could be addled. This required updates to:

t/library/parrotlib.t
src/library.c
MANIFEST.generated

Because of these extra changes (outside of the Makefile), I've attached a patch 
instead of applying it directly - Leo/Dan? This ok? (if you like, I can apply it from 
my sandbox) Even if you don't like the change to parrotlib's directory, the other 
changes are safe.
Index: MANIFEST.generated
===================================================================
RCS file: /cvs/public/parrot/MANIFEST.generated,v
retrieving revision 1.4
diff -b -u -r1.4 MANIFEST.generated
--- MANIFEST.generated  4 Oct 2004 04:54:23 -0000       1.4
+++ MANIFEST.generated  6 Oct 2004 03:58:00 -0000
@@ -21,7 +21,6 @@
 runtime/parrot/library/ncurses.pbc                [main]
 runtime/parrot/library/parrotlib.pbc              [main]
 runtime/parrot/library/pcre.pbc                   [main]
-runtime/parrot/include/parrotlib.pbc              [main]
 runtime/parrot/include/chartypes.pasm             [main]
 runtime/parrot/include/config.fpmc                [main]
 runtime/parrot/include/datatypes.pasm             [main]
Index: src/library.c
===================================================================
RCS file: /cvs/public/parrot/src/library.c,v
retrieving revision 1.8
diff -b -u -r1.8 library.c
--- src/library.c       30 Sep 2004 16:00:38 -0000      1.8
+++ src/library.c       6 Oct 2004 03:58:00 -0000
@@ -38,7 +38,7 @@
 {
     /* XXX TODO: file location not known at runtime, should
        be linked with parrot (or use the upcoming config system) */
-    Parrot_load_bytecode(interpreter, "runtime/parrot/include/parrotlib.pbc");
+    Parrot_load_bytecode(interpreter, "runtime/parrot/library/parrotlib.pbc");
 }
 
 /*
Index: t/library/parrotlib.t
===================================================================
RCS file: /cvs/public/parrot/t/library/parrotlib.t,v
retrieving revision 1.3
diff -b -u -r1.3 parrotlib.t
--- t/library/parrotlib.t       1 Oct 2004 21:16:46 -0000       1.3
+++ t/library/parrotlib.t       6 Oct 2004 03:58:00 -0000
@@ -28,7 +28,7 @@
 ##PIR##
 .sub _main 
 
-  load_bytecode 'runtime/parrot/include/parrotlib.pbc'
+  load_bytecode 'runtime/parrot/library/parrotlib.pbc'
   .local pmc    location_sub
   .local string location
 END_CODE
@@ -71,7 +71,7 @@
   location     = location_sub( 'parrotlib.pbc' )
 $template_bottom
 END_CODE
-runtime/parrot/include/parrotlib.pbc
+runtime/parrot/library/parrotlib.pbc
 END_OUT
 
 output_is( << "END_CODE", << 'END_OUT', 'imcc_compile_file_location, non-existent' );
Index: config/gen/makefiles/root.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
retrieving revision 1.243
diff -b -u -r1.243 root.in
--- config/gen/makefiles/root.in        4 Oct 2004 04:19:21 -0000       1.243
+++ config/gen/makefiles/root.in        6 Oct 2004 03:58:01 -0000
@@ -201,10 +201,7 @@
     $(GEN_SOURCES) \
     $(GEN_MODULES) \
     $(GEN_LIBRARY) \
-    $(INC)/jit_emit.h \
-    runtime/parrot/include/parrotlib.pbc
-
-
+    $(INC)/jit_emit.h 
 
 ###############################################################################
 #
@@ -443,7 +440,7 @@
 .c$(O) :
        $(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) 
${cc_o_out}$@ -c $<
 
-%.pbc:%.imc
+%.pbc:%.imc $(TEST_PROG)
        .${slash}$(TEST_PROG) -o $@ $<
 
 ###############################################################################
@@ -454,7 +451,7 @@
 #
 ###############################################################################
 
-all : flags_dummy $(TEST_PROG) runtime/parrot/include/parrotlib.pbc 
runtime/parrot/include/config.fpmc docs $(LIBNCI_SO) $(GEN_LIBRARY)
+all : flags_dummy $(TEST_PROG) runtime/parrot/include/config.fpmc docs $(LIBNCI_SO) 
$(GEN_LIBRARY)
 
 .SUFFIXES : .c .h .pmc .dump $(O) .str
 
@@ -572,14 +569,11 @@
        @echo Compiling with:
        @$(PERL) tools/dev/cc_flags.pl ./CFLAGS echo $(CC) $(CFLAGS) xx$(O) -c xx.c
 
-runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.imc 
$(TEST_PROG)
-       ./parrot -o $@ runtime/parrot/library/parrotlib.imc
-
 runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(TEST_PROG)
        @echo Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross 
your fingers
-       ./parrot config_lib.pasm
+       .${slash}$(TEST_PROG) config_lib.pasm
        @echo If the next line prints $(VERSION), it did help.
-       ./parrot parrot-config.imc VERSION DEVEL
+       .${slash}$(TEST_PROG) parrot-config.imc VERSION DEVEL
 
 mops : examples/assembly/mops${exe} examples/mops/mops${exe}
 
@@ -1290,10 +1284,10 @@
        echo  'end' >> hello.pasm
 
 hello.pbc:     hello.pasm
-       ./parrot -o hello.pbc hello.pasm
+       $(TEST_PROG) -o hello.pbc hello.pasm
 
 hello$(O):     hello.pbc
-       ./parrot -o hello$(O) hello.pbc
+       $(TEST_PROG) -o hello$(O) hello.pbc
 
 hello: hello$(O)
        $(MAKE) EXEC=hello exec

Reply via email to