develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35153 - trunk/languages/perl6/config/makefiles

From:
particle
Date:
January 7, 2009 10:06
Subject:
[svn:parrot] r35153 - trunk/languages/perl6/config/makefiles
Message ID:
20090107180612.D53E7CB9F9@x12.develooper.com
Author: particle
Date: Wed Jan  7 10:06:12 2009
New Revision: 35153

Modified:
   trunk/languages/perl6/config/makefiles/root.in

Log:
[rakudo] rearrange makefile for maintainability

Modified: trunk/languages/perl6/config/makefiles/root.in
==============================================================================
--- trunk/languages/perl6/config/makefiles/root.in	(original)
+++ trunk/languages/perl6/config/makefiles/root.in	Wed Jan  7 10:06:12 2009
@@ -34,10 +34,6 @@
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
-all: perl6.pbc
-
-xmas: perl6$(EXE)
-
 SOURCES = perl6.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
@@ -106,21 +102,66 @@
   src/builtins/system.pir \
   src/builtins/traits.pir \
 
-$(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref_pmc.pl
-	$(PERL) build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
-		$(PMC_DIR)/objectref.pmc
-
 PMCS        = perl6str objectref perl6scalar mutablevar perl6multisub
+
 PMC_SOURCES = $(PMC_DIR)/perl6str.pmc $(PMC_DIR)/objectref.pmc $(PMC_DIR)/perl6scalar.pmc \
               $(PMC_DIR)/mutablevar.pmc $(PMC_DIR)/perl6multisub.pmc
+
 PERL6_GROUP = $(PMC_DIR)/perl6_group$(LOAD_EXT)
 
-# targets for building a standalone perl6.
+CLEANUPS = \
+  perl6.pbc \
+  perl6.c \
+  *.manifest \
+  *.pdb \
+  perl6$(O) \
+  perl6$(EXE) \
+  installable_perl6$(EXE) \
+  Test.pir \
+  src/gen_*.pir \
+  $(PMC_DIR)/*.h \
+  $(PMC_DIR)/*.c \
+  $(PMC_DIR)/*.dump \
+  $(PMC_DIR)/*$(O) \
+  $(PMC_DIR)/*$(LOAD_EXT) \
+  $(PMC_DIR)/*.exp \
+  $(PMC_DIR)/*.ilk \
+  $(PMC_DIR)/*.manifest \
+  $(PMC_DIR)/*.pdb \
+  $(PMC_DIR)/*.lib \
+  $(PMC_DIR)/objectref.pmc \
+  $(OPSDIR)/*.h \
+  $(OPSDIR)/*.c \
+  $(OPSDIR)/*$(O) \
+  $(OPSDIR)/*$(LOAD_EXT) \
+
+# NOTE: eventually, we should remove --keep-exit-code and --fudge
+#       as the goal is that all tests must pass without fudge
+HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code
+HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs
+
+
+# the default target
+all: perl6.pbc
+
+##  targets for building a standalone perl6.
 # (We're not quite ready to make this a default target.)
 perl6$(EXE): perl6.pbc
 	$(PBC_TO_EXE) perl6.pbc
 
-# the default target
+spectest_checkout :
+	svn co http:////svn.pugscode.org//pugs//t//spec t/spec
+
+spectest_update :
+	-cd t/spec && svn up
+
+testable : all Test.pir spectest_checkout spectest_update
+
+xmas: perl6$(EXE)
+
+
+##  supporting targets for perl6
+# the Perl 6 compiler
 perl6.pbc: $(PARROT) $(SOURCES) $(BUILTINS_PIR)
 	$(PARROT) $(PARROT_ARGS) -o perl6.pbc perl6.pir
 
@@ -130,6 +171,10 @@
 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) build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
+		$(PMC_DIR)/objectref.pmc
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir \
@@ -160,78 +205,19 @@
 	@cd $(OPSDIR) && $(BUILD_DYNOPS) linklibs $(OPSLIB)
 	@cd $(OPSDIR) && $(BUILD_DYNOPS) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)
 
-# regenerate the Makefile
-Makefile: config/makefiles/root.in config/makefiles/utils.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=perl6
-
-# 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 "  all:               perl6.pbc"
-	@echo "                     This is the default."
-	@echo "  perl6$(EXE):       Some want a pony, others are satisfied with an executable."
-	@echo "  xmas:              Christmas is when Perl 6 is released. Alias of perl6$(EXE)."
-	@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 "Testing:"
-	@echo "  test:              Run coretest and codetest."
-	@echo "  coretest:          Run rakudo's core tests."
-	@echo "  codetest:          Run Parrot's code tests."
-	@echo "  testclean:         Clean up test results."
-	@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 "  localtest:         Run the official tests given in t/localtest.data."
-	@echo "  fulltest:          Run coretest, spectest, and codetest."
-	@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 ""
-
-
-spectest_checkout :
-	svn co http:////svn.pugscode.org//pugs//t//spec t/spec
-
-spectest_update :
-	-cd t/spec && svn up
-
-testable : all Test.pir spectest_checkout spectest_update
+t/localtest.data:
+	$(PERL) -MExtUtils::Command -e test_f $@
 
 
-# test targets
+##  testing targets
 test    : coretest
 
-coretest: all
-	prove t/pmc
-	$(PERL) t/harness t/00-parrot t/01-sanity
-
 codetest:
 	$(MAKE) $(BUILD_DIR) codetest
 
-# this target has nothing to do
-testclean:
-
-# NOTE: eventually, we should remove --keep-exit-code and --fudge
-#       as the goal is that all tests must pass without fudge
-HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code
-HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs
-
-spectest_full: testable
-	$(HARNESS_WITH_FUDGE_JOBS) t/spec
-
-# 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
+coretest: all
+	prove t/pmc
+	$(PERL) t/harness t/00-parrot t/01-sanity
 
 fulltest: coretest spectest codetest
 
@@ -243,8 +229,16 @@
 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 somtests TESTFILES=t/foo/bar
+# make sometests TESTFILES=t/foo/bar
 sometests: all
 	@$(HARNESS_WITH_FUDGE_JOBS) $(TESTFILES)
 
@@ -252,40 +246,55 @@
 t/*.t t/*/*.t t/*/*/*.t: all Test.pir
 	@$(HARNESS_WITH_FUDGE) --verbosity=1 $@
 
-t/localtest.data:
-	$(PERL) -MExtUtils::Command -e test_f $@
-
-
-CLEANUPS = \
-  perl6.pbc \
-  perl6.c \
-  *.manifest \
-  *.pdb \
-  perl6$(O) \
-  perl6$(EXE) \
-  installable_perl6$(EXE) \
-  Test.pir \
-  src/gen_*.pir \
-  $(PMC_DIR)/*.h \
-  $(PMC_DIR)/*.c \
-  $(PMC_DIR)/*.dump \
-  $(PMC_DIR)/*$(O) \
-  $(PMC_DIR)/*$(LOAD_EXT) \
-  $(PMC_DIR)/*.exp \
-  $(PMC_DIR)/*.ilk \
-  $(PMC_DIR)/*.manifest \
-  $(PMC_DIR)/*.pdb \
-  $(PMC_DIR)/*.lib \
-  $(PMC_DIR)/objectref.pmc \
-  $(OPSDIR)/*.h \
-  $(OPSDIR)/*.c \
-  $(OPSDIR)/*$(O) \
-  $(OPSDIR)/*$(LOAD_EXT) \
 
+##  cleaning
 clean:
 	$(RM_F) $(CLEANUPS)
 
+distclean: realclean
+
 realclean: clean
 	$(RM_F) src/utils/Makefile Makefile
 
-distclean: realclean
+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 "  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 "  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 ""
+	@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 "  Makefile:          Regenerate the Makefile."
+	@echo ""
+
+# regenerate the Makefile
+Makefile: config/makefiles/root.in config/makefiles/utils.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=perl6
+



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About