Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1395 lines (1085 sloc) 41.6 KB
# Copyright: 2001-2005 The Perl Foundation. All Rights Reserved.
# $Id$
###############################################################################
#
# INSTALL CONFIGURATIONS:
#
###############################################################################
DEVEL = ${DEVEL}
VERSION = ${VERSION}$(DEVEL)
# Override at least PREFIX with the install location if you're going
# to be using this outside of your build area.
BUILDPREFIX =
PREFIX = ${prefix}
EXEC_PREFIX = $(PREFIX)
BIN_DIR = $(EXEC_PREFIX)/bin
LIB_DIR = $(EXEC_PREFIX)/lib
INCLUDE_DIR = $(EXEC_PREFIX)/include
###############################################################################
#
# SOURCE CONFIGURATIONS:
#
# Set up information about directories, where the sources can be found.
#
###############################################################################
# directory for abstract syntax tree sources
AST_DIR = ast
# directory for build tools
BUILD_TOOLS_DIR = build_tools
# current directory
CUR_DIR = .
# directory for the intermediate code compiler
IMCC_DIR = imcc
# directory for header files
INC_DIR = ${inc}
# directory for the IO subsystem
IO_DIR = io
# directory with Parrot modules
LIBRARY_DIR = runtime/parrot/library
# directory for *.ops file
OPS_DIR = ops
# directory for packfile files
PF_DIR = pf
# source directory
SRC_DIR = src
###############################################################################
#
# BUILD TOOL CONFIGURATIONS:
#
# DO NOT ADD C COMPILER FLAGS HERE
# Add them in Configure.pl--look for the
# comment 'ADD C COMPILER FLAGS HERE'
#
###############################################################################
RM_F = ${rm_f}
RM_RF = ${rm_rf}
AR_CR = ${ar} ${ar_flags}
RANLIB = ${ranlib}
PERL = ${perl}
TOUCH = $(PERL) -e ${PQ}open(A,qq{>>$$_}) or die foreach @ARGV${PQ}
YACC = ${yacc}
LEX = ${lex}
# do not die when dir already exits
MKDIR = $(PERL) -e ${PQ}-d or mkdir $$_,0777 or die foreach @ARGV${PQ}
CC = ${cc}
CC_INC = ${cc_inc}
CFLAGS = ${ccflags} ${cc_debug} ${ccwarn} $(CC_INC) ${cc_hasjit} ${cg_flag} ${gc_flag}
C_LIBS = ${libs}
LINK = ${link}
LINKFLAGS = ${linkflags} ${link_debug} ${ld_debug}
LD = ${ld}
LDFLAGS = ${ldflags} ${ld_debug}
LINT = splint
# note: +distinctinternalnames with +externalnamelen at 8 characters
# (the ANSI standard) is not going to fly for us.
LINTFLAGS = -weak +showscan +showsummary +posixstrictlib -abstract \
+aliasunique +ansireserved +ansireservedinternal +assignexpose \
+bitwisesigned +boolcompare +booltype BOOLVAL +casebreak -castfcnptr \
-charint +continuecomment +controlnestdepth 15 +cppnames +declundef \
+distinctinternalnames +evalorder +fielduse +forcehints -globs \
+imptype +includenest 8 +incondefs +incondefslib +linelen 9999 \
+longintegral +macroassign +macroempty +macroredef +matchanyintegral \
+nestedextern +noeffect +readonlystrings +realcompare +shadow -type
# slightly weaker, more realistic variant.
LINTFLAGS2 = $(LINTFLAGS) -ansireserved -retvalother -bitwisesigned
# added to lint target to simplify experimentation,
# ex: make LINTOPTS='-posixstrictlibs +posixlibs' lint
LINTOPTS =
INNO_SETUP = iscc
###############################################################################
#
# file extensions and util flags
#
###############################################################################
O = ${o}
EXE = ${exe}
SHARE_EXT = ${share_ext}
LOAD_EXT = ${load_ext}
A = ${a}
LD_OUT = ${ld_out}
LD_SHARE_FLAGS = ${ld_share_flags}
LD_LOAD_FLAGS = ${ld_load_flags}
# generated by config/init/headers.pl
NONGEN_HEADERS = ${TEMP_nongen_headers}
###############################################################################
#
# "STICKY" GENERATED FILES:
#
# These files are created when Configure.pl runs.
#
# We don't delete these on 'clean' only on 'realclean'.
# That way, we don't have to re-Configure.pl after making
# clean.
#
###############################################################################
GEN_MAKEFILES = \
Makefile \
languages/Makefile \
#CONDITIONED_LINE(has_perldoc): docs/Makefile \
dynclasses/Makefile \
dynoplibs/Makefile \
languages/cola/Makefile \
languages/parrot_compiler/Makefile \
languages/jako/Makefile \
languages/miniperl/Makefile \
languages/scheme/Makefile \
languages/befunge/Makefile \
languages/bf/Makefile \
languages/ook/Makefile \
languages/m4/Makefile \
languages/perl6/Makefile \
languages/urm/Makefile \
languages/tcl/Makefile \
languages/tcl/examples/Makefile
GEN_CONFIGS = \
include/parrot/config.h \
include/parrot/platform.h \
include/parrot/platform_interface.h \
include/parrot/has_header.h \
include/parrot/feature.h \
include/parrot/core_pmcs.h \
include/parrot/exec_dep.h \
lib/Parrot/Config.pm \
lib/Parrot/PMC.pm \
runtime/parrot/include/config.fpmc \
$(SRC_DIR)/platform.c \
#CONDITIONED_LINE(platform_asm): $(SRC_DIR)/platform_asm.s \
$(SRC_DIR)/core_pmcs.c \
CFLAGS \
imcc/CFLAGS \
config_lib.pasm \
$(SRC_DIR)/nci_test$(O) \
libparrot.def \
ast/ast.y.flag \
dynclasses/build.pl \
imcc/imcc.y.flag \
ops/core_ops.c \
ops/core_ops_switch.c
# most of these are generated by config/gen/parrot_include.pl
GEN_PASM_INCLUDES = \
runtime/parrot/include/signal.pasm \
${TEMP_gen_pasm_includes}
STICKY_FILES = $(GEN_CONFIGS) $(GEN_MAKEFILES) myconfig $(GEN_PASM_INCLUDES)
###############################################################################
#
# "FLUID" GENERATED FILES:
#
# These files are created during the build process.
#
# We *do* delete these on 'clean'.
#
###############################################################################
GEN_OPSFILES =
GEN_HEADERS = \
$(INC_DIR)/vtable.h \
$(INC_DIR)/oplib/core_ops.h \
$(INC_DIR)/oplib/ops.h \
$(SRC_DIR)/parrot_config.h \
$(INC_DIR)/oplib/core_ops_switch.h
GEN_SOURCES = \
$(SRC_DIR)/core_ops.c \
$(SRC_DIR)/fingerprint.c \
$(SRC_DIR)/nci.c \
$(SRC_DIR)/core_ops_switch.c \
$(SRC_DIR)/jit_cpu.c \
$(SRC_DIR)/exec_cpu.c
GEN_MODULES = \
lib/Parrot/OpLib/core.pm
GEN_LIBRARY = \
$(LIBRARY_DIR)/config.pbc \
$(LIBRARY_DIR)/Data/Dumper/Base.pbc \
$(LIBRARY_DIR)/Data/Dumper/Default.pbc \
$(LIBRARY_DIR)/Data/Dumper.pbc \
$(LIBRARY_DIR)/Data/Escape.pbc \
$(LIBRARY_DIR)/Data/Sort.pbc \
$(LIBRARY_DIR)/Digest/MD5.pbc \
$(LIBRARY_DIR)/dumper.pbc \
$(LIBRARY_DIR)/Getopt/Long.pbc \
$(LIBRARY_DIR)/ncurses.pbc \
$(LIBRARY_DIR)/parrotlib.pbc \
$(LIBRARY_DIR)/pcre.pbc \
$(LIBRARY_DIR)/Stream/Base.pbc \
$(LIBRARY_DIR)/Stream/Combiner.pbc \
$(LIBRARY_DIR)/Stream/Coroutine.pbc \
$(LIBRARY_DIR)/Stream/Filter.pbc \
$(LIBRARY_DIR)/Stream/Lines.pbc \
$(LIBRARY_DIR)/Stream/ParrotIO.pbc \
$(LIBRARY_DIR)/Stream/Replay.pbc \
$(LIBRARY_DIR)/Stream/Sub.pbc \
$(LIBRARY_DIR)/Stream/Writer.pbc \
$(LIBRARY_DIR)/YAML/Parser/Syck.pbc
# XXX Why don't these build?
#runtime/parrot/library/libpcre.pbc \
#runtime/parrot/library/Data/Replace.pbc \
#runtime/parrot/library/postgres.pbc \
# the dependencies of jit_emit.h are done explicitely
# including this file in GEN_HEADERS causes unnecessary recompile of all
FLUID_FILES = \
$(GEN_OPSFILES) \
$(GEN_HEADERS) \
$(GEN_SOURCES) \
$(GEN_MODULES) \
$(GEN_LIBRARY) \
$(INC_DIR)/jit_emit.h \
runtime/parrot/include/parrotlib.pbc
###############################################################################
#
# OTHER FILE GROUPS:
#
###############################################################################
# these are private to the IMCC subsystem
IMCC_H_FILES = \
$(IMCC_DIR)/imc.h \
$(IMCC_DIR)/stacks.h \
$(IMCC_DIR)/cfg.h \
$(IMCC_DIR)/class.h \
$(IMCC_DIR)/instructions.h \
$(IMCC_DIR)/debug.h \
$(IMCC_DIR)/sets.h \
$(IMCC_DIR)/unit.h \
$(IMCC_DIR)/symbol.h \
$(IMCC_DIR)/symreg.h \
$(IMCC_DIR)/pbc.h \
$(IMCC_DIR)/optimizer.h \
$(IMCC_DIR)/parser.h \
$(IMCC_DIR)/imcparser.h
IMCC_O_FILES = \
$(IMCC_DIR)/imcparser$(O) \
$(IMCC_DIR)/imclexer$(O) \
$(IMCC_DIR)/imc$(O) \
$(IMCC_DIR)/stacks$(O) \
$(IMCC_DIR)/symbol$(O) \
$(IMCC_DIR)/class$(O) \
$(IMCC_DIR)/symreg$(O) \
$(IMCC_DIR)/instructions$(O) \
$(IMCC_DIR)/cfg$(O) \
$(IMCC_DIR)/reg_alloc$(O) \
$(IMCC_DIR)/sets$(O) \
$(IMCC_DIR)/debug$(O) \
$(IMCC_DIR)/optimizer$(O) \
$(IMCC_DIR)/pbc$(O) \
$(IMCC_DIR)/parser_util$(O) \
$(IMCC_DIR)/jit$(O) \
$(IMCC_DIR)/sub$(O) \
$(IMCC_DIR)/fastcall$(O) \
$(IMCC_DIR)/pcc$(O)
AST_H_FILES = \
$(AST_DIR)/ast.h \
$(AST_DIR)/astparser.h
AST_O_FILES = \
$(AST_DIR)/astparser$(O) \
$(AST_DIR)/astlexer$(O) \
$(AST_DIR)/ast_main$(O) \
$(AST_DIR)/node$(O)
# generated list of header files
GENERAL_H_FILES = $(NONGEN_HEADERS) $(GEN_HEADERS) ${TEMP_cg_h}
#CONDITIONED_LINE(has_icu):ICU_H_FILES = ${icu_headers}
ALL_H_FILES = $(GENERAL_H_FILES)
CHARSET_O_FILES = ${TEMP_charset_o}
CLASS_PMC_FILES = ${TEMP_pmc_classes_pmc}
CLASS_O_FILES = ${TEMP_pmc_classes_o}
CLASS_STR_FILES = ${TEMP_pmc_classes_str}
ENCODING_O_FILES = ${TEMP_encoding_o}
IO_O_FILES = \
$(IO_DIR)/io$(O) \
$(IO_DIR)/io_buf$(O) \
$(IO_DIR)/io_layers$(O) \
$(IO_DIR)/io_unix$(O) \
$(IO_DIR)/io_utf8$(O) \
$(IO_DIR)/io_win32$(O) \
$(IO_DIR)/io_stdio$(O) \
$(IO_DIR)/io_passdown$(O)
INTERP_O_FILES = \
$(SRC_DIR)/charset$(O) \
$(SRC_DIR)/encoding$(O) \
$(SRC_DIR)/exceptions$(O) \
$(SRC_DIR)/global_setup$(O) \
$(SRC_DIR)/interpreter$(O) \
$(SRC_DIR)/inter_cb$(O) \
$(SRC_DIR)/inter_create$(O) \
$(SRC_DIR)/inter_misc$(O) \
$(SRC_DIR)/inter_run$(O) \
$(SRC_DIR)/register$(O) \
$(SRC_DIR)/memory$(O) \
$(SRC_DIR)/objects$(O) \
$(SRC_DIR)/packfile$(O) \
$(SRC_DIR)/stacks$(O) \
$(SRC_DIR)/stack_common$(O) \
$(SRC_DIR)/string$(O) \
$(SRC_DIR)/string_primitives$(O) \
$(SRC_DIR)/sub$(O) \
$(SRC_DIR)/lexical$(O) \
$(SRC_DIR)/runops_cores$(O) \
$(SRC_DIR)/trace$(O) \
$(SRC_DIR)/pmc$(O) \
$(SRC_DIR)/pmc_freeze$(O) \
$(SRC_DIR)/key$(O) \
$(SRC_DIR)/hash$(O) \
$(SRC_DIR)/core_pmcs$(O) \
#CONDITIONED_LINE(platform_asm): $(SRC_DIR)/platform_asm$(O) \
$(SRC_DIR)/platform$(O) ${TEMP_jit_o} \
$(SRC_DIR)/rx$(O) \
$(SRC_DIR)/rxstacks$(O) \
$(SRC_DIR)/intlist$(O) \
$(SRC_DIR)/list$(O) \
$(SRC_DIR)/library$(O) \
$(SRC_DIR)/global$(O) \
$(SRC_DIR)/embed$(O) \
$(SRC_DIR)/warnings$(O) \
$(SRC_DIR)/packout$(O) \
$(SRC_DIR)/byteorder$(O) \
$(SRC_DIR)/debug$(O) \
$(SRC_DIR)/smallobject$(O) \
$(SRC_DIR)/headers$(O) \
$(SRC_DIR)/dod$(O) \
$(SRC_DIR)/gc_ims$(O) \
$(SRC_DIR)/gc_gms$(O) \
$(SRC_DIR)/method_util$(O) \
$(SRC_DIR)/exit$(O) \
$(SRC_DIR)/misc$(O) \
$(SRC_DIR)/spf_render$(O) \
$(SRC_DIR)/spf_vtable$(O) \
$(SRC_DIR)/datatypes$(O) \
$(SRC_DIR)/fingerprint$(O) \
$(SRC_DIR)/nci$(O) \
$(SRC_DIR)/cpu_dep$(O) \
$(SRC_DIR)/tsq$(O) \
$(SRC_DIR)/longopt$(O) \
$(SRC_DIR)/events$(O) \
$(SRC_DIR)/thread$(O) \
$(SRC_DIR)/dynext$(O) \
$(SRC_DIR)/utils$(O) \
$(SRC_DIR)/vtables$(O) \
$(SRC_DIR)/pic$(O) \
$(SRC_DIR)/mmd$(O) \
$(SRC_DIR)/builtin$(O) \
$(SRC_DIR)/mmd_fallback$(O) \
$(SRC_DIR)/extend$(O) \
$(PF_DIR)/pf_items$(O) \
$(OPS_DIR)/core_ops$(O) \
$(OPS_DIR)/core_ops_switch$(O) \
${asmfun_o} \
${TEMP_cg_o} \
${TEMP_exec_o} \
${TEMP_gc_o}
O_FILES = \
$(INTERP_O_FILES) \
$(CHARSET_O_FILES) \
$(IO_O_FILES) $(CLASS_O_FILES) \
$(ENCODING_O_FILES) \
$(IMCC_O_FILES) \
$(AST_O_FILES)
OPS_FILES = ${ops} $(GEN_OPSFILES)
###############################################################################
#
# BUILD TARGET CONFIGURATIONS:
#
###############################################################################
# Executables
PARROT = $(CUR_DIR)/${test_prog}$(EXE)
PARROT_SO = $(CUR_DIR)/${test_prog}_so$(EXE)
DIS = $(CUR_DIR)/disassemble$(EXE)
PDUMP = $(CUR_DIR)/pdump$(EXE)
PINFO = $(CUR_DIR)/pbc_info$(EXE)
PDB = $(CUR_DIR)/pdb$(EXE)
# libs
LIBPARROT = ${blib_lib_libparrot_a}
#CONDITIONED_LINE(has_icu):LIBICUCORE = ${blib_lib_libsicuuc_a}
#CONDITIONED_LINE(has_icu):LIBICUDATA = ${blib_lib_libsicudata_a}
#CONDITIONED_LINE(has_icu):ALL_PARROT_LIBS = $(LIBPARROT) $(LIBICUCORE) $(LIBICUDATA) $(C_LIBS)
#INVERSE_CONDITIONED_LINE(has_icu):ALL_PARROT_LIBS = $(LIBPARROT) $(C_LIBS)
# dynamic extensions
DYNEXT_DIR = runtime/parrot/dynext
LIBNCI_TEST_SO = $(DYNEXT_DIR)/libnci_test$(LOAD_EXT)
###############################################################################
#
# MAKE CONFIGURATION:
#
###############################################################################
# This is set to MAKE=$make if your $make command doesn't
# do it for you.
${make_set_make}
MAKE_C = ${make_c}
# These need to be above lines that define suffix rules to be portable
# (certainly FreeBSD make doesn't grok the .imc.pbc rule otherwise)
.SUFFIXES : .c .h .pmc .dump $(O) .str .imc .pir .pbc
# Passing an empty argument in @ARGV to cc_flags.pl to indicate where extra -Is
# (etc) should go. Otherwise it will insert them after the first space, which
# makes life go horribly wrong if $(CC) contains spaces but can't have -I
# arguments (etc) injected in the middle.
# There is probably a better way to do this, but I can't work it out right now.
.c$(O) :
@$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS $(CC) "" $(CFLAGS) -I$(@D) ${cc_o_out}$@ -c $<
.imc.pbc :
$(PARROT) -o $@ $<
.pir.pbc :
$(PARROT) -o $@ $<
.pbc$(O) :
$(PARROT) -o $@ $<
###############################################################################
#
# USER TARGETS:
#
# These targets are supposed to be called by the user.
#
###############################################################################
all : flags_dummy $(PARROT) runtime/parrot/include/parrotlib.pbc runtime/parrot/include/config.fpmc docs $(LIBNCI_TEST_SO) $(GEN_LIBRARY) dynclasses
# constant string support
.c.str :
$(PERL) build_tools/c2str.pl $< > $@
STR_FILES = \
$(SRC_DIR)/builtin.str \
$(SRC_DIR)/inter_cb.str \
$(SRC_DIR)/inter_misc.str \
$(SRC_DIR)/global.str \
$(SRC_DIR)/library.str \
$(SRC_DIR)/mmd.str \
$(SRC_DIR)/pmc.str \
$(SRC_DIR)/objects.str \
$(CLASS_STR_FILES)
$(INC_DIR)/string_private_cstring.h : $(STR_FILES) build_tools/c2str.pl
$(PERL) build_tools/c2str.pl --all
# classes PMC build utils and rules
PMC2CD=$(PERL) classes/pmc2c2.pl --dump
PMC2CC=$(PERL) classes/pmc2c2.pl --c --no-lines
PMC2CV=$(PERL) classes/pmc2c2.pl --vt
.pmc.dump :
$(PMC2CD) $<
.pmc.c :
$(PMC2CC) $<
# not all makes might understand this, so the rules are generated
#classes/pmc_%.h : classes/%.c
# $(PMC2CC) $<
vtable.dump : vtable.tbl
$(PMC2CV)
# This is a listing of all targets, that are meant to be called by users
help :
@echo ""
@echo "Following targets are available for the user:"
@echo ""
@echo "Executables:"
@echo " all: 'parrot' and the documentation."
@echo " This is the default."
@echo " world: 'all' and 'parrot_utils'."
@echo " parrot_utils: $(PDUMP), $(DIS), $(PINFO) and $(PDB)"
@echo " $(PDUMP): Parrot Dumper"
@echo " $(DIS): Parrot Disassembler"
@echo " $(PINFO): Information about Parrot Byte Code"
@echo " $(PDB): Parrot Debugger"
@echo ""
@echo "Installation:"
@echo " install: Install under '/usr/local/parrot' on Unix systems"
@echo ""
@echo "Documentation:"
@echo " help: Print this help message."
@echo " docs: Generate documentation from POD in the sources."
@echo " html: Generate HTML documentation from POD in the sources."
@echo " html-clean: Remove the HTML documentation."
@echo ""
@echo "Testing:"
@echo " test: Run the test suite."
@echo " fulltest: Run test suite with various options."
@echo " test<core>: Run the test suite with a specified core."
@echo " Valid cores are b, C, f, g, j, r, S."
@echo " src_tests: Run test in C-file."
@echo " perl_tests: Test the Perl modules in the distribution."
@echo " testbench: Run all benchmarks."
@echo " manitest: Check for new files."
@echo ""
@echo "Benchmarks:"
@echo " mopsbench: Million operations"
@echo ""
@echo "Creating reports:"
@echo " ok: Print a report."
@echo " okfile: Save a report into 'parrot.ok."
@echo " nok: Print a report."
@echo " nokfile: Save a report into 'parrot.nok."
@echo ""
@echo "Cleaning:"
@echo " clean: Basic cleaning up."
@echo " realclean: Removes also files generated by 'Configure.pl'"
@echo " distclean: Remove everything not in MANIFEST."
@echo " cvsclean: Like 'distclean', but keep CVS files."
@echo " reconfig: 'clean' and redo configuration."
@echo ""
@echo "Dynamic PMCs:"
@echo " dynclasses: Proxy for default target of dynclasses/Makefile"
@echo " dynclasses-test: Proxy for target 'test' of dynclasses/Makefile"
@echo " dynclasses-clean: Proxy for target 'clean' of dynclasses/Makefile"
@echo ""
@echo "Language implementations:"
@echo " languages: Proxy for default target of languages/Makefile"
@echo " languages-test: Proxy for target 'test' of languages/Makefile"
@echo " languages-clean: Proxy for target 'clean' of languages/Makefile"
@echo ""
@echo "fetch from source repository:"
@echo " update: cvs update."
@echo " status: cvs status."
@echo " patch: create a patc for sending to bugs-parrot."
@echo " rsync: update with rsync."
@echo ""
@echo "Development:"
@echo " lint: code checking with lint."
@echo " lint2: another code checking with lint."
@echo ""
@echo "Release:"
@echo " release: create a TAR ball."
@echo " rpm: create RPMs."
@echo " win32-inno-installer: create MSWin32 setup."
@echo ""
@echo "Examples:"
@echo " hello: 'Hello World' as an executable."
@echo ""
world : all parrot_utils
parrot_utils : $(PDUMP) $(DIS) $(PINFO) $(PDB)
flags_dummy :
@echo Compiling with:
@$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS echo $(CC) $(CFLAGS) -I$(@D) ${cc_o_out} xx$(O) -c xx.c
runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.imc $(PARROT)
$(PARROT) -o $@ runtime/parrot/library/parrotlib.imc
runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(PARROT)
@echo Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross your fingers
$(PARROT) config_lib.pasm
@echo If the next line prints $(VERSION), it did help.
$(PARROT) parrot-config.imc VERSION DEVEL
$(PARROT) : $(IMCC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) lib/Parrot/OpLib/core.pm $(LIBICUCORE) $(LIBICUDATA)
$(LINK) $(LD_OUT)$(PARROT) $(LINKFLAGS) $(IMCC_DIR)/main$(O) $(ALL_PARROT_LIBS)
lib_deps_object : $(O_FILES)
$(PERL) tools/dev/lib_deps.pl object $(O_FILES)
lib_deps_source : $(GENERAL_H_FILES)
$(PERL) tools/dev/lib_deps.pl source all_source
lib_deps : lib_deps_object lib_deps_source
check_source : $(GENERAL_H_FILES)
$(PERL) tools/dev/check_source_standards.pl all_source
###############################################################################
#
# Shared Library Targets:
#
###############################################################################
shared : $(GEN_HEADERS) blib/lib/libparrot$(SHARE_EXT) $(LIBPARROT)
static : $(GEN_HEADERS) $(LIBPARROT)
# XXX changes don't always propagate into libparrot
# e.g. when I change debug:fataly to xfataly, nm still shows the old symbol
# and parrot builds fine (except for the unproto warning
# so always delete the lib -leo
$(LIBPARROT) : $(O_FILES)
$(RM_F) $@
$(MKDIR) blib blib/lib
$(AR_CR) ${ar_out}$@ ${ar_extra} $(O_FILES)
$(RANLIB) $@
blib/lib/libparrot$(SHARE_EXT) : $(O_FILES)
$(MKDIR) blib blib/lib
$(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) $(LD_OUT)blib/lib/libparrot$(SHARE_EXT) $(O_FILES) $(C_LIBS) $(LIBICUCORE) $(LIBICUDATA)
$(PARROT_SO) : $(IMCC_DIR)/main$(O) blib/lib/libparrot$(SHARE_EXT) lib/Parrot/OpLib/core.pm
$(LINK) $(LINKFLAGS) $(LD_OUT)$(PARROT) $(IMCC_DIR)/main$(O) -Lblib/lib -lparrot $(C_LIBS)
#
# Parrot Debugger
#
$(SRC_DIR)/pdb$(O) : $(GENERAL_H_FILES)
$(PDB) : $(SRC_DIR)/pdb$(O) $(LIBPARROT)
$(LINK) $(LD_OUT)$(PDB) $(SRC_DIR)/pdb$(O) $(LINKFLAGS) $(ALL_PARROT_LIBS)
#
# Parrot Disassembler
#
$(SRC_DIR)/disassemble$(O) : $(GENERAL_H_FILES)
$(DIS) : $(SRC_DIR)/disassemble$(O) $(LIBPARROT)
$(LINK) $(LD_OUT)$(DIS) $(SRC_DIR)/disassemble$(O) $(LINKFLAGS) $(ALL_PARROT_LIBS)
#
# Parrot Dump
#
$(PDUMP) : $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT)
$(LINK) $(LD_OUT)$(PDUMP) $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) $(LINKFLAGS) $(ALL_PARROT_LIBS)
# pbc_info
$(PINFO) : $(SRC_DIR)/pbc_info$(O) $(LIBPARROT)
$(LINK) $(LD_OUT)$(PINFO) $(SRC_DIR)/pbc_info$(O) $(LINKFLAGS) $(ALL_PARROT_LIBS)
###############################################################################
#
# Other Dependencies and Build Rules:
#
###############################################################################
$(IMCC_DIR)/main$(O) : $(IMCC_DIR)/main.c $(GENERAL_H_FILES)
lib/Parrot/OpLib/core.pm : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2pm.pl \
lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num
$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl $(OPS_FILES)
$(SRC_DIR)/fingerprint.c : $(BUILD_TOOLS_DIR)/fingerprint_c.pl PBC_COMPAT
$(PERL) $(BUILD_TOOLS_DIR)/fingerprint_c.pl > $(SRC_DIR)/fingerprint.c
$(SRC_DIR)/parrot_config.h : $(BUILD_TOOLS_DIR)/parrot_config_c.pl config_lib.pasm
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl > $(SRC_DIR)/parrot_config.h
###############################################################################
#
# Examples (Assembly):
#
###############################################################################
examples-clean:
$(RM_F) \
examples/assembly/mops$(EXE) \
examples/assembly/mops.c \
examples/assembly/mops$(O) \
examples/assembly/mops.pbc \
examples/mops/mops$(O) \
examples/mops/mops$(EXE) \
examples/assembly/hello.pbc \
examples/assembly/hello$(O) \
examples/assembly/hello$(EXE)
# hello
hello: test_prep examples/assembly/hello$(EXE)
$(CUR_DIR)/examples/assembly/hello$(EXE)
examples/assembly/hello.pbc: examples/assembly/hello.pasm
$(PARROT) -o examples/assembly/hello.pbc examples/assembly/hello.pasm
examples/assembly/hello$(O): examples/assembly/hello.pbc
$(PARROT) -o examples/assembly/hello$(O) examples/assembly/hello.pbc
examples/assembly/hello$(EXE): examples/assembly/hello$(O)
$(MAKE) EXEC=examples/assembly/hello exec
###############################################################################
#
# Dependencies:
#
###############################################################################
$(SRC_DIR)/global_setup$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/global$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/global.str
$(SRC_DIR)/pmc$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/pmc_freeze$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/hash$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/intlist$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/list$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/library$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/parrot_config.h
$(SRC_DIR)/jit$(O) : $(GENERAL_H_FILES) ${TEMP_jit_h} $(INC_DIR)/jit_emit.h
$(SRC_DIR)/jit_debug$(O) : $(GENERAL_H_FILES) ${TEMP_jit_h}
$(SRC_DIR)/jit_debug_xcoff$(O) : $(GENERAL_H_FILES) ${TEMP_jit_h}
$(SRC_DIR)/jit_cpu$(O) : $(GENERAL_H_FILES) ${TEMP_jit_h} $(INC_DIR)/jit_emit.h
$(SRC_DIR)/exec$(O) : $(GENERAL_H_FILES) ${TEMP_exec_h} ${TEMP_jit_h} $(INC_DIR)/jit_emit.h
$(SRC_DIR)/exec_cpu$(O) : $(GENERAL_H_FILES) ${TEMP_exec_h} ${TEMP_jit_h} $(INC_DIR)/jit_emit.h
$(SRC_DIR)/exec_start$(O) : $(GENERAL_H_FILES) ${TEMP_exec_h}
$(SRC_DIR)/exec_save$(O) : $(GENERAL_H_FILES) ${TEMP_exec_h}
$(SRC_DIR)/key$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/smallobject$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/headers$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/dod$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/gc_ims$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/gc_gms$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/resources$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/platform$(O) : $(GENERAL_H_FILES)
#CONDITIONED_LINE(platform_asm):$(SRC_DIR)/platform_asm$(O) : $(GENERAL_H_FILES)
#CONDITIONED_LINE(platform_asm):
$(SRC_DIR)/core_pmcs$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/trace$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/debug$(O) : $(GENERAL_H_FILES) $(INC_DIR)/debug.h
$(SRC_DIR)/method_util$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/sub$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/lexical$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/string$(O) : $(GENERAL_H_FILES) $(INC_DIR)/string_private_cstring.h
$(SRC_DIR)/string_primitives$(O) : $(GENERAL_H_FILES) $(ICU_H_FILES)
$(SRC_DIR)/longopt$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/dynext$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/exceptions$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/events$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/thread$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/extend$(O) : $(GENERAL_H_FILES) $(INC_DIR)/extend.h
$(SRC_DIR)/interpreter$(O) : $(SRC_DIR)/interpreter.c $(GENERAL_H_FILES) \
${TEMP_jit_h}
$(SRC_DIR)/inter_cb$(O) : $(SRC_DIR)/inter_cb.c $(GENERAL_H_FILES) \
$(SRC_DIR)/inter_cb.str
$(SRC_DIR)/inter_misc$(O) : $(SRC_DIR)/inter_misc.c $(GENERAL_H_FILES) \
$(SRC_DIR)/inter_misc.str
$(SRC_DIR)/inter_create$(O) : $(SRC_DIR)/inter_create.c $(GENERAL_H_FILES)
$(SRC_DIR)/inter_run$(O) : $(SRC_DIR)/inter_run.c $(GENERAL_H_FILES)
$(IO_DIR)/io$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(IO_DIR)/io_buf$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(IO_DIR)/io_layers$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(IO_DIR)/io_unix$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(IO_DIR)/io_utf8$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(IO_DIR)/io_win32$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(IO_DIR)/io_stdio$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(IO_DIR)/io_passdown$(O) : $(GENERAL_H_FILES) $(IO_DIR)/io_private.h
$(SRC_DIR)/memory$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/pic$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/mmd$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/mmd.str
$(SRC_DIR)/builtin$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/builtin.str
$(SRC_DIR)/mmd_fallback$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/objects$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/objects.str
$(SRC_DIR)/packfile$(O) : $(GENERAL_H_FILES)
$(PF_DIR)/pf_items$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/packout$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/parrot$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/register$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/generic_register.c
$(SRC_DIR)/runops_cores$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/rx$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/rxstacks$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/stacks$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/stack_common$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/tsq$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/embed$(O) : $(GENERAL_H_FILES) $(INC_DIR)/debug.h
$(SRC_DIR)/dataypes$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/dataypes.c
$(SRC_DIR)/exit$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/exit.c
$(SRC_DIR)/nci$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/nci.c
$(SRC_DIR)/vtables$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/vtables.c
$(SRC_DIR)/cpu_dep$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/nci.c : $(SRC_DIR)/call_list.txt $(BUILD_TOOLS_DIR)/build_nativecall.pl
$(PERL) $(BUILD_TOOLS_DIR)/build_nativecall.pl $(SRC_DIR)/call_list.txt
$(SRC_DIR)/warnings$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/misc$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/utils$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/spf_render$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/spf_vtable$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/encoding$(O) : $(SRC_DIR)/encoding.c $(GENERAL_H_FILES)
$(SRC_DIR)/charset$(O) : $(SRC_DIR)/charset.c $(GENERAL_H_FILES)
$(OPS_DIR)/core_ops$(O) : $(GENERAL_H_FILES) $(OPS_DIR)/core_ops.c
#core_ops depends upon config.h so that it gets updated along with updates to config.h's version numbers
$(OPS_DIR)/core_ops.c $(INC_DIR)/oplib/core_ops.h : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h lib/Parrot/OpLib/core.pm
$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core
$(OPS_DIR)/core_ops_switch$(O) : $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_switch.c
$(OPS_DIR)/core_ops_switch.c $(INC_DIR)/oplib/core_ops_switch.h : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h lib/Parrot/OpLib/core.pm
$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --core
${TEMP_cg_c}
${TEMP_gc_c}
${TEMP_pmc_build}
${TEMP_charset_build}
${TEMP_encoding_build}
# $(STICKY_FILES) : Configure.pl
# $(PERL) Configure.pl
$(INC_DIR)/vtable.h : vtable.tbl $(BUILD_TOOLS_DIR)/vtable_h.pl lib/Parrot/Vtable.pm
$(PERL) $(BUILD_TOOLS_DIR)/vtable_h.pl
$(INC_DIR)/jit_emit.h : jit/${jitcpuarch}/jit_emit.h
$(PERL) -MFile::Copy=cp -e ${PQ}cp q|jit/${jitcpuarch}/jit_emit.h|, q|$(INC_DIR)/jit_emit.h|${PQ}
$(INC_DIR)/exec_dep.h : jit/${jitcpuarch}/exec_dep.h
$(PERL) -MFile::Copy=cp -e ${PQ}cp q|jit/${jitcpuarch}/exec_dep.h|, q|$(INC_DIR)/exec_dep.h|${PQ}
$(SRC_DIR)/jit_cpu.c : lib/Parrot/OpLib/core.pm $(INC_DIR)/jit_emit.h \
jit/${jitcpuarch}/core.jit $(BUILD_TOOLS_DIR)/jit2h.pl
$(PERL) $(BUILD_TOOLS_DIR)/jit2h.pl ${jitcpuarch} $(SRC_DIR)/jit_cpu.c
$(SRC_DIR)/exec_cpu.c : lib/Parrot/OpLib/core.pm $(INC_DIR)/jit_emit.h \
jit/${jitcpuarch}/core.jit ${TEMP_exec_h} $(INC_DIR)/exec_dep.h $(BUILD_TOOLS_DIR)/jit2h.pl
$(PERL) $(BUILD_TOOLS_DIR)/jit2h.pl ${jitcpuarch} $(SRC_DIR)/exec_cpu.c
# imcc file dependencies
#
# The .flag files are needed because we are keeping some derived files in CVS,
# which does not keep accurate timestamps on the files, relative to each other.
# Note that YACC or LEX may be null commands, so we must `touch` all the
# target files, instead of just the .flag files.
$(IMCC_DIR)/imcc.y.flag $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcparser.h : $(IMCC_DIR)/imcc.y
$(YACC) $(IMCC_DIR)/imcc.y -d -o $(IMCC_DIR)/imcparser.c
$(TOUCH) $(IMCC_DIR)/imcc.y.flag $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcparser.h
$(IMCC_DIR)/imcc.l.flag $(IMCC_DIR)/imclexer.c : $(IMCC_DIR)/imcc.l
$(LEX) -o$(IMCC_DIR)/imclexer.c $(IMCC_DIR)/imcc.l
$(TOUCH) $(IMCC_DIR)/imcc.l.flag $(IMCC_DIR)/imclexer.c
$(IMCC_O_FILES) : $(IMCC_H_FILES) $(ALL_H_FILES)
# ast files
$(AST_DIR)/ast.y.flag $(AST_DIR)/astparser.c $(AST_DIR)/astparser.h : $(AST_DIR)/ast.y
$(YACC) $(AST_DIR)/ast.y -d -o $(AST_DIR)/astparser.c -p AST
$(TOUCH) $(AST_DIR)/ast.y.flag $(AST_DIR)/astparser.c $(AST_DIR)/astparser.h
$(AST_DIR)/ast.l.flag $(AST_DIR)/astlexer.c : $(AST_DIR)/ast.l
$(LEX) -o$(AST_DIR)/astlexer.c -PAST $(AST_DIR)/ast.l
$(TOUCH) $(AST_DIR)/ast.l.flag $(AST_DIR)/astlexer.c
$(AST_O_FILES) : $(IMCC_H_FILES) $(AST_H_FILES) $(ALL_H_FILES)
###############################################################################
#
# Documentation targets:
#
###############################################################################
#CONDITIONED_LINE(has_perldoc):docs : docs.dummy
#INVERSE_CONDITIONED_LINE(has_perldoc):docs : docs.stub
#CONDITIONED_LINE(has_perldoc):html : html.dummy
#INVERSE_CONDITIONED_LINE(has_perldoc):html : html.stub
html.stub:
@echo "Perldoc is required, but not detected."
docs.stub:
@echo "Perldoc is required, but not detected."
docs.dummy :
$(MAKE_C) docs
docs-clean :
$(MAKE_C) docs clean
html.dummy :
$(MAKE_C) docs html
html-clean :
$(MAKE_C) docs html-clean
###############################################################################
#
# dynamic PMC targets:
#
###############################################################################
dynclasses : dynclasses.dummy
dynclasses.dummy :
$(MAKE_C) dynclasses
dynclasses-test :
$(MAKE_C) dynclasses test
dynclasses-clean :
$(MAKE_C) dynclasses clean
###############################################################################
#
# language implementation targets:
#
###############################################################################
languages : languages.dummy
languages.dummy :
$(MAKE_C) languages
languages-test :
$(MAKE_C) languages test
languages-clean :
$(MAKE_C) languages clean
${TEMP_icu_make}
###############################################################################
#
# compiler implementation targets:
#
###############################################################################
compilers-clean :
$(MAKE_C) compilers/pge clean
###############################################################################
#
# Testing Targets:
#
###############################################################################
# The --running-make-test argument is currently used by long-running tests
# to disable GC_DEBUG.
EXTRA_TEST_ARGS = --gc-debug --running-make-test
SRC_TEST_FILES = t/src/*.t
PERL_TEST_FILES = t/perl/*.t
TEST_FILES = t/library/*.t \
t/op/*.t \
t/pmc/*.t \
t/native_pbc/*.t \
imcc/t/*/*.t \
t/dynclass/*.t
# Common prep for all test targets.
# We propably need a complete build before running the tests.
test_prep : all
# Run test cases with a single call of t/harness
# Users have to look at only one report.
# Normal core
test : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) $(TEST_FILES) $(SRC_TEST_FILES) $(PERL_TEST_FILES)
# Test various run cores and other stuff
# 'testC', 'testg' and 'testj' are tested only,
# when the needed runcores are available
fulltest : \
testb \
#CONDITIONED_LINE(cg_flag): testC \
testf \
#CONDITIONED_LINE(cg_flag): testg \
#CONDITIONED_LINE(jitcapable): testj \
testr \
testS \
src_tests \
perl_tests \
testbench
# bounds checking, slow core
testb : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) -b $(TEST_FILES)
# CGP core
testC : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) -C $(TEST_FILES)
# fast core
testf : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) -f $(TEST_FILES)
# Computed goto
testg : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) -g $(TEST_FILES)
# JIT core
testj : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) -j $(TEST_FILES)
# normal core, write and run Parrot Byte Code
testr : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) -r $(TEST_FILES)
# switched core
testS : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) -S $(TEST_FILES)
# test the EXEC stuff
testexec: test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) --run-exec $(TEST_FILES)
# Test that need to be compiled by the C-compiler
src_tests :
$(PERL) t/harness $(SRC_TEST_FILES)
# Test the Perl5 Modules in the Parrot distribution
perl_tests :
$(PERL) t/harness $(PERL_TEST_FILES)
# all benchmarks
testbench: test_prep
$(PERL) t/harness t/benchmarks.t
# Running a benchmark
mopsbench : test_prep
$(PARROT) $(PARROT_ARGS) examples/assembly/mops.pasm
# Running the game of live
lifetest : test_prep
$(PARROT) $(PARROT_ARGS) examples/assembly/life.pasm
###############################################################################
#
# For reporting success or failure with different configurations
#
###############################################################################
ok :
$(PERL) tools/dev/genrpt.pl --ok
okfile :
$(PERL) tools/dev/genrpt.pl --ok --File parrot.ok
nok :
$(PERL) tools/dev/genrpt.pl --nok
nokfile :
$(PERL) tools/dev/genrpt.pl --nok --File parrot.nok
###############################################################################
#
# Cleaning Targets:
#
###############################################################################
clean : \
test-clean \
prog-clean \
dynext-clean \
languages-clean \
#CONDITIONED_LINE(has_perldoc): docs-clean \
dynclasses-clean \
examples-clean \
imcc-clean \
compilers-clean
${TEMP_cg_r}
$(RM_F) *.s *~ $(FLUID_FILES)
prog-clean :
$(RM_F) \
$(O_FILES) \
$(PARROT) $(IMCC_DIR)/main$(O) \
$(PDUMP) $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) \
$(SRC_DIR)/pbc_info$(O) $(PINFO) \
$(PDB) $(SRC_DIR)/pdb$(O) \
$(DIS) $(SRC_DIR)/disassemble$(O) \
$(LIBNCI_TEST_SO) \
$(LIBPARROT)
$(PERL) build_tools/c2str.pl --init
$(RM_F) $(STR_FILES) $(INC_DIR)/string_private_cstring.h
$(RM_F) classes/*.c classes/*.h classes/*.dump vtable.dump
dynext-clean :
# shared libs
$(RM_F) $(DYNEXT_DIR)/*$(LOAD_EXT)
$(RM_F) $(DYNEXT_DIR)/*$(SHARE_EXT)
# win32 import library (shared object is deleted by LIBNCI_TEST_SO above)
$(RM_F) $(DYNEXT_DIR)/*.lib
# win32 program data base - contains debugging info
$(RM_F) *.pdb $(DYNEXT_DIR)/*.pdb
# win32 incremental link status files
$(RM_F) *.ilk $(DYNEXT_DIR)/*.ilk
# win32 exported functions and data items
$(RM_F) $(DYNEXT_DIR)/*.exp
# Remove files generated by the test suite
test-clean :
$(RM_F) t/benchmarks*.imc
$(RM_F) t/benchmarks*.pasm
$(RM_F) t/library/*.imc
$(RM_F) t/library/*.pbc
$(RM_F) t/op/*.pasm
$(RM_F) t/op/*.imc
$(RM_F) t/op/*.pbc
$(RM_F) t/op/*.out
$(RM_F) t/op/*.o
$(RM_F) t/op/*.stabs.s
$(RM_F) t/pmc/*.pasm
$(RM_F) t/pmc/*.imc
$(RM_F) t/pmc/*.pbc
$(RM_F) t/pmc/*.out
$(RM_F) t/pmc/*.o
$(RM_F) t/pmc/*.stabs.s
$(RM_F) t/stress/*.pasm
$(RM_F) t/stress/*.pbc
$(RM_F) t/stress/*.out
$(RM_F) t/stress/*.o
$(RM_F) t/stress/*.stabs.s
$(RM_F) t/src/*.c
$(RM_F) $(IMCC_DIR)/t/*/*.out
$(RM_F) $(IMCC_DIR)/t/*/*.imc
$(RM_F) $(IMCC_DIR)/t/*/*.pbc
$(RM_F) $(IMCC_DIR)/t/*/*.o
$(RM_F) $(IMCC_DIR)/t/*/*.stabs.s
$(RM_F) $(IMCC_DIR)/t/*/*.pasm
imcc-clean:
$(RM_F) \
$(IMCC_DIR)/core \
$(IMCC_DIR)/*.o \
$(IMCC_DIR)/imcparser.output
realclean : clean
$(RM_F) $(STICKY_FILES)
$(RM_RF) blib
distclean :
$(PERL) "-MExtUtils::Manifest=filecheck" -le ${PQ}sub ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1;unlink $$_ for filecheck()${PQ}
cvsclean :
$(PERL) "-MExtUtils::Manifest=filecheck" -le ${PQ}sub ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1; do { unlink $$_ unless $$_ =~ m!(?:CVS/|\.cvs)! } for filecheck()${PQ}
reconfig : clean
$(PERL) Configure.pl --reconfig
manitest :
$(PERL) "-MExtUtils::Manifest=fullcheck" -e fullcheck
###############################################################################
#
# CVS Targets:
#
###############################################################################
update :
cvs -q update -dP
rsync :
rsync -av cvs.perl.org::parrot-HEAD $(CUR_DIR)
status :
cvs -n -q upd -dP
patch :
cvs -q diff -u
lint : $(PARROT)
$(LINT) $(CC_INC) ${cc_hasjit} "-Iclasses" $(LINTFLAGS) $(LINTOPTS) `echo $(O_FILES) | sed ${PQ}s/\.o/\.c/g${PQ}`
$(LINT) $(CC_INC) $(LINTFLAGS) $(LINTOPTS) $(IMCC_DIR)/main.c
lint2 : $(PARROT)
$(LINT) $(CC_INC) ${cc_hasjit} "-Iclasses" $(LINTFLAGS2) $(LINTOPTS) `echo $(O_FILES) | sed ${PQ}s/\.o/\.c/g${PQ}`
$(LINT) $(CC_INC) $(LINTFLAGS2) $(LINTOPTS) $(IMCC_DIR)/main.c
###############################################################################
#
# installation
#
###############################################################################
install :
$(PERL) tools/dev/install_files.pl --buildprefix=$(BUILDPREFIX) --prefix=$(PREFIX) --exec-prefix=$(EXEC_PREFIX) --bindir=$(BIN_DIR) --libdir=$(LIB_DIR) --includedir=$(INCLUDE_DIR) MANIFEST MANIFEST.generated
###############################################################################
#
# release targets (probably unix only)
#
###############################################################################
release : MANIFEST MANIFEST.generated
[ -d parrot-$(VERSION) ] || ln -s $(CUR_DIR) parrot-$(VERSION)
cp MANIFEST MANIFEST.real
grep -v DEVELOPING MANIFEST.real > MANIFEST
tar zcvf parrot-$(VERSION).tar.gz $$(perl -lane 'print"parrot-$(VERSION)/$$F[0]"unless!length||/#/' MANIFEST)
mv MANIFEST.real MANIFEST
rm parrot-$(VERSION)
rpms : release
sudo cp parrot-$(VERSION).tar.gz /usr/src/*/SOURCES
sudo cp parrot.spec /usr/src/*/SPECS
cd /usr/src/*/SPECS ${make_and} sudo rpm -ba parrot.spec
win32-inno-installer : install
$(PERL) tools/dev/mk_inno.pl --version=$(VERSION) --prefix=$(PREFIX)
$(INNO_SETUP) /Q parrot.iss
###############################################################################
#
# miniparrot targets:
#
###############################################################################
miniparrot-prebuild : $(GEN_CONFIGS) $(FLUID_FILES)
@tools/dev/rebuild_miniparrot.pl --action=clean
@tools/dev/rebuild_miniparrot.pl --action=prebuild_classes $(CLASS_O_FILES)
@tools/dev/rebuild_miniparrot.pl --action=copy_src $(GEN_CONFIGS) $(FLUID_FILES) $(ALL_H_FILES)
@tools/dev/rebuild_miniparrot.pl --action=copy_src classes/*.h $(IMCC_DIR)/main.c $(INC_DIR)/debug.h
@tools/dev/rebuild_miniparrot.pl --action=copy_src_from_obj $(O_FILES)
@tools/dev/rebuild_miniparrot.pl --action=write_buildscripts --executable=parrot $(O_FILES) $(IMCC_DIR)/main$(O)
miniparrot-update :
tools/dev/rebuild_miniparrot.pl
###############################################################################
#
# exec:
#
###############################################################################
exec : $(SRC_DIR)/exec_start$(O) $(LIBPARROT)
$(LINK) $(LD_OUT)$(EXEC) $(LINKFLAGS) $(EXEC)$(O) $(SRC_DIR)/exec_start$(O) $(ALL_PARROT_LIBS)
exec_so : $(SRC_DIR)/exec_start$(O) blib/lib/libparrot$(SHARE_EXT)
$(LINK) $(LD_OUT)$(EXEC) $(LINKFLAGS) $(EXEC)$(O) $(SRC_DIR)/exec_start$(O) -lparrot $(C_LIBS)
###### OS depend targets ##########
# for use by t/pmc/nci.t
$(LIBNCI_TEST_SO): $(SRC_DIR)/nci_test$(O)
$(LD) $(LD_LOAD_FLAGS) ${ncilib_link_extra} $(LDFLAGS) \
$(LD_OUT)$@ $(SRC_DIR)/nci_test$(O) $(C_LIBS)
# vim ctags
# this needs exuberant-ctags
tags: tags.dummy
$(RM_F) tags
ctags -R --links=no $(CUR_DIR)
$(PERL) editor/addtags ops/*.ops
tags.dummy:
# test the EXEC stuff
testexec: hello