diff --git a/Configure.nqp b/Configure.nqp deleted file mode 100644 index bcc2bd7..0000000 --- a/Configure.nqp +++ /dev/null @@ -1,51 +0,0 @@ -# Purpose: Use Parrot's config info to configure our Makefile. -# -# Usage: -# nqp Configure.nqp [input_makefile [output_makefile]] -# -# input_makefile defaults to 'build/Makefile.in'; -# output_makefile defaults to 'Makefile'. - -our @ARGS; -our %VM; -our $OS; - -MAIN(); - -sub MAIN () { - # Wave to the friendly users - say("Hello, I'm Configure. My job is to poke and prod\nyour system to figure out how to build Kea.\n"); - - # Load Parrot config and glue functions - pir::load_bytecode('PGE.pbc'); - pir::load_bytecode('src/lib/Glue.pir'); - - # Slurp in the unconfigured Makefile text - my $unconfigured := slurp(@ARGS[0] || 'build/Makefile.in'); - - # Replace all of the @foo@ markers - my $replaced := subst($unconfigured, rx('\@\@'), replacement); - - # Fix paths on Windows - if ($OS eq 'MSWin32') { - $replaced := subst($replaced, rx('\/'), '\\' ); - $replaced := subst($replaced, rx('\\\\\*'), '\\\\*'); - } - - # Spew out the final makefile - spew(@ARGS[1] || 'Makefile', $replaced); - - # Give the user a hint of next action - my $make := %VM; - say("Configure completed for platform '$OS'."); - say("You can now type '$make' to build Kea.\n"); - say("You may also type '$make test' to run the Kea test suite.\n"); - say("Happy Hacking,\n\tThe Kea Team"); -} - -sub replacement ($match) { - my $key := $match; - my $config := %VM{$key} || ''; - - return $config; -} diff --git a/build/Makefile.in b/build/Makefile.in deleted file mode 100644 index 5981998..0000000 --- a/build/Makefile.in +++ /dev/null @@ -1,193 +0,0 @@ -## $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@ - -KEA_GROUP := $(PMC_DIR)/kea_group$(LOAD_EXT) -KEA_OPS := $(OPS_DIR)/kea_ops$(LOAD_EXT) - -#PMC_DEPS := build/src/pmc/Makefile.in $(PMC_DIR)/kea.pmc -#OPS_DEPS := build/src/ops/Makefile.in $(OPS_DIR)/kea.ops - -SOURCES := \ - src/gen_grammar.pir \ - src/gen_actions.pir \ - src/gen_builtins.pir \ - kea.pir - -BUILTINS_PIR := \ - src/builtins/dup.pir \ - src/builtins/say.pir - -DOCS := README - -BUILD_CLEANUPS := \ - kea.pbc \ - "src/gen_*.pir" \ - "*.c" \ - "*$(O)" \ - kea@exe@ \ -#IF(win32): parrot-kea.exe \ -#IF(win32): parrot-kea.iss \ -#IF(win32): "setup-parrot-*.exe" \ - installable_kea@exe@ - -TEST_CLEANUPS := - -# the default target -build: \ - $(KEA_OPS) \ - $(KEA_GROUP) \ - kea.pbc - -all: build kea@exe@ installable - -kea.pbc: $(SOURCES) - $(PARROT) $(PARROT_ARGS) -o kea.pbc kea.pir - -kea@exe@: kea.pbc - $(PBC_TO_EXE) kea.pbc - -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 - -src/gen_builtins.pir: $(BUILTINS_PIR) - $(CAT) $(BUILTINS_PIR) > src/gen_builtins.pir - -$(KEA_GROUP): $(PMC_DEPS) -# $(MAKE) $(PMC_DIR) - -$(KEA_OPS): $(OPS_DEPS) -# $(MAKE) $(OPS_DIR) - -installable: installable_kea@exe@ - -installable_kea@exe@: kea.pbc - $(PBC_TO_EXE) kea.pbc --install - -Makefile: build/Makefile.in - $(PERL) Configure.pl - -# 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: kea.pbc" - @echo " This is the default." - @echo " kea@exe@ Self-hosting binary not to be installed." - @echo " all: kea.pbc kea@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 - $(BIN_DIR)/nqp t/harness t/*.t - -# basic run for missing libs -test-installable: installable - echo "1" | ./installable_kea@exe@ - -install: installable -# $(MAKE) $(OPS_DIR) install -# $(MAKE) $(PMC_DIR) install - $(CP) installable_kea@exe@ $(BIN_DIR)/parrot-kea@exe@ - $(CHMOD) 0755 $(BIN_DIR)/parrot-kea@exe@ - -$(MKPATH) $(LIB_DIR)/languages/kea - $(CP) kea.pbc $(LIB_DIR)/languages/kea/kea.pbc -# -$(MKPATH) $(MANDIR)/man1 -# $(POD2MAN) doc/running.pod > $(MANDIR)/man1/parrot-kea.1 -# -$(MKPATH) $(DOC_DIR)/languages/kea -# $(CP) $(DOCS) $(DOC_DIR)/languages/kea - -uninstall: -# $(MAKE) $(OPS_DIR) uninstall -# $(MAKE) $(PMC_DIR) uninstall - $(RM_F) $(BIN_DIR)/parrot-kea@exe@ - $(RM_RF) $(LIB_DIR)/languages/kea -# $(RM_F) $(MANDIR)/man1/parrot-kea.1 -# $(RM_RF) $(DOC_DIR)/languages/kea - -win32-inno-installer: installable -# -$(MKPATH) man/man1 -# $(POD2MAN) doc/running.pod > man/man1/parrot-kea.1 -# -$(MKPATH) man/html -# pod2html --infile doc/running.pod --outfile man/html/parrot-kea.html - $(CP) installable_kea@exe@ parrot-kea.exe - $(PERL) -I$(LIB_DIR)/tools/lib $(LIB_DIR)/tools/dev/mk_inno_language.pl kea - iscc parrot-kea.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: - diff --git a/build/PARROT_REVISION b/build/PARROT_REVISION deleted file mode 100644 index 5468af4..0000000 --- a/build/PARROT_REVISION +++ /dev/null @@ -1 +0,0 @@ -41564 diff --git a/build/gen_parrot.pl b/build/gen_parrot.pl deleted file mode 100644 index 28b2bb7..0000000 --- a/build/gen_parrot.pl +++ /dev/null @@ -1,84 +0,0 @@ -#! perl - -=head1 TITLE - -gen_parrot.pl - script to obtain and build Parrot for kea - -=head2 SYNOPSIS - - perl gen_parrot.pl [--option-for-Configure-pl] - -=head2 DESCRIPTION - -Maintains an appropriate copy of Parrot in the parrot/ subdirectory. -The revision of Parrot to be used in the build is given by the -build/PARROT_REVISION file. - -=cut - -use strict; -use warnings; -use 5.008; - -## determine what revision of Parrot we require -open my $REQ, 'build/PARROT_REVISION' - or die "cannot open build/PARROT_REVISION ($!)\n"; -my $required = <$REQ>; -chomp $required; -close $REQ; - -{ - no warnings; - if (open my $REV, '-|', 'parrot/parrot_config revision') { - my $revision = <$REV>; - close $REV; - chomp $revision; - if ($revision >= $required) { - print "Parrot r$revision already available (r$required required)\n"; - exit(0); - } - } -} - -print "Checking out Parrot r$required via svn...\n"; -system("svn checkout -r $required https://svn.parrot.org/parrot/trunk parrot"); - -chdir('parrot'); - - -## If we have a Makefile from a previous build, do a 'make realclean' -if (-f 'Makefile') { - my %config = read_parrot_config(); - my $make = $config{'make'}; - if ($make) { - print "Performing '$make realclean'\n"; - system($make, 'realclean'); - } -} - -## Configure Parrot -system($^X, 'Configure.pl', @ARGV); - -my %config = read_parrot_config(); -my $make = $config{'make'}; -system( $make ); -system( $make, 'install-dev' ); - -sub read_parrot_config { - my %config = (); - if (open my $CFG, 'config_lib.pasm') { - while (<$CFG>) { - $config{$1} = $2 if (/P0\["(.*?)"], "(.*?)"/); - } - close $CFG; - } - %config; -} - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: -