Skip to content

Commit

Permalink
Re-order Makefile targets into slightly more logical sense.
Browse files Browse the repository at this point in the history
Add a check for Makefile versus build/Makefile.in .
  • Loading branch information
pmichaud committed Apr 5, 2009
1 parent deff24a commit 7dc65fd
Showing 1 changed file with 50 additions and 59 deletions.
109 changes: 50 additions & 59 deletions build/Makefile.in
Expand Up @@ -24,8 +24,6 @@ OPSDIR = src/ops
OPSLIB = perl6
OPS_FILE = src/ops/perl6.ops

# Set up extensions

# Setup some commands
PARROT = $(BUILD_DIR)/parrot$(EXE)
CAT = $(PERL) -MExtUtils::Command -e cat
Expand Down Expand Up @@ -168,45 +166,22 @@ HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs
# the default target
all: perl6$(EXE)

xmas: perl6$(EXE)

## targets for building a standalone perl6.
perl6$(EXE): perl6.pbc
$(PBC_TO_EXE) perl6.pbc
@win32_libparrot_copy@

spectest_checkout : t/spec

t/spec :
svn co "http://svn.pugscode.org/pugs/t/spec" t/spec

spectest_update :
-cd t/spec && svn up

testable : perl6$(EXE) Test.pir spectest_checkout spectest_update

xmas: perl6$(EXE)

CRITIC_FILES=Configure.pl t/harness build/ tools/

perlcritic:
perlcritic -1 --profile tools/util/perlcritic.conf $(CRITIC_FILES)

## supporting targets for perl6
# the Perl 6 compiler
perl6_s1.pbc: $(PARROT) $(SOURCES) $(BUILTINS_PIR)
$(PERL) -e "" > src/gen_setting.pir
$(PARROT) $(PARROT_ARGS) -o perl6_s1.pbc perl6.pir

# the Perl 6 compiler
perl6.pbc: perl6_s1.pbc src/gen_setting.pm
$(PARROT) $(PARROT_ARGS) perl6_s1.pbc --target=pir src/gen_setting.pm > src/gen_setting.pir
$(PARROT) $(PARROT_ARGS) -o perl6.pbc perl6.pir

Test.pir: Test.pm perl6.pbc
$(PARROT) $(PARROT_ARGS) perl6.pbc --target=pir --output=Test.pir Test.pm

$(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref_pmc.pl
$(PERL) -I$(BUILD_DIR)/lib build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
$(PMC_DIR)/objectref.pmc
# the Perl 6 stage-1 compiler
perl6_s1.pbc: $(PARROT) $(SOURCES) $(BUILTINS_PIR)
$(PERL) -e "" > src/gen_setting.pir
$(PARROT) $(PARROT_ARGS) -o perl6_s1.pbc perl6.pir

src/gen_grammar.pir: $(PARROT) $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
Expand Down Expand Up @@ -241,6 +216,10 @@ src/ops/perl6_ops$(LOAD_EXT) : $(PARROT) $(OPS_FILE)
@cd $(OPSDIR) && $(BUILD_DYNOPS) linklibs $(OPSLIB)
@cd $(OPSDIR) && $(BUILD_DYNOPS) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)

