Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
170 lines (139 sloc) 5.14 KB
# Copyright (C) 2006-2012, The Perl Foundation.
# $Id$
PARROT_DIR = parrot
NQP_DIR = nqp
RAKUDO_DIR = rakudo
STAR_VERSION = 2012.08
PARROT_ARGS =
# values from parrot_config
PREFIX_DIR = @prefix@
PARROT_BIN_DIR = @bindir@
PARROT_VERSION = @versiondir@
PARROT_INCLUDE_DIR = @includedir@$(PARROT_VERSION)
PARROT_LIB_DIR = @libdir@$(PARROT_VERSION)
PARROT_SRC_DIR = @srcdir@$(PARROT_VERSION)
HAS_ICU = @has_icu@
CC = @cc@
CFLAGS = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @gc_flag@
EXE = @exe@
LD = @ld@
LDFLAGS = @ldflags@ @ld_debug@
LD_LOAD_FLAGS = @ld_load_flags@
LIBPARROT = @inst_libparrot_ldflags@
O = @o@
LOAD_EXT = @load_ext@
PERL = @perl@
CP = @cp@
MV = @mv@
RM_F = @rm_f@
MKPATH = $(PERL) -MExtUtils::Command -e mkpath
CHMOD = $(PERL) -MExtUtils::Command -e chmod
POD2MAN = @pod2man@
# locations of parrot resources
PARROT_EXE = $(PARROT_BIN_DIR)/parrot$(EXE)
NQP_EXE = $(PARROT_BIN_DIR)/nqp$(EXE)
PBC_TO_EXE = $(PARROT_BIN_DIR)/pbc_to_exe$(EXE)
PARROT_CONFIG = $(PARROT_BIN_DIR)/parrot_config$(EXE)
PARROT_TOOLS_DIR = $(PARROT_LIB_DIR)/tools
PARROT_PERL_LIB = $(PARROT_TOOLS_DIR)/lib
OPS2C = $(PARROT_BIN_DIR)/ops2c$(EXE)
PMC2C = $(PERL) $(PARROT_TOOLS_DIR)/build/pmc2c.pl
PMC2C_INCLUDES = --include src/pmc --include $(PARROT_SRC_DIR) --include $(PARROT_SRC_DIR)/pmc
CINCLUDES = -I$(PARROT_INCLUDE_DIR) -I$(PARROT_INCLUDE_DIR)/pmc
LINKARGS = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @libs@ @icu_shared@
PERL6_EXE = perl6$(EXE)
PERL6_LANG_DIR = $(PARROT_LIB_DIR)/languages/perl6
PERL6_INSTALL = $(PARROT_BIN_DIR)/$(PERL6_EXE)
MODULES = modules/MODULES.txt
# rakudo-debugger
RD_DIR = modules/rakudo-debugger
RD_PIR = $(RD_DIR)/perl6-debug.pir
RD_PBC = $(RD_DIR)/perl6-debug.pbc
RD_EXE = $(RD_DIR)/perl6-debug$(EXE)
all: rakudo
rakudo: $(RAKUDO_DIR)/$(PERL6_EXE)
$(RAKUDO_DIR)/$(PERL6_EXE):
@echo "== Configuring and building Rakudo"
cd $(RAKUDO_DIR) && $(PERL) Configure.pl --with-nqp=$(NQP_EXE) && $(MAKE)
rakudo-test: rakudo
cd $(RAKUDO_DIR) && $(MAKE) test
rakudo-spectest: rakudo
cd $(RAKUDO_DIR) && $(MAKE) spectest
rakudo-install: rakudo
cd $(RAKUDO_DIR) && $(MAKE) install
@win32_libparrot_copy@
$(CP) $(DESTDIR)$(PERL6_INSTALL) $(PERL6_EXE)
$(CHMOD) 755 $(PERL6_EXE)
modules-install: rakudo-install
@echo "== Installing modules"
$(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_INSTALL) $(DESTDIR)$(PERL6_LANG_DIR)/lib $(MODULES)
@echo "== Installing binaries"
$(PERL) tools/build/bin-install.pl $(DESTDIR)$(PERL6_INSTALL) $(DESTDIR)$(PARROT_BIN_DIR) modules/ufo/bin/ufo modules/panda/bin/panda
modules-test:
$(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_INSTALL) modules/MODULES.txt
perl6-debug: $(RD_EXE)
$(RD_EXE): modules-install
$(NQP_EXE) --vmlibs=perl6_group,perl6_ops --target=pir \
--output=$(RD_PIR) $(RD_DIR)/bin/perl6-debug.nqp
$(PARROT_EXE) -o $(RD_PBC) $(RD_PIR)
$(PBC_TO_EXE) $(RD_PBC)
$(CHMOD) 755 $(RD_EXE)
perl6-debug-install: perl6-debug
$(CP) $(RD_EXE) $(DESTDIR)$(PARROT_BIN_DIR)
$(CHMOD) 755 $(DESTDIR)$(PARROT_BIN_DIR)/perl6-debug$(EXE)
install: rakudo-install modules-install perl6-debug-install
test:
@echo ""
@echo "To run the Rakudo compiler tests, use '$(MAKE) rakudo-test'"
@echo "To run the Perl 6 spectests, use '$(MAKE) rakudo-spectest'"
@echo ""
@echo "To run tests for individual modules, try:"
@echo " prove -e ./perl6 -r modules/<name>/t"
@echo ""
## cleaning
clean:
$(RM_F) $(CLEANUPS)
cd $(RAKUDO_DIR) && $(MAKE) clean
cd $(NQP_DIR) && $(MAKE) clean
cd $(PARROT_DIR) && $(MAKE) clean
distclean: realclean
realclean: clean
$(RM_F) Makefile
cd $(RAKUDO_DIR) && $(MAKE) realclean
cd $(NQP_DIR) && $(MAKE) realclean
cd $(PARROT_DIR) && $(MAKE) realclean
configclean:
$(RM_F) $(CLEANUPS)
cd $(NQP_DIR) && $(MAKE) clean
cd $(PARROT_DIR) && $(MAKE) clean
testclean:
## miscellaneous targets
# a listing of all targets meant to be called by users
help:
@echo ""
@echo "Following targets are available for the user:"
@echo ""
@echo "Maintenance:"
@echo " perlcritic: Run Perl::Critic on all the Perl 5 code."
@echo ""
@echo "Cleaning:"
@echo " clean: Basic cleaning up."
@echo " distclean: Removes also anything built, in theory."
@echo " realclean: Removes also files generated by 'Configure.pl'."
@echo " testclean: Clean up test results."
@echo ""
@echo "Misc:"
@echo " help: Print this help message."
@echo ""
config:
$(PERL) Configure.pl
$(PARROT_EXE):
CRITIC_FILES=Configure.pl tools/build/
perlcritic:
perlcritic -1 --profile tools/util/perlcritic.conf $(CRITIC_FILES)
msi:
-$(CP) c:/strawberry/c/bin/libgcc_s_sjlj-1.dll $(PARROT_BIN_DIR)
cmd /c heat dir $(PREFIX_DIR) -gg -sfrag -cg RakudoStar -dr INSTALLROOT -srd -out star-files.wxs
cmd /c candle star-files.wxs
cmd /c candle -dSTARVERSION=$(STAR_VERSION) tools/build/star-product.wxs
cmd /c light -b $(PREFIX_DIR) -ext WixUIExtension star-files.wixobj star-product.wixobj -o rakudo-star-$(STAR_VERSION).msi
Something went wrong with that request. Please try again.