# New Ticket Created by Leopold Toetsch
# Please include the string: [perl #24080]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24080
Attached is a first attempt to prepare for the move of languages/imcc to
imcc and to build a single parrot executable.
The patch doesn't address languages/* yet, only parrot/imcc are involved.
Changes:
- imcc makefile rules and targets are included in root now
- libparrot contains imcc objects too (except main of course)
- imcc test system is adapted to run with the parrot executable
Known issues:
- Building of imcc in its own directory is broken (this will very
probably be abandoned anyway - except Melvin, the original author of
imcc, loudly hollers - it could be a dummy to just copy parrot).
- languages like perl6, which are still using imcc$(EXE) will be
addressed by another patch.
- make realclean deletes generated parser/lexer files too (which it
probably shouldn't) - regenerating these files may be broken.
Status
- Runs make test (incl. test_imcc) on i386/linux here.
The only problematic thing AFAIK might be the automatic rule in
root.in:594 that includes the private imcc headers for building
IMCC_O_FILES. I don't know if other makes are capable of info make
Syntax of Static Pattern Rules. If not, we probably have to expand
these to explicit rules.
Please give it a try.
Feedback very welcome
TIA
leo
-- attachment 1 --
url: http://rt.perl.org/rt2/attach/65508/48841/d5cfd7/parrot-build-1.patch
--- parrot/config/gen/cflags/root.inTue Jul 22 16:56:43 2003
+++ parrot-leo/config/gen/cflags/root.inWed Oct 1 09:10:30 2003
@@ -7,3 +7,7 @@
#
spf_render.c -{-Wformat-nonliteral} # noisy
tsq.c -{${optimize}} # never optimize tsq.c!
+
+# imcc file settings
+{imcc} -{-Wwrite-strings -Wcast-qual} s/-Wno-unused/-Wunused/ -{-Wformat-nonliteral}
+
--- parrot/config/gen/makefiles/root.in Tue Sep 30 16:26:09 2003
+++ parrot-leo/config/gen/makefiles/root.in Wed Oct 1 10:24:22 2003
@@ -8,13 +8,13 @@
INCLUDEDIR = $(EXEC_PREFIX)/include
# imcc dir
-IMCC_DIR = languages/imcc
+IMCC_DIR = languages${slash}imcc
+
# file containing main
-PARROT_MAIN = test_main
+PARROT_MAIN = $(IMCC_DIR)${slash}main
-O = ${o}
-SO = ${so}
-A = ${a}
+
+# programs and utils used for build
RM_F = ${rm_f}
RM_RF = ${rm_rf}
AR_CR = ${ar} ${ar_flags}
@@ -22,9 +22,18 @@
LINK = ${link}
LD = ${ld}
LD_SHARED = ${ld_shared}
+TOUCH = perl -e ${PQ}open(A,q{},$$_) or die foreach @ARGV${PQ}
+YACC = ${yacc}
+LEX = ${lex}
+
+# file extensions and util flags
+O = ${o}
+SO = ${so}
+A = ${a}
LD_OUT = ${ld_out}
LD_SHARED_FLAGS=${ld_shared_flags}
+
INC=./${inc}
NONGEN_HEADERS = ${nongen_headers}
@@ -96,6 +105,36 @@
#
###
+# these are private to the imcc subsystem
+IMCC_H_FILES = \
+ $(IMCC_DIR)${slash}imc.h\
+ $(IMCC_DIR)${slash}stacks.h \
+ $(IMCC_DIR)${slash}cfg.h\
+ $(IMCC_DIR)${slash}instructions.h \
+ $(IMCC_DIR)${slash}debug.h \
+ $(IMCC_DIR)${slash}sets.h \
+ $(IMCC_DIR)${slash}symreg.h \
+ $(IMCC_DIR)${slash}pbc.h\
+ $(IMCC_DIR)${slash}optimizer.h \
+ $(IMCC_DIR)${slash}parser.h \
+ $(IMCC_DIR)${slash}imcparser.h
+
+IMCC_O_FILES = \
+ $(IMCC_DIR)${slash}imcparser$(O)\
+ $(IMCC_DIR)${slash}imclexer$(O) \
+ $(IMCC_DIR)${slash}imc$(O) \
+ $(IMCC_DIR)${slash}stacks$(O) \
+ $(IMCC_DIR)${slash}symreg$(O) \
+ $(IMCC_DIR)${slash}instructions$(O) \
+ $(IMCC_DIR)${slash}cfg$(O) \
+ $(IMCC_DIR)${slash}sets$(O) \
+ $(IMCC_DIR)${slash}debug$(O)\
+ $(IMCC_DIR)${slash}optimizer$(O)\
+ $(IMCC_DIR)${slash}pbc$(O) \
+ $(IMCC_DIR)${slash}parser_util$(O) \
+ $(IMCC_DIR)${slash}jit$(O) \
+ $(IMCC_DIR)${slash}pcc$(O)
+
GENERAL_H_FILES = $(NONGEN_HEADERS) $(GEN_HEADERS) ${cg_h}
@@ -113,7 +152,7 @@
IO_O_FILES = io/io$(O) io/io_buf$(O) io/io_unix$(O) io/io_win32$(O) \
io/io_stdio$(O) io/io_passdown$(O)
-INTERP_O_FILES = exceptions$(O) global_setup$(O) interpreter$(O) parrot$(O) \
+INTERP_O_FILES = exceptions$(O) global_setup$(O) interpreter$(O) \
register$(O) core_ops$(O) core_ops_prederef$(O) core_ops_switch$(O) \
memory$(O) objects$(O) ${exec_o} \
packfile$(O) stacks$(O) string$(O) sub$(O) encoding$(O) \
@@ -128,7 +167,8 @@
dynext$(O) utils$(O) vtables$(O) mmd$(O)
O_FILES = $(INTERP_O_FILES) $(IO_O_FILES) $(CLASS_O_FILES) \
- $(ENCODING_O_FILES) $(CHARTYPE_O_FILES)
+ $(ENCODING_O_FILES) $(CHARTYPE_O_FILES) \
+ $(IMCC_O_FILES)
OPS_FILES = ${ops} $(GEN_OPSFILES)
@@ -170,8 +210,6 @@
PINFO = pbc_info${exe}
PDB = pdb${exe}