# New Ticket Created by Zev Benjamin # Please include the string: [perl #51112] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=51112 >
I would appreciate if someone would look over this patch before committing it. I'm open to comments. Zev
Index: perl6.pir =================================================================== --- perl6.pir (revision 25992) +++ perl6.pir (working copy) @@ -184,6 +184,7 @@ .include 'src/gen_grammar.pir' .include 'src/parser/quote_expression.pir' .include 'src/gen_actions.pir' +.include 'src/gen_include_runtime.pir' =back Index: config/makefiles/root.in =================================================================== --- config/makefiles/root.in (revision 25992) +++ config/makefiles/root.in (working copy) @@ -30,13 +30,17 @@ xmas: perl6$(EXE) -SOURCES = perl6.pir \ +BOOTSTRAP_SOURCES = perl6.pir \ src/gen_grammar.pir \ src/gen_actions.pir \ src/gen_builtins.pir \ src/parser/quote_expression.pir \ $(PERL6_GROUP) +SOURCES = \ + src/gen_runtime.pir \ + $(BOOTSTRAP_SOURCES) + BUILTINS_PIR = \ src/classes/Object.pir \ src/classes/Bool.pir \ @@ -60,8 +64,12 @@ src/builtins/op.pir \ src/builtins/parrot.pir \ src/builtins/range.pir \ + src/builtins/system.pir \ src/builtins/traits.pir \ +RUNTIME_SOURCES = \ + src/runtime/Dummy.pm + PMCS = perl6str PMC_SOURCES = $(PMC_DIR)/perl6str.pmc PERL6_GROUP = $(PMC_DIR)/perl6_group$(LOAD_EXT) @@ -72,9 +80,14 @@ $(PBC_TO_EXE) perl6.pbc # the default target -perl6.pbc: $(PARROT) $(SOURCES) +perl6.pbc: $(PARROT) perl6-bootstrap.pbc $(SOURCES) + echo ".include 'src/gen_runtime.pir'" > src/gen_include_runtime.pir $(PARROT) $(PARROT_ARGS) -o perl6.pbc perl6.pir +perl6-bootstrap.pbc: $(PARROT) $(BOOTSTRAP_SOURCES) + echo "" > src/gen_include_runtime.pir + $(PARROT) $(PARROT_ARGS) -o perl6-bootstrap.pbc perl6.pir + src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg $(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \ --output=src/gen_grammar.pir \ @@ -85,8 +98,15 @@ --target=pir src/parser/actions.pm src/gen_builtins.pir: $(BUILTINS_PIR) - $(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir + $(CAT) $(BUILTINS_PIR) > src/gen_builtins.pir +src/gen_runtime.pir: src/gen_runtime.pm + $(PARROT) $(PARROT_ARGS) perl6-bootstrap.pbc --output=src/gen_runtime.pir \ + --target=pir src/gen_runtime.pm + +src/gen_runtime.pm: $(RUNTIME_SOURCES) + $(CAT) $(RUNTIME_SOURCES) > src/gen_runtime.pm + $(PERL6_GROUP): $(PARROT) $(PMC_SOURCES) cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS) cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS) @@ -150,12 +170,16 @@ CLEANUPS = \ perl6.pbc \ + perl6-bootstrap.pbc \ perl6.c \ perl6$(O) \ perl6$(EXE) \ src/gen_grammar.pir \ src/gen_actions.pir \ src/gen_builtins.pir \ + src/gen_runtime.pir \ + src/gen_runtime.pm \ + src/gen_include_runtime.pir \ $(PMC_DIR)/*.h \ $(PMC_DIR)/*.c \ $(PMC_DIR)/*.dump \ Index: src/runtime/Dummy.pm =================================================================== --- src/runtime/Dummy.pm (revision 0) +++ src/runtime/Dummy.pm (revision 0) @@ -0,0 +1,2 @@ +# This is a dummy runtime file. It should be removed as soon as +# there is a real file in this directory