Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

189 lines (154 sloc) 5.174 kb
## $Id$
## arguments we want to run parrot with
PARROT_ARGS :=
## configuration settings
VERSION := @versiondir@
BIN_DIR := @bindir@
LIB_DIR := @libdir@$(VERSION)
DOC_DIR := @docdir@$(VERSION)
MANDIR := @mandir@$(VERSION)
# Set up extensions
LOAD_EXT := @load_ext@
O := @o@
# Various paths
PERL6GRAMMAR := $(LIB_DIR)/library/PGE/Perl6Grammar.pbc
NQP := $(LIB_DIR)/languages/nqp/nqp.pbc
PCT := $(LIB_DIR)/library/PCT.pbc
PMC_DIR := src/pmc
OPS_DIR := src/ops
## Setup some commands
MAKE := @make_c@
PERL := @perl@
CAT := @cat@
CHMOD := @chmod@
CP := @cp@
MKPATH := @mkpath@
RM_F := @rm_f@
RM_RF := @rm_rf@
POD2MAN := pod2man
PARROT := $(BIN_DIR)/parrot@exe@
PBC_TO_EXE := $(BIN_DIR)/pbc_to_exe@exe@
#IF(darwin):
#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
NQPTAP_GROUP := $(PMC_DIR)/nqptap_group$(LOAD_EXT)
NQPTAP_OPS := $(OPS_DIR)/nqptap_ops$(LOAD_EXT)
#PMC_DEPS := src/pmc/Makefile.in $(PMC_DIR)/nqptap.pmc
#OPS_DEPS := src/ops/Makefile.in $(OPS_DIR)/nqptap.ops
SOURCES := \
src/nqptap.pir \
src/gen_grammar.pir \
src/gen_actions.pir \
src/builtins.pir \
src/builtins/say.pir
DOCS := README
BUILD_CLEANUPS := \
nqptap.pbc \
nqptap/nqptap.pbc \
"src/gen_*.pir" \
"*.c" \
"*$(O)" \
#IF(win32): parrot-nqptap.exe \
#IF(win32): parrot-nqptap.iss \
#IF(win32): "setup-parrot-*.exe" \
installable_nqptap@exe@
TEST_CLEANUPS :=
# the default target
build: \
$(NQPTAP_OPS) \
$(NQPTAP_GROUP) \
nqptap/nqptap.pbc \
nqptap.pbc
all: build installable
nqptap.pbc: nqptap.pir
$(PARROT) $(PARROT_ARGS) -o nqptap.pbc nqptap.pir
nqptap/nqptap.pbc: $(SOURCES)
$(PARROT) $(PARROT_ARGS) -o nqptap/nqptap.pbc src/nqptap.pir
src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
--output=src/gen_grammar.pir \
src/parser/grammar.pg \
src/parser/grammar-oper.pg
src/gen_actions.pir: $(NQP) src/parser/actions.pm
$(PARROT) $(PARROT_ARGS) $(NQP) --output=src/gen_actions.pir \
--target=pir src/parser/actions.pm
$(NQPTAP_GROUP): $(PMC_DEPS)
# $(MAKE) $(PMC_DIR)
$(NQPTAP_OPS): $(OPS_DEPS)
# $(MAKE) $(OPS_DIR)
installable: installable_nqptap@exe@
installable_nqptap@exe@: nqptap.pbc
$(PBC_TO_EXE) nqptap.pbc --install
Makefile: Makefile.in
$(PARROT) Configure.pir
# 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 " build: nqptap.pbc"
@echo " This is the default."
@echo " nqptap@exe@ Self-hosting binary not to be installed."
@echo " all: nqptap.pbc nqptap@exe@ installable"
@echo " installable: Create libs and self-hosting binaries to be installed."
@echo " install: Install the installable targets and docs."
@echo ""
@echo "Testing:"
@echo " test: Run the test suite."
@echo " test-installable: Test self-hosting targets."
@echo " testclean: Clean up test results."
@echo ""
@echo "Cleaning:"
@echo " clean: Basic cleaning up."
@echo " realclean: Removes also files generated by 'Configure.pl'"
@echo " distclean: Removes also anything built, in theory"
@echo ""
@echo "Misc:"
@echo " help: Print this help message."
@echo ""
test: build
prove --exec="$(PARROT) nqptap.pbc" t/*.t
# basic run for missing libs
test-installable: installable
echo "1" | ./installable_nqptap@exe@
install: installable
# $(MAKE) $(OPS_DIR) install
# $(MAKE) $(PMC_DIR) install
$(CP) installable_nqptap@exe@ $(BIN_DIR)/parrot-nqptap@exe@
$(CHMOD) 0755 $(BIN_DIR)/parrot-nqptap@exe@
-$(MKPATH) $(LIB_DIR)/languages/nqptap
$(CP) nqptap/nqptap.pbc $(LIB_DIR)/languages/nqptap/nqptap.pbc
# -$(MKPATH) $(MANDIR)/man1
# $(POD2MAN) doc/running.pod > $(MANDIR)/man1/parrot-nqptap.1
# -$(MKPATH) $(DOC_DIR)/languages/nqptap
# $(CP) $(DOCS) $(DOC_DIR)/languages/nqptap
uninstall:
# $(MAKE) $(OPS_DIR) uninstall
# $(MAKE) $(PMC_DIR) uninstall
$(RM_F) $(BIN_DIR)/parrot-nqptap@exe@
$(RM_RF) $(LIB_DIR)/languages/nqptap
# $(RM_F) $(MANDIR)/man1/parrot-nqptap.1
# $(RM_RF) $(DOC_DIR)/languages/nqptap
win32-inno-installer: installable
# -$(MKPATH) man/man1
# $(POD2MAN) doc/running.pod > man/man1/parrot-nqptap.1
# -$(MKPATH) man/html
# pod2html --infile doc/running.pod --outfile man/html/parrot-nqptap.html
$(CP) installable_nqptap@exe@ parrot-nqptap.exe
$(PERL) -I$(LIB_DIR)/tools/lib $(LIB_DIR)/tools/dev/mk_inno_language.pl nqptap
iscc parrot-nqptap.iss
testclean:
$(RM_F) $(TEST_CLEANUPS)
clean:
# $(MAKE) $(OPS_DIR) clean
# $(MAKE) $(PMC_DIR) clean
$(RM_F) $(TEST_CLEANUPS) $(BUILD_CLEANUPS)
realclean:
# $(MAKE) $(OPS_DIR) realclean
# $(MAKE) $(PMC_DIR) realclean
$(RM_F) $(TEST_CLEANUPS) $(BUILD_CLEANUPS) Makefile
distclean: realclean
# Local variables:
# mode: makefile
# End:
# vim: ft=make:
Jump to Line
Something went wrong with that request. Please try again.