$(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref_pmc.pl
$(PERL) -I$(BUILD_DIR)/lib build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
$(PMC_DIR)/objectref.pmc


## local copy of Parrot
parrot: parrot/parrot_config build/PARROT_REVISION
Expand All @@ -249,21 +228,36 @@ parrot: parrot/parrot_config build/PARROT_REVISION
parrot/parrot_config:
@echo "Don't see parrot/parrot_config."

t/localtest.data:
$(PERL) -MExtUtils::Command -e test_f $@


## testing targets
Test.pir: Test.pm perl6.pbc
$(PARROT) $(PARROT_ARGS) perl6.pbc --target=pir --output=Test.pir Test.pm

test : coretest

codetest:
$(MAKE) $(BUILD_DIR) codetest
fulltest: coretest spectest

coretest: perl6$(EXE)
# prove t/pmc
$(PERL) t/harness t/00-parrot t/01-sanity

fulltest: coretest spectest codetest
# Run the spectests that we know work.
spectest_regression: spectest
spectest: testable t/spectest.data
$(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data

spectest_full: testable
$(HARNESS_WITH_FUDGE_JOBS) t/spec

spectest_checkout : t/spec
t/spec :
svn co "http://svn.pugscode.org/pugs/t/spec" t/spec

spectest_update :
-cd t/spec && svn up

testable : perl6$(EXE) Test.pir spectest_checkout spectest_update

t/localtest.data:
$(PERL) -MExtUtils::Command -e test_f $@

# Run the tests in t/localtest.data
localtest: all Test.pir spectest_checkout t/localtest.data
Expand All @@ -273,14 +267,6 @@ localtest: all Test.pir spectest_checkout t/localtest.data
localtest_loud: all Test.pir spectest_checkout t/localtest.data
@$(HARNESS_WITH_FUDGE) --tests-from-file=t/localtest.data --verbosity=1

# Run the spectests that we know work.
spectest_regression: spectest
spectest: testable t/spectest.data
$(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data

spectest_full: testable
$(HARNESS_WITH_FUDGE_JOBS) t/spec

# Run many tests of your choise.
# make sometests TESTFILES=t/foo/bar
sometests: all
Expand All @@ -290,7 +276,6 @@ sometests: all
t/*.t t/*/*.t t/*/*/*.t: all Test.pir
@$(HARNESS_WITH_FUDGE) --verbosity=1 $@


## cleaning
clean:
$(RM_F) $(CLEANUPS)
Expand All @@ -312,23 +297,21 @@ help:
@echo " all: perl6.pbc"
@echo " This is the default."
@echo " perl6$(EXE): Some want a pony, others are satisfied with an executable."
@echo " spectest_checkout Performs svn checkout of official test suite."
@echo " spectest_update Performs svn update of official test suite."
@echo " testable: Create the perl6 executable, compile the Test library,"
@echo " and update official test suite."
@echo " xmas: Christmas is when Perl 6 is released. Alias of perl6$(EXE)."
@echo ""
@echo "Testing:"
@echo " test: Run coretest and codetest."
@echo " codetest: Run Parrot's code tests."
@echo " coretest: Run rakudo's core tests."
@echo " fulltest: Run coretest, spectest, and codetest."
@echo " test: Run Rakudo's sanity tests."
@echo " spectest: Run the tests of the official test suite that are expected to pass."
@echo " fulltest: Run sanity tests and spectests."
@echo " spectest_full: Run all tests of the official test suite."
@echo " localtest: Run the official tests given in t/localtest.data."
@echo " spectest: Run the tests of the official test suite that are known to pass."
@echo " spectest_full: Run all tests of the official test suite"
@echo " spectest_checkout: Performs svn checkout of official test suite."
@echo " spectest_update: Performs svn update of official test suite."
@echo " testable: Create the perl6 executable, compile the Test library,"
@echo " and update official test suite."
@echo ""
@echo "Maintenance:"
@echo " perlcritic Run Perl::Critic on all the Perl 5 code."
@echo " perlcritic: Run Perl::Critic on all the Perl 5 code."
@echo ""
@echo "Cleaning:"
@echo " clean: Basic cleaning up."
Expand All @@ -340,6 +323,14 @@ help:
@echo " help: Print this help message."
@echo ""

Makefile: build/Makefile.in
@echo "Makefile is out of date... try re-running Configure.pl"
@$(PERL) -e 'exit 1'

CRITIC_FILES=Configure.pl t/harness build/ tools/
perlcritic:
perlcritic -1 --profile tools/util/perlcritic.conf $(CRITIC_FILES)

manifest:
echo MANIFEST >MANIFEST
git ls-files | $(PERL) -ne '/^\./ || print' >>MANIFEST
Expand Down

0 comments on commit 7dc65fd

Please sign in to comment.