develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34482 - in branches/pdd30install_stage3: compilers/ncigen/config/makefiles config/gen/makefiles languages/APL/config/makefiles languages/PIR/config/makefiles languages/WMLScript languages/WMLScript/config/makefiles languages/WMLScript/src la

From:
rurban
Date:
December 28, 2008 05:03
Subject:
[svn:parrot] r34482 - in branches/pdd30install_stage3: compilers/ncigen/config/makefiles config/gen/makefiles languages/APL/config/makefiles languages/PIR/config/makefiles languages/WMLScript languages/WMLScript/config/makefiles languages/WMLScript/src la
Message ID:
20081228130235.98E70CB9F9@x12.develooper.com
Author: rurban
Date: Sun Dec 28 05:02:32 2008
New Revision: 34482

Modified:
   branches/pdd30install_stage3/compilers/ncigen/config/makefiles/ncigen.in
   branches/pdd30install_stage3/config/gen/makefiles/docs.in
   branches/pdd30install_stage3/config/gen/makefiles/languages.in
   branches/pdd30install_stage3/languages/APL/config/makefiles/root.in
   branches/pdd30install_stage3/languages/PIR/config/makefiles/root.in
   branches/pdd30install_stage3/languages/WMLScript/config/makefiles/root.in
   branches/pdd30install_stage3/languages/WMLScript/src/script.pir
   branches/pdd30install_stage3/languages/WMLScript/src/wmlsstdlibs.pir
   branches/pdd30install_stage3/languages/WMLScript/wmls2pbc.pir
   branches/pdd30install_stage3/languages/WMLScript/wmls2pir.pir
   branches/pdd30install_stage3/languages/WMLScript/wmlsd.pir
   branches/pdd30install_stage3/languages/WMLScript/wmlsi.pir
   branches/pdd30install_stage3/languages/Zcode/config/makefiles/root.in
   branches/pdd30install_stage3/languages/abc/config/makefiles/root.in
   branches/pdd30install_stage3/languages/befunge/config/makefiles/root.in
   branches/pdd30install_stage3/languages/bf/config/makefiles/root.in
   branches/pdd30install_stage3/languages/c99/config/makefiles/cpp.in
   branches/pdd30install_stage3/languages/c99/config/makefiles/root.in
   branches/pdd30install_stage3/languages/cardinal/config/makefiles/root.in
   branches/pdd30install_stage3/languages/chitchat/config/makefiles/root.in
   branches/pdd30install_stage3/languages/cola/config/makefiles/root.in
   branches/pdd30install_stage3/languages/dotnet/config/Makefile.in
   branches/pdd30install_stage3/languages/eclectus/config/makefiles/root.in
   branches/pdd30install_stage3/languages/ecmascript/config/makefiles/root.in
   branches/pdd30install_stage3/languages/forth/config/makefiles/root.in
   branches/pdd30install_stage3/languages/forth/forth.pir
   branches/pdd30install_stage3/languages/hq9plus/config/makefiles/root.in
   branches/pdd30install_stage3/languages/jako/config/makefiles/root.in
   branches/pdd30install_stage3/languages/json/config/makefiles/root.in
   branches/pdd30install_stage3/languages/lazy-k/config/makefiles/root.in
   branches/pdd30install_stage3/languages/lisp/config/makefiles/root.in
   branches/pdd30install_stage3/languages/lolcode/config/makefiles/root.in
   branches/pdd30install_stage3/languages/lua/config/makefiles/root.in
   branches/pdd30install_stage3/languages/m4/config/makefiles/root.in
   branches/pdd30install_stage3/languages/ook/config/makefiles/root.in
   branches/pdd30install_stage3/languages/parrot_compiler/config/makefiles/root.in
   branches/pdd30install_stage3/languages/perl6/config/makefiles/root.in
   branches/pdd30install_stage3/languages/perl6/config/makefiles/utils.in
   branches/pdd30install_stage3/languages/pheme/config/makefiles/root.in
   branches/pdd30install_stage3/languages/pipp/config/makefiles/root.in
   branches/pdd30install_stage3/languages/punie/config/makefiles/root.in
   branches/pdd30install_stage3/languages/pynie/config/makefiles/root.in
   branches/pdd30install_stage3/languages/regex/config/makefiles/root.in
   branches/pdd30install_stage3/languages/scheme/config/makefiles/root.in
   branches/pdd30install_stage3/languages/squaak/config/makefiles/root.in
   branches/pdd30install_stage3/languages/unlambda/config/makefiles/root.in
   branches/pdd30install_stage3/languages/urm/config/makefiles/root.in
   branches/pdd30install_stage3/tools/dev/mk_language_shell.pl

Log:
56554-make-install-lang

Modified: branches/pdd30install_stage3/compilers/ncigen/config/makefiles/ncigen.in
==============================================================================
--- branches/pdd30install_stage3/compilers/ncigen/config/makefiles/ncigen.in	(original)
+++ branches/pdd30install_stage3/compilers/ncigen/config/makefiles/ncigen.in	Sun Dec 28 05:02:32 2008
@@ -14,6 +14,7 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 PARROT        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
@@ -97,18 +98,7 @@
   ncigen.pbc \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.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 \
-
+  src/gen_builtins.pir
 
 clean:
 	$(RM_RF) $(CLEANUPS)
@@ -118,4 +108,8 @@
 
 distclean: realclean
 
-
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/config/gen/makefiles/docs.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/docs.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/docs.in	Sun Dec 28 05:02:32 2008
@@ -6,7 +6,9 @@
 RM_F   = @rm_f@
 MKPATH = @mkpath@
 CHMOD  = @chmod@
-PERLDOC = @perldoc@
+PERLDOC   = @perldoc@
+BUILD_DIR = @build_dir@
+RECONFIGURE = $(PERL) tools/dev/reconfigure.pl
 
 # long list of .pod files
 POD = @pod@
@@ -16,7 +18,11 @@
 #
 
 # The default target
-all: doc-prep packfile-c.pod $(POD)
+all: doc-prep packfile-c.pod $(POD) Makefile
+
+# regenerate the Makefile
+Makefile: $(BUILD_DIR)/config/gen/makefiles/docs.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::makefiles --target=docs/Makefile
 
 # This is a listing of all targets, that are meant to be called by users
 # Most of them are proxied in the root makefile parrot/Makefile

Modified: branches/pdd30install_stage3/config/gen/makefiles/languages.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/languages.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/languages.in	Sun Dec 28 05:02:32 2008
@@ -46,6 +46,12 @@
 	@echo ""
 	@echo "  test-separate: Run 'make test' in the individual lang dirs."
 	@echo ""
+	@echo "  installable:   Create self-hosting bins and libs."
+	@echo ""
+	@echo "  test-installable: Test self-hosting bins and libs."
+	@echo ""
+	@echo "  install:       Copy installable and more to DESTDIR."
+	@echo ""
 	@echo "  clean:         Clean up a lot of languages."
 	@echo ""
 	@echo "  help:          Print this help message."
@@ -59,13 +65,16 @@
 	@echo "Following languages are available:"
 	@echo "  $(LANGUAGES)"
 	@echo ""
-	@echo "A particular language <lang> can be built, tested and cleand up"
+	@echo "A particular language <lang> can be built, tested and cleaned up"
 	@echo "  make <lang>"
 	@echo "  make <lang>.test"
+	@echo "  make <lang>.installable"
+	@echo "  make <lang>.test-installable"
+	@echo "  make <lang>.install"
 	@echo "  make <lang>.clean"
 	@echo "  make <lang>.realclean"
 	@echo ""
-	@echo "For the status of individual languages see LANGUAGES.STATUS.pod"
+	@echo "For the status of individual languages see LANGUAGES_STATUS.pod"
 	@echo ""
 
 # regenerate the Makefile
@@ -144,6 +153,62 @@
     WMLScript.realclean \
     Zcode.realclean
 
+installable : all \
+    abc.installable APL.installable \
+    befunge.installable bf.installable \
+    c99.installable cardinal.installable chitchat.installable cola.installable \
+    dotnet.installable \
+    eclectus.installable ecmascript.installable \
+    forth.installable \
+    hq9plus.installable \
+    jako.installable json.installable \
+    lazy-k.installable lisp.installable lolcode.installable lua.installable \
+    m4.installable \
+    ook.installable \
+    parrot_compiler.installable perl6.installable pheme.installable PIR.installable pipp.installable punie.installable pynie.installable \
+    regex.installable \
+    scheme.installable squaak.installable \
+    urm.installable unlambda.installable \
+    WMLScript.installable \
+    Zcode.installable
+
+test-installable : all \
+    abc.test-installable APL.test-installable \
+    befunge.test-installable bf.test-installable \
+    c99.test-installable cardinal.test-installable chitchat.test-installable cola.test-installable \
+    dotnet.test-installable \
+    eclectus.test-installable ecmascript.test-installable \
+    forth.test-installable \
+    hq9plus.test-installable \
+    jako.test-installable json.test-installable \
+    lazy-k.test-installable lisp.test-installable lolcode.test-installable lua.test-installable \
+    m4.test-installable \
+    ook.test-installable \
+    parrot_compiler.test-installable perl6.test-installable pheme.test-installable PIR.test-installable pipp.test-installable punie.test-installable pynie.test-installable \
+    regex.test-installable \
+    scheme.test-installable squaak.test-installable \
+    urm.test-installable unlambda.test-installable \
+    WMLScript.test-installable \
+    Zcode.test-installable
+
+install : all \
+    abc.install APL.install \
+    befunge.install bf.install \
+    c99.install cardinal.install chitchat.install cola.install \
+    dotnet.install \
+    eclectus.install ecmascript.install \
+    forth.install \
+    hq9plus.install \
+    jako.install json.install \
+    lazy-k.install lisp.install lolcode.install lua.install \
+    m4.install \
+    ook.install \
+    parrot_compiler.install perl6.install pheme.install PIR.install pipp.install punie.install pynie.install \
+    regex.install \
+    scheme.install squaak.install \
+    urm.install unlambda.install \
+    WMLScript.install \
+    Zcode.install
 
 #
 # Language specific targets
@@ -156,6 +221,12 @@
 	- $(MAKE) abc
 abc.test:
 	- $(MAKE) abc test
+abc.installable:
+	- $(MAKE) abc installable
+abc.test-installable:
+	- $(MAKE) abc test-installable
+abc.install:
+	- $(MAKE) abc install
 abc.clean:
 	- $(MAKE) abc clean
 abc.realclean:
@@ -166,6 +237,12 @@
 	- $(MAKE) APL
 APL.test:
 	- $(MAKE) APL test
+APL.installable:
+	- $(MAKE) APL installable
+APL.test-installable:
+	- $(MAKE) APL test-installable
+APL.install:
+	- $(MAKE) APL install
 APL.clean:
 	- $(MAKE) APL clean
 APL.realclean:
@@ -176,6 +253,12 @@
 # don't know how to build BASIC
 BASIC.test:
 # Don't know how to test BASIC
+BASIC.installable:
+# Missing for BASIC
+BASIC.test-installable:
+# Missing for BASIC
+BASIC.install:
+# Missing for BASIC
 BASIC.clean:
 # Don't know how to clean BASIC
 
@@ -184,6 +267,12 @@
 	- $(MAKE) befunge
 befunge.test:
 	- $(MAKE) befunge test
+befunge.installable:
+	- $(MAKE) befunge installable
+befunge.test-installable:
+	- $(MAKE) befunge test-installable
+befunge.install:
+	- $(MAKE) befunge install
 befunge.clean:
 	- $(MAKE) befunge clean
 befunge.realclean:
@@ -194,6 +283,12 @@
 	- $(MAKE) bf
 bf.test:
 	- $(MAKE) bf test
+bf.installable:
+	- $(MAKE) bf installable
+bf.test-installable:
+	- $(MAKE) bf test-installable
+bf.install:
+	- $(MAKE) bf install
 bf.clean:
 	- $(MAKE) bf clean
 bf.realclean:
@@ -204,6 +299,12 @@
 	- $(MAKE) c99
 c99.test:
 	- $(MAKE) c99 test
+c99.installable:
+	- $(MAKE) c99 installable
+c99.test-installable:
+	- $(MAKE) c99 test-installable
+c99.install:
+	- $(MAKE) c99 install
 c99.clean:
 	- $(MAKE) c99 clean
 c99.realclean:
@@ -214,6 +315,12 @@
 	- $(MAKE) cardinal
 cardinal.test:
 	- $(MAKE) cardinal test
+cardinal.installable:
+	- $(MAKE) cardinal installable
+cardinal.test-installable:
+	- $(MAKE) cardinal test-installable
+cardinal.install:
+	- $(MAKE) cardinal install
 cardinal.clean:
 	- $(MAKE) cardinal clean
 cardinal.realclean:
@@ -224,6 +331,12 @@
 	- $(MAKE) chitchat
 chitchat.test:
 	- $(MAKE) chitchat test
+chitchat.installable:
+	- $(MAKE) chitchat installable
+chitchat.test-installable:
+	- $(MAKE) chitchat test-installable
+chitchat.install:
+	- $(MAKE) chitchat install
 chitchat.clean:
 	- $(MAKE) chitchat clean
 chitchat.realclean:
@@ -234,6 +347,12 @@
 	- $(MAKE) cola
 cola.test:
 	- $(MAKE) cola test
+cola.installable:
+	- $(MAKE) cola installable
+cola.test-installable:
+	- $(MAKE) cola test-installable
+cola.install:
+	- $(MAKE) cola install
 cola.clean:
 	- $(MAKE) cola clean
 cola.realclean:
@@ -245,6 +364,12 @@
 	- $(MAKE) dotnet
 dotnet.test:
 	- $(MAKE) dotnet test
+dotnet.installable:
+	- $(MAKE) dotnet installable
+dotnet.test-installable:
+	- $(MAKE) dotnet test-installable
+dotnet.install:
+	- $(MAKE) dotnet install
 dotnet.clean:
 	- $(MAKE) dotnet clean
 dotnet.realclean:
@@ -255,6 +380,12 @@
 	- $(MAKE) eclectus
 eclectus.test :
 	- $(MAKE) eclectus test
+eclectus.installable:
+	- $(MAKE) eclectus installable
+eclectus.test-installable:
+	- $(MAKE) eclectus test-installable
+eclectus.install:
+	- $(MAKE) eclectus install
 eclectus.clean :
 	- $(MAKE) eclectus clean
 eclectus.realclean :
@@ -265,6 +396,12 @@
 	- $(MAKE) ecmascript
 ecmascript.test:
 	- $(MAKE) ecmascript test
+ecmascript.installable:
+	- $(MAKE) ecmascript installable
+ecmascript.test-installable:
+	- $(MAKE) ecmascript test-installable
+ecmascript.install:
+	- $(MAKE) ecmascript install
 ecmascript.clean:
 	- $(MAKE) ecmascript clean
 ecmascript.realclean:
@@ -275,6 +412,12 @@
 	- $(MAKE) forth
 forth.test:
 	- $(MAKE) forth test
+forth.installable:
+	- $(MAKE) forth installable
+forth.test-installable:
+	- $(MAKE) forth test-installable
+forth.install:
+	- $(MAKE) forth install
 forth.clean:
 	- $(MAKE) forth clean
 forth.realclean:
@@ -285,6 +428,12 @@
 	- $(MAKE) hq9plus
 hq9plus.test:
 	- $(MAKE) hq9plus test
+hq9plus.installable:
+	- $(MAKE) hq9plus installable
+hq9plus.test-installable:
+	- $(MAKE) hq9plus test-installable
+hq9plus.install:
+	- $(MAKE) hq9plus install
 hq9plus.clean:
 	- $(MAKE) hq9plus clean
 hq9plus.realclean:
@@ -295,6 +444,12 @@
 	- $(MAKE) jako
 jako.test:
 	- $(MAKE) jako test
+jako.installable:
+	- $(MAKE) jako installable
+jako.test-installable:
+	- $(MAKE) jako test-installable
+jako.install:
+	- $(MAKE) jako install
 jako.clean:
 	- $(MAKE) jako clean
 jako.realclean:
@@ -305,6 +460,12 @@
 	- $(MAKE) json
 json.test:
 	- $(MAKE) json test
+json.installable:
+	- $(MAKE) json installable
+json.test-installable:
+	- $(MAKE) json test-installable
+json.install:
+	- $(MAKE) json install
 json.clean:
 	- $(MAKE) json clean
 json.realclean:
@@ -315,6 +476,12 @@
 	- $(MAKE) lazy-k
 lazy-k.test:
 	- $(MAKE) lazy-k test
+lazy-k.installable:
+	- $(MAKE) lazy-k installable
+lazy-k.test-installable:
+	- $(MAKE) lazy-k test-installable
+lazy-k.install:
+	- $(MAKE) lazy-k install
 lazy-k.clean:
 	- $(MAKE) lazy-k clean
 lazy-k.realclean:
@@ -325,6 +492,12 @@
 	- $(MAKE) lisp
 lisp.test:
 	- $(MAKE) lisp test
+lisp.installable:
+	- $(MAKE) lisp installable
+lisp.test-installable:
+	- $(MAKE) lisp test-installable
+lisp.install:
+	- $(MAKE) lisp install
 lisp.clean:
 	- $(MAKE) lisp clean
 lisp.realclean:
@@ -335,6 +508,12 @@
 	- $(MAKE) lolcode
 lolcode.test:
 	- $(MAKE) lolcode test
+lolcode.installable:
+	- $(MAKE) lolcode installable
+lolcode.test-installable:
+	- $(MAKE) lolcode test-installable
+lolcode.install:
+	- $(MAKE) lolcode install
 lolcode.clean:
 	- $(MAKE) lolcode clean
 lolcode.realclean:
@@ -345,6 +524,12 @@
 	- $(MAKE) lua
 lua.test:
 	- $(MAKE) lua test
+lua.installable:
+	- $(MAKE) lua installable
+lua.test-installable:
+	- $(MAKE) lua test-installable
+lua.install:
+	- $(MAKE) lua install
 lua.clean:
 	- $(MAKE) lua clean
 lua.realclean:
@@ -355,6 +540,12 @@
 	- $(MAKE) m4
 m4.test:
 	- $(MAKE) m4 test
+m4.installable:
+	- $(MAKE) m4 installable
+m4.test-installable:
+	- $(MAKE) m4 test-installable
+m4.install:
+	- $(MAKE) m4 install
 m4.clean:
 	- $(MAKE) m4 clean
 m4.realclean:
@@ -375,6 +566,12 @@
 	- $(MAKE) ook
 ook.test:
 	- $(MAKE) ook test
+ook.installable:
+	- $(MAKE) ook installable
+ook.test-installable:
+	- $(MAKE) ook test-installable
+ook.install:
+	- $(MAKE) ook install
 ook.clean:
 	- $(MAKE) ook clean
 ook.realclean:
@@ -385,6 +582,12 @@
 	- $(MAKE) parrot_compiler
 parrot_compiler.test:
 	- $(MAKE) parrot_compiler test
+parrot_compiler.installable:
+	- $(MAKE) ook installable
+parrot_compiler.test-installable:
+	- $(MAKE) ook test-installable
+parrot_compiler.install:
+	- $(MAKE) ook install
 parrot_compiler.clean:
 	- $(MAKE) parrot_compiler clean
 parrot_compiler.realclean:
@@ -395,6 +598,12 @@
 	- $(MAKE) perl6
 perl6.test:
 	- $(MAKE) perl6 test
+perl6.installable:
+	- $(MAKE) perl6 installable
+perl6.test-installable:
+	- $(MAKE) perl6 test-installable
+perl6.install:
+	- $(MAKE) perl6 install
 perl6.clean:
 	- $(MAKE) perl6 clean
 perl6.realclean:
@@ -405,6 +614,12 @@
 	- $(MAKE) pheme
 pheme.test:
 	- $(MAKE) pheme test
+pheme.installable:
+	- $(MAKE) pheme installable
+pheme.test-installable:
+	- $(MAKE) pheme test-installable
+pheme.install:
+	- $(MAKE) pheme install
 pheme.clean:
 	- $(MAKE) pheme clean
 pheme.realclean:
@@ -415,6 +630,12 @@
 	- $(MAKE) pipp
 pipp.test:
 	- $(MAKE) pipp test
+pipp.installable:
+	- $(MAKE) pipp installable
+pipp.test-installable:
+	- $(MAKE) pipp test-installable
+pipp.install:
+	- $(MAKE) pipp install
 pipp.clean:
 	- $(MAKE) pipp clean
 pipp.realclean:
@@ -425,6 +646,12 @@
 	- $(MAKE) PIR
 PIR.test:
 	- $(MAKE) PIR test
+PIR.installable:
+	- $(MAKE) PIR installable
+PIR.test-installable:
+	- $(MAKE) PIR test-installable
+PIR.install:
+	- $(MAKE) PIR install
 PIR.clean:
 	- $(MAKE) PIR clean
 PIR.realclean:
@@ -435,6 +662,12 @@
 	- $(MAKE) punie
 punie.test:
 	- $(MAKE) punie test
+punie.installable:
+	- $(MAKE) punie installable
+punie.test-installable:
+	- $(MAKE) punie test-installable
+punie.install:
+	- $(MAKE) punie install
 punie.clean:
 	- $(MAKE) punie clean
 punie.realclean:
@@ -445,6 +678,12 @@
 	- $(MAKE) pynie
 pynie.test:
 	- $(MAKE) pynie test
+pynie.installable:
+	- $(MAKE) pynie installable
+pynie.test-installable:
+	- $(MAKE) pynie test-installable
+pynie.install:
+	- $(MAKE) pynie install
 pynie.clean:
 	- $(MAKE) pynie clean
 pynie.realclean:
@@ -455,6 +694,12 @@
 	- $(MAKE) regex
 regex.test :
 	- $(MAKE) regex test
+regex.installable:
+	- $(MAKE) regex installable
+regex.test-installable:
+	- $(MAKE) regex test-installable
+regex.install:
+	- $(MAKE) regex install
 regex.clean :
 	- $(MAKE) regex clean
 regex.realclean :
@@ -465,6 +710,12 @@
 	@echo "SKIPPED: scheme: (nothing to make, but should not default to make test)"
 scheme.test :
 	- $(MAKE) scheme test
+scheme.installable:
+	- $(MAKE) scheme installable
+scheme.test-installable:
+	- $(MAKE) scheme test-installable
+scheme.install:
+	- $(MAKE) scheme install
 scheme.clean :
 	- $(MAKE) scheme clean
 scheme.realclean :
@@ -475,6 +726,12 @@
 	- $(MAKE) squaak
 squaak.test:
 	- $(MAKE) squaak test
+squaak.installable:
+	- $(MAKE) squaak installable
+squaak.test-installable:
+	- $(MAKE) squaak test-installable
+squaak.install:
+	- $(MAKE) squaak install
 squaak.clean:
 	- $(MAKE) squaak clean
 squaak.realclean:
@@ -485,6 +742,12 @@
 	- $(MAKE) unlambda
 unlambda.test :
 	- $(MAKE) unlambda test
+unlambda.installable:
+	- $(MAKE) unlambda installable
+unlambda.test-installable:
+	- $(MAKE) unlambda test-installable
+unlambda.install:
+	- $(MAKE) unlambda install
 unlambda.clean :
 	- $(MAKE) unlambda clean
 unlambda.realclean :
@@ -495,6 +758,12 @@
 	- $(MAKE) urm
 urm.test:
 	- $(MAKE) urm test
+urm.installable:
+	- $(MAKE) urm installable
+urm.test-installable:
+	- $(MAKE) urm test-installable
+urm.install:
+	- $(MAKE) urm install
 urm.clean:
 	- $(MAKE) urm clean
 urm.realclean:
@@ -505,6 +774,12 @@
 	- $(MAKE) WMLScript
 WMLScript.test:
 	- $(MAKE) WMLScript test
+WMLScript.installable:
+	- $(MAKE) WMLScript installable
+WMLScript.test-installable:
+	- $(MAKE) WMLScript test-installable
+WMLScript.install:
+	- $(MAKE) WMLScript install
 WMLScript.clean:
 	- $(MAKE) WMLScript clean
 WMLScript.realclean:
@@ -515,7 +790,19 @@
 # Do nothing. make Zcode requires an Inform compiler
 Zcode.test:
 	- $(MAKE) Zcode test
+Zcode.installable:
+# Do nothing. make Zcode requires an Inform compiler
+Zcode.test-installable:
+# Do nothing. make Zcode requires an Inform compiler
+Zcode.install:
+# Do nothing. make Zcode requires an Inform compiler
 Zcode.clean:
 	- $(MAKE) Zcode clean
 Zcode.realclean:
 	- $(MAKE) Zcode realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/APL/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/APL/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/APL/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,16 +4,26 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME	      = APL
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
 PERL          = @perl@
 RM_F          = @rm_f@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
@@ -42,11 +52,15 @@
 
 PMCS = aplvector
 PMC_SOURCES = $(PMC_DIR)/aplvector.pmc
+DOCS = MAINTAINER README STATUS
 
 # the default target
-APL.pbc: $(PARROT) $(SOURCES) $(APL_GROUP)
+APL.pbc:  $(SOURCES) $(APL_GROUP)
 	$(PARROT) $(PARROT_ARGS) -o APL.pbc APL.pir
 
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --encoding=utf8 \
@@ -60,15 +74,22 @@
 src/gen_builtins.pir: tools/gen_operator_defs.pl
 	$(PERL) tools/gen_operator_defs.pl >src/gen_builtins.pir
 
-$(APL_GROUP): $(PARROT) $(PMC_SOURCES)
+$(APL_GROUP):  $(PMC_SOURCES)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
 
+installable : installable_$(HLLNAME)@exe@ $(ABC_GROUP)
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
+
+installable_$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=APL
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -77,8 +98,11 @@
 	@echo ""
 	@echo "  all:               APL.pbc"
 	@echo "                     This is the default."
+	@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:"
@@ -93,6 +117,17 @@
 test: all
 	$(PERL) t/harness
 
+# TODO: test for installed libs, rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ demo.apl
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 testclean:
 	$(RM_F) t/*.pir
 
@@ -111,6 +146,8 @@
   $(PMC_DIR)/*.manifest \
   $(PMC_DIR)/*.pdb \
   $(PMC_DIR)/*.lib \
+  $(HLLNAME)@exe@ \
+  installable_$(HLLNAME)@exe@ \
 
 
 clean: testclean
@@ -121,4 +158,8 @@
 
 distclean: realclean
 
-
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/PIR/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/PIR/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/PIR/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -13,13 +13,18 @@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
@@ -52,7 +57,7 @@
   src/pasm/gen_pasm_core.pbc
 
 # the default target
-pirc.pbc: $(PARROT) $(SOURCES) $(PASMGRAMMAR)
+pirc.pbc:  $(SOURCES) $(PASMGRAMMAR)
 	$(PARROT) $(PARROT_ARGS) -o pirc.pbc pirc.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/pir.pg
@@ -102,7 +107,7 @@
 
 src/pasm/gen_pasm_args.pbc: src/pasm/gen_pasm_args.pir
 	$(PARROT) --output-pbc -o src/pasm/gen_pasm_args.pbc src/pasm/gen_pasm_args.pir
-	
+
 src/pasm/gen_pasm_io.pbc: src/pasm/gen_pasm_io.pir
 	$(PARROT) --output-pbc -o src/pasm/gen_pasm_io.pbc src/pasm/gen_pasm_io.pir
 
@@ -111,7 +116,7 @@
 
 src/pasm/gen_pasm_core.pbc: src/pasm/gen_pasm_core.pir
 	$(PARROT) --output-pbc -o src/pasm/gen_pasm_core.pbc src/pasm/gen_pasm_core.pir
-	
+
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=PIR
@@ -177,3 +182,9 @@
 	$(RM_RF) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/WMLScript/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/WMLScript/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/WMLScript/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,9 +1,11 @@
 # Copyright (C) 2006-2007, The Perl Foundation.
 # $Id$
 
+HLLNAME = WMLScript
 RM_F    = @rm_f@
 PERL    = @perl@
-PARROT  = ../../parrot@exe@
+CP      = @cp@
+MKPATH  = @mkpath@
 
 PMCBUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl
 OPSBUILD = $(PERL) @build_dir@/tools/build/dynoplibs.pl
@@ -12,7 +14,19 @@
 OPSDIR   = ops
 O        = @o@
 LOAD_EXT = @load_ext@
+BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
+PARROT_LIBPATH = @build_dir@/runtime/parrot/library
+PARROT_RUNTIME = @build_dir@/runtime/parrot/library/WMLScript
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
@@ -40,19 +54,23 @@
 OPSLIB    = wmls
 
 PBCS = \
- $(LIBPATH)/wmlslang.pbc \
- $(LIBPATH)/wmlsfloat.pbc \
- $(LIBPATH)/wmlsstring.pbc \
- $(LIBPATH)/wmlsconsole.pbc
+ $(PARROT_RUNTIME)/wmlslang.pbc \
+ $(PARROT_RUNTIME)/wmlsfloat.pbc \
+ $(PARROT_RUNTIME)/wmlsstring.pbc \
+ $(PARROT_RUNTIME)/wmlsconsole.pbc
 
 GEN_PIR = \
  src/opcode.pir \
  src/stdlibs.pir
 
+DOCS = \
+ MAINTAINER doc/running.pod doc/status.pod
+
 all: \
+ Makefile \
  pmc/wmls_group$(LOAD_EXT) \
  ops/wmls_ops$(LOAD_EXT) \
- src/WMLScript.pbc \
+ $(PARROT_LIBPATH)/WMLScript.pbc \
  $(PBCS)
 
 pmc/wmls_group$(LOAD_EXT) : $(PMC_FILES)
@@ -67,9 +85,9 @@
 	@cd $(OPSDIR) && $(OPSBUILD) linklibs $(OPSLIB)
 	@cd $(OPSDIR) && $(OPSBUILD) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)
 
-src/WMLScript.pbc: src/WMLScript.pir \
+$(PARROT_LIBPATH)/WMLScript.pbc: src/WMLScript.pir \
  src/script.pir src/wmlsstdlibs.pir $(GEN_PIR)
-	$(PARROT) -o src/WMLScript.pbc src/WMLScript.pir
+	$(PARROT) -o $@ src/WMLScript.pir
 
 src/opcode.pir: src/translation.rules build/translator.pl \
  build/SRM/Stack.pm build/SRM/Register.pm
@@ -79,17 +97,60 @@
 src/stdlibs.pir: src/wmlslibs.cfg build/stdlibs.pl
 	$(PERL) build/stdlibs.pl --output src/stdlibs.pir src/wmlslibs.cfg
 
-$(LIBPATH)/wmlslang.pbc: $(LIBPATH)/wmlslang.pir
-	$(PARROT) --output=$(LIBPATH)/wmlslang.pbc $(LIBPATH)/wmlslang.pir
+$(PARROT_RUNTIME)/wmlslang.pbc: $(LIBPATH)/wmlslang.pir
+	-$(MKPATH) $(PARROT_RUNTIME)
+	$(PARROT) --output=$@ $(LIBPATH)/wmlslang.pir
+
+$(PARROT_RUNTIME)/wmlsfloat.pbc: $(LIBPATH)/wmlsfloat.pir
+	$(PARROT) --output=$@ $(LIBPATH)/wmlsfloat.pir
+
+$(PARROT_RUNTIME)/wmlsstring.pbc: $(LIBPATH)/wmlsstring.pir
+	$(PARROT) --output=$@ $(LIBPATH)/wmlsstring.pir
+
+$(PARROT_RUNTIME)/wmlsconsole.pbc: $(LIBPATH)/wmlsconsole.pir
+	$(PARROT) --output=$@ $(LIBPATH)/wmlsconsole.pir
+
+wmls2pir@exe@: wmls2pir.pbc
+	$(PBC_TO_EXE) wmls2pir.pbc
+
+wmls2pbc@exe@: wmls2pbc.pbc
+	$(PBC_TO_EXE) wmls2pbc.pbc
+
+wmlsd@exe@: wmlsd.pbc
+	$(PBC_TO_EXE) wmlsd.pbc
+
+wmlsi@exe@: wmlsi.pbc
+	$(PBC_TO_EXE) wmlsi.pbc
+
+installable_wmls2pir@exe@: $(RUNTIMES) wmls2pir.pbc
+	$(PBC_TO_EXE) wmls2pir.pbc --install
+
+installable_wmls2pbc@exe@: $(RUNTIMES) wmls2pbc.pbc
+	$(PBC_TO_EXE) wmls2pbc.pbc --install
+
+installable_wmlsd@exe@: $(RUNTIMES) wmlsd.pbc
+	$(PBC_TO_EXE) wmlsd.pbc --install
+
+installable_wmlsi@exe@: $(RUNTIMES) wmlsi.pbc
+	$(PBC_TO_EXE) wmlsi.pbc --install
 
-$(LIBPATH)/wmlsfloat.pbc: $(LIBPATH)/wmlsfloat.pir
-	$(PARROT) --output=$(LIBPATH)/wmlsfloat.pbc $(LIBPATH)/wmlsfloat.pir
+install : installable
+	$(CP) installable_wmls2pir@exe@ $(DESTDIR)$(BIN_DIR)/parrot-wmls2pir@exe@
+	$(CP) installable_wmls2pbc@exe@ $(DESTDIR)$(BIN_DIR)/parrot-wmls2pbc@exe@
+	$(CP) installable_wmlsd@exe@ $(DESTDIR)$(BIN_DIR)/parrot-wmlsd@exe@
+	$(CP) installable_wmlsi@exe@ $(DESTDIR)$(BIN_DIR)/parrot-wmlsi@exe@
+	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
+	@cd $(OPSDIR) && $(OPSBUILD) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(OPSLIB)
+	$(POD2MAN) pod/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-wmls.5
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
-$(LIBPATH)/wmlsstring.pbc: $(LIBPATH)/wmlsstring.pir
-	$(PARROT) --output=$(LIBPATH)/wmlsstring.pbc $(LIBPATH)/wmlsstring.pir
+# regenerate the Makefile
+Makefile: config/makefiles/root.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
-$(LIBPATH)/wmlsconsole.pbc: $(LIBPATH)/wmlsconsole.pir
-	$(PARROT) --output=$(LIBPATH)/wmlsconsole.pbc $(LIBPATH)/wmlsconsole.pir
+installable: $(RUNTIMES) installable_wmls2pir@exe@ installable_wmls2pbc@exe@ \
+             installable_wmlsd@exe@ installable_wmlsi@exe@
 
 help:
 	@echo ""
@@ -146,3 +207,8 @@
 
 distclean: realclean
 
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/WMLScript/src/script.pir
==============================================================================
--- branches/pdd30install_stage3/languages/WMLScript/src/script.pir	(original)
+++ branches/pdd30install_stage3/languages/WMLScript/src/script.pir	Sun Dec 28 05:02:32 2008
@@ -104,7 +104,7 @@
 
   $P0 = get_hll_global '@stdlibs'
   unless null $P0 goto L1
-  load_bytecode 'languages/WMLScript/src/WMLScript.pbc'
+  load_bytecode 'WMLScript.pbc'
 L1:
 PIRCODE
 

Modified: branches/pdd30install_stage3/languages/WMLScript/src/wmlsstdlibs.pir
==============================================================================
--- branches/pdd30install_stage3/languages/WMLScript/src/wmlsstdlibs.pir	(original)
+++ branches/pdd30install_stage3/languages/WMLScript/src/wmlsstdlibs.pir	Sun Dec 28 05:02:32 2008
@@ -29,10 +29,10 @@
 
 .sub '__onload' :load :anon
 #    print "__onload (wmlsstdlibs.pir)\n"
-    load_bytecode 'languages/WMLScript/runtime/wmlslang.pbc'
-    load_bytecode 'languages/WMLScript/runtime/wmlsfloat.pbc'
-    load_bytecode 'languages/WMLScript/runtime/wmlsstring.pbc'
-    load_bytecode 'languages/WMLScript/runtime/wmlsconsole.pbc'
+    load_bytecode 'WMLScript/wmlslang.pbc'
+    load_bytecode 'WMLScript/wmlsfloat.pbc'
+    load_bytecode 'WMLScript/wmlsstring.pbc'
+    load_bytecode 'WMLScript/wmlsconsole.pbc'
 
     new $P0, 'Hash'
     $P1 = getLang()

Modified: branches/pdd30install_stage3/languages/WMLScript/wmls2pbc.pir
==============================================================================
--- branches/pdd30install_stage3/languages/WMLScript/wmls2pbc.pir	(original)
+++ branches/pdd30install_stage3/languages/WMLScript/wmls2pbc.pir	Sun Dec 28 05:02:32 2008
@@ -25,7 +25,7 @@
 
 .sub 'main' :main
     .param pmc argv
-    load_bytecode 'languages/WMLScript/src/WMLScript.pbc'
+    load_bytecode 'WMLScript.pbc'
     .local int argc
     .local string progname
     .local string filename

Modified: branches/pdd30install_stage3/languages/WMLScript/wmls2pir.pir
==============================================================================
--- branches/pdd30install_stage3/languages/WMLScript/wmls2pir.pir	(original)
+++ branches/pdd30install_stage3/languages/WMLScript/wmls2pir.pir	Sun Dec 28 05:02:32 2008
@@ -25,7 +25,7 @@
 
 .sub 'main' :main
     .param pmc argv
-    load_bytecode 'languages/WMLScript/src/WMLScript.pbc'
+    load_bytecode 'WMLScript.pbc'
     .local int argc
     .local string progname
     .local string filename

Modified: branches/pdd30install_stage3/languages/WMLScript/wmlsd.pir
==============================================================================
--- branches/pdd30install_stage3/languages/WMLScript/wmlsd.pir	(original)
+++ branches/pdd30install_stage3/languages/WMLScript/wmlsd.pir	Sun Dec 28 05:02:32 2008
@@ -25,7 +25,7 @@
 
 .sub 'main' :main
     .param pmc argv
-    load_bytecode 'languages/WMLScript/src/WMLScript.pbc'
+    load_bytecode 'WMLScript.pbc'
     .local int argc
     .local string progname
     .local string filename

Modified: branches/pdd30install_stage3/languages/WMLScript/wmlsi.pir
==============================================================================
--- branches/pdd30install_stage3/languages/WMLScript/wmlsi.pir	(original)
+++ branches/pdd30install_stage3/languages/WMLScript/wmlsi.pir	Sun Dec 28 05:02:32 2008
@@ -26,7 +26,7 @@
 
 .sub 'main' :main
     .param pmc argv
-    load_bytecode 'languages/WMLScript/src/WMLScript.pbc'
+    load_bytecode 'WMLScript.pbc'
     .local int argc
     .local string progname
     .local string filename

Modified: branches/pdd30install_stage3/languages/Zcode/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/Zcode/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/Zcode/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,14 +1,19 @@
 # $Id$
 
 # Makefile for languages/Zcode
+HLLNAME	      = Zcode
 
 # Setup of some commands
-PARROT     = ../../parrot@exe@
+BUILD_DIR  = @build_dir@
 PERL       = @perl@
 RM_F       = @rm_f@
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
 
 EXAMPLES = examples/small.z3 examples/hello.z3
 
@@ -27,9 +32,7 @@
 	@echo "                     Requires an Inform compiler!"
 	@echo ""
 	@echo "  clean:             clean up temporary files (none presently)"
-	@echo ""
 	@echo "  realclean:         clean up generated files"
-	@echo ""
 	@echo "  maintclean:        clean up Z-code files"
 	@echo ""
 	@echo "  help:              print this help message"
@@ -54,6 +57,10 @@
 .inf.z3:
 	inform $< $@
 
+# regenerate the Makefile
+Makefile: config/makefiles/root.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+
 clean:
 	@echo "No temp files to clean"
 
@@ -64,3 +71,9 @@
 
 maintclean: realclean
 	$(RM_F) $(EXAMPLES) $(TEST_ZFILES)
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/abc/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/abc/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/abc/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,16 +4,26 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME       = abc
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
@@ -28,28 +38,25 @@
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
 PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
-PMC_DIR       = src/pmc
-
 all: abc.pbc
 
-ABC_GROUP = $(PMC_DIR)/abc_group$(LOAD_EXT)
-
 SOURCES = abc.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.pir \
-#  $(ABC_GROUP)
 
 BUILTINS_PIR = \
   src/builtins/all.pir \
 
-# PMCS = abc
-# PMC_SOURCES = $(PMC_DIR)/abc.pmc
+DOCS = MAINTAINER README TODO
 
 # the default target
-abc.pbc: $(PARROT) $(SOURCES)
+abc.pbc:  $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o abc.pbc abc.pir
 
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir \
@@ -96,6 +103,16 @@
 test: all
 	prove -r t
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo "2-1" | ./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 testclean:
 	$(RM_RF) "t/*.pir" "t/*.out"
 

Modified: branches/pdd30install_stage3/languages/befunge/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/befunge/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/befunge/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,14 +1,31 @@
 # $Id$
 
 # Makefile for languages/befunge
+HLLNAME       = befunge
+
+## configuration settings
+BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 # Setup of some commands
-PARROT     = ../../parrot
-PERL       = @perl@
-RM_F       = @rm_f@
+PERL          = @perl@
+RM_F          = @rm_f@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN	      = @
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
+
+DOCS = MAINTAINER README Changes
 
 default: all
 
@@ -16,16 +33,21 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  build:             Create befunge.pbc"
+	@echo "  all:               befunge.pbc"
 	@echo "                     This is the default."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
-	@echo "  test:              run the test suite,"
-	@echo ""
-	@echo "  clean:             clean up temporary files"
+	@echo "Testing:"
+	@echo "  test:              Run the test suite."
+	@echo "  test-installable:  Test self-hosting targets."
+	@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 "  realclean:         clean up generated files"
-	@echo ""
-	@echo "  help:              print this help message"
+	@echo "Misc:"
+	@echo "  help:              Print this help message"
 
 
 all: build
@@ -35,14 +57,42 @@
 befunge.pbc: befunge.pasm debug.pasm flow.pasm io.pasm load.pasm maths.pasm stack.pasm
 	$(PARROT) -o befunge.pbc befunge.pasm
 
+# regenerate the Makefile
+Makefile: config/makefiles/root.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+
+installable_$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
 test: befunge.pbc
-	cd .. && $(PERL) t/harness --languages=befunge
+	cd .. && $(PERL) t/harness --languages=$(HLLNAME)
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ test.bef
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
 clean:
 	$(RM_F) core \
     "*.pbc" \
-    "*~"
+    "*~" \
+    "installable_$(HLLNAME)@exe@"
 
 realclean: clean
 	$(RM_F) Makefile
 
+distclean: clean realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/bf/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/bf/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/bf/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,32 +1,75 @@
-RM_F = @rm_f@
-PERL = @perl@
-PARROT=../../parrot
+# $Id$
+HLLNAME       = bf
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR        = @mandir@
+
+RM_F          = @rm_f@
+PERL          = @perl@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
-default: build
+DOCS = MAINTAINER README
+
+all : build
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  build:             build bf.pbc and bfc.pir"
+	@echo "  build:             build bf.pbc, bfc.pfc and bfco.pfc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
-	@echo "  test:              run the test suite,"
+	@echo "Testing:"
+	@echo "  test:              Run the test suite."
+	@echo "  test-installable:  Test self-hosting targets."
+	@echo "  testclean:         Clean up test results."
 	@echo ""
-	@echo "  clean:             clean up temporary files"
+	@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 "  realclean:         clean up generated files"
+	@echo "Misc:"
+	@echo "  help:              Print this help message."
 	@echo ""
-	@echo "  help:              print this help message"
 
-test: build
+test : build
 	$(PERL) -Ilib -I../../lib t/harness
 
 build: bf.pbc bfc.pbc bfco.pbc
 
+installable: installable_bf@exe@ installable_bfc@exe@ installable_bfco@exe@
+
+bf@exe@: bf.pbc
+	$(PBC_TO_EXE) bf.pbc
+
+bfc@exe@: bfc.pbc
+	$(PBC_TO_EXE) bfc.pbc
+
+bfco@exe@: bfco.pbc
+	$(PBC_TO_EXE) bfco.pbc
+
+installable_bf@exe@: bf.pbc
+	$(PBC_TO_EXE) bf.pbc --install
+
+installable_bfc@exe@: bfc.pbc
+	$(PBC_TO_EXE) bfc.pbc --install
+
+installable_bfco@exe@: bfco.pbc
+	$(PBC_TO_EXE) bfco.pbc --install
+
 bf.pbc: bf.pasm
 	$(PARROT) -o bf.pbc bf.pasm
 
@@ -36,9 +79,27 @@
 bfco.pbc: bfco.pir
 	$(PARROT) -o bfco.pbc bfco.pir
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_bf@exe@ test.bf
+	./installable_bfc@exe@ test.bf
+	./installable_bfco@exe@ test.bf
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) installable_bfc@exe@ $(DESTDIR)$(BIN_DIR)/parrot-bfc@exe@
+	$(CP) installable_bfco@exe@ $(DESTDIR)$(BIN_DIR)/parrot-bfco@exe@
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 clean:
 	$(RM_F) core "*.pbc" "*~"
 
 realclean: clean
 	$(RM_F) Makefile
 
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/c99/config/makefiles/cpp.in
==============================================================================
--- branches/pdd30install_stage3/languages/c99/config/makefiles/cpp.in	(original)
+++ branches/pdd30install_stage3/languages/c99/config/makefiles/cpp.in	Sun Dec 28 05:02:32 2008
@@ -4,6 +4,7 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME       = cpp
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
@@ -13,13 +14,20 @@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../../../parrot@exe@
+MKPATH        = @mkpath@
+#IF(has_pod2man):POD2MAN       = @pod2man@
+
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
+#IF(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH)
+PARROT        = $(BUILD_DIR)/parrot@exe@
+PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
 PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
@@ -27,26 +35,28 @@
 
 PMC_DIR       = src/pmc
 
-all: cpp.pbc
+build: cpp.pbc
 
-C_GROUP = $(PMC_DIR)/c_group$(LOAD_EXT)
+all: cpp.pbc cpp@exe@ src/cpp/Makefile installable
 
 SOURCES = cpp.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.pir \
-#  $(C_GROUP)
+  src/gen_builtins.pir
 
 BUILTINS_PIR = \
   src/builtins/say.pir \
 
-# PMCS = c
-# PMC_SOURCES = $(PMC_DIR)/c.pmc
-
 # the default target
-cpp.pbc: $(PARROT) $(SOURCES)
+cpp.pbc: $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o cpp.pbc cpp.pir
 
+cpp@exe@ : cpp.pbc
+	$(PBC_TO_EXE) cpp.pbc
+
+installable_cpp@exe@ : cpp.pbc
+	$(PBC_TO_EXE) cpp.pbc --install
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir \
@@ -59,22 +69,20 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(C_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
-
 # regenerate the Makefile
 Makefile: ../../config/makefiles/cpp.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=c99
 
+installable : installable_cpp@exe@ cpp.pbc
+	$(CP) installable_cpp@exe@ $(BUILD_DIR)
+	$(CP) cpp.pbc $(PARROT_LIB)/cpp.pbc
+
 # 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:               c.pbc"
+	@echo "  build:             cpp.pbc"
 	@echo "                     This is the default."
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
@@ -89,7 +97,7 @@
 	@echo "  help:              Print this help message."
 	@echo ""
 
-test: all
+test: build
 	$(PERL) t/harness
 
 # this target has nothing to do
@@ -100,17 +108,8 @@
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.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 \
-
+  cpp@exe@ \
+  installable_cpp@exe@
 
 clean:
 	$(RM_RF) $(CLEANUPS)
@@ -120,4 +119,8 @@
 
 distclean: realclean
 
-
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/c99/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/c99/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/c99/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,22 +4,33 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME	      = c99
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+POD2MAN       = @pod2man@
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) $(BUILD_DIR)/parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) $(BUILD_DIR)/pbc_to_exe@exe@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
@@ -29,28 +40,39 @@
 PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
+DOCS = MAINTAINER
 
-all: c99.pbc
+all: c99.pbc src/cpp/cpp.pbc
 
 C_GROUP = $(PMC_DIR)/c_group$(LOAD_EXT)
 
 SOURCES = c99.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.pir \
-#  $(C_GROUP)
+  src/gen_builtins.pir
 
 BUILTINS_PIR = \
   src/builtins/say.pir \
 
-# PMCS = c
-# PMC_SOURCES = $(PMC_DIR)/c.pmc
-
 # the default target
-c99.pbc: $(PARROT) $(SOURCES)
+c99.pbc:  $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o c99.pbc c99.pir
 	cd src/cpp; $(MAKE)
 
+c99@exe@: c99.pbc
+	$(PBC_TO_EXE) c99.pbc
+
+installable : installable_c99@exe@ installable_cpp@exe@
+	$(CP) installable_c99@exe@ $(BUILD_DIR)
+	$(CP) installable_cpp@exe@ $(BUILD_DIR)
+
+installable_c99@exe@ : c99.pbc
+	$(PBC_TO_EXE) c99.pbc --install
+
+installable_cpp@exe@ : src/cpp/cpp.pbc
+	make installable_cpp@exe@ -C src/cpp
+	mv src/cpp/installable_cpp@exe@ installable_cpp@exe@
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir \
@@ -63,15 +85,9 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(C_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
-
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=c
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=c99
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -80,6 +96,9 @@
 	@echo ""
 	@echo "  all:               c.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  testclean:         Clean up test results."
@@ -96,6 +115,19 @@
 test: all
 	$(PERL) t/harness
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ t/spi.t
+	./installable_cpp@exe@ t/spi.t
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) installable_cpp@exe@ $(DESTDIR)$(BIN_DIR)/parrot-cpp@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(POD2MAN) src/cpp/cpp.pir > $(DESTDIR)$(MANDIR)/man1/parrot-cpp.1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 # this target has nothing to do
 testclean:
 
@@ -104,21 +136,11 @@
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.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 \
   src/cpp/cpp.pbc \
   src/cpp/src/gen_actions.pir \
   src/cpp/src/gen_grammar.pir \
-  src/cpp/src/gen_builtins.pir
-
+  src/cpp/src/gen_builtins.pir \
+  installable_*@exe@
 
 clean:
 	$(RM_RF) $(CLEANUPS)
@@ -128,4 +150,8 @@
 
 distclean: realclean
 
-
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/cardinal/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/cardinal/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/cardinal/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -40,8 +40,7 @@
   src/parser/quote_expression.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.pir \
-#  $(CARDINAL_GROUP)
+  src/gen_builtins.pir
 
 BUILTINS_PIR = \
   src/builtins/guts.pir \
@@ -101,15 +100,12 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(CARDINAL_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
-
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=cardinal
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -118,8 +114,12 @@
 	@echo ""
 	@echo "  all:               cardinal.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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:"
@@ -174,4 +174,8 @@
 
 distclean: realclean
 
-
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/chitchat/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/chitchat/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/chitchat/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,22 +4,32 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME          = chitchat
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
@@ -28,26 +38,20 @@
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
 PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
-PMC_DIR       = src/pmc
+DOCS = MAINTAINER
 
 all: chitchat.pbc
 
-CHITCHAT_GROUP = $(PMC_DIR)/chitchat_group$(LOAD_EXT)
-
 SOURCES = chitchat.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.pir \
-#  $(CHITCHAT_GROUP)
 
 BUILTINS_PIR = \
   src/builtins/say.pir \
 
-# PMCS = chitchat
-# PMC_SOURCES = $(PMC_DIR)/chitchat.pmc
-
 # the default target
-chitchat.pbc: $(PARROT) $(SOURCES)
+chitchat.pbc:  $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o chitchat.pbc chitchat.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
@@ -62,15 +66,9 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(CHITCHAT_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
-
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=chitchat
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -79,8 +77,12 @@
 	@echo ""
 	@echo "  all:               chitchat.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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:"
@@ -95,6 +97,25 @@
 test: all
 	$(PERL) t/harness
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo "2-1" | ./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 # this target has nothing to do
 testclean:
 
@@ -103,17 +124,8 @@
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.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 \
-
+  $(HLLNAME)@exe@ \
+  installable_$(HLLNAME)@exe@ \
 
 clean:
 	$(RM_RF) $(CLEANUPS)
@@ -123,4 +135,8 @@
 
 distclean: realclean
 
-
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/cola/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/cola/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/cola/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -2,26 +2,32 @@
 
 # Makefile for languages/cola
 
+## configuration settings
+HLLNAME       = cola
+BUILD_DIR     = @build_dir@
+O             = @o@
+EXE           = @exe@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
+
 # Set up commands
 PERL          = @perl@
 RM_F          = @rm_f@
 CHMOD         = @chmod@
+CP            = @cp@
+MKPATH        = @mkpath@
 CC            = @cc@
 DEBUG         = @cc_debug@
 YACC          = @yacc@
 LEX           = @lex@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+POD2MAN	      = @
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
-# Set up extensions
-O             = @o@
-EXE           = @exe@
-
-# Set up directories
-BUILD_DIR     = @build_dir@
-
 # Libraries:  Ordinarily, no special libraries are needed
 # for cola, but one of the following settings might be helpful
 # in some cases.
@@ -44,8 +50,9 @@
 # LIBS = -lefence
 
 HEADERS = cola.h parser.h
+DOCS = MAINTAINER README examples/*
 
-default :
+all : colacc$(EXE)
 	$(MAKE) colacc$(EXE)
 	-$(CHMOD) 775 colacc$(EXE)
 
@@ -53,22 +60,27 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  default  :         build 'colacc'"
+	@echo "  all  :             build 'colacc'"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
-	@echo "  test:              run the test suite"
-	@echo ""
-	@echo "  clean:             clean up temporary files"
+	@echo "Testing:"
+	@echo "  test:              Run the test suite"
+	@echo "  test-installable:  Test self-hosting targets."
+	@echo ""
+	@echo "Cleaning:"
+	@echo "  clean:             Clean up temporary files"
+	@echo "  realclean:         Clean up generated files"
+	@echo "  superclean:        Clean up generated files, also the flex/bison files"
 	@echo ""
-	@echo "  realclean:         clean up generated files"
+	@echo "Misc:"
+	@echo "  help:              Print this help message"
 	@echo ""
-	@echo "  superclean:       clean up generated files, also the flex/bison files"
-	@echo ""
-	@echo "  help:              print this help message"
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=cola
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 nogen : gen$(O) semant$(O) sym$(O) type$(O)
 	$(CC) $(DEBUG) -c parser.c
@@ -93,11 +105,11 @@
 	$(RM_F) parser.h
 	$(RM_F) lexer.c parser.c
 
-publish :
-	$(PERL) publish.pl < MANIFEST
-
-dist :
-	$(PERL) distribution.pl < MANIFEST
+#publish :
+#	$(PERL) publish.pl < MANIFEST
+#
+#dist :
+#	$(PERL) distribution.pl < MANIFEST
 
 parser.c : cola.y
 	$(YACC) -d -o parser.c cola.y
@@ -127,5 +139,23 @@
 	$(CC) $(DEBUG) -o colacc$(EXE) parser$(O) lexer$(O) gen$(O) semant$(O) sym$(O) type$(O) $(LIBS)
 
 test: default
-	cd .. && $(PERL) t/harness --languages=cola
+	cd .. && $(PERL) t/harness --languages=$(HLLNAME)
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./colacc$(EXE) examples/fib.cola
+
+install : installable
+	$(CP) colacc$(EXE) $(DESTDIR)$(BIN_DIR)/parrot-colacc$(EXE)
+	ascii2man README > $(DESTDIR)$(MANDIR)/man1/parrot-colacc.1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
+installable : colacc$(EXE)
+	$(CP) colacc$(EXE) $(BUILD_DIR)/installable_colacc$(EXE)
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/dotnet/config/Makefile.in
==============================================================================
--- branches/pdd30install_stage3/languages/dotnet/config/Makefile.in	(original)
+++ branches/pdd30install_stage3/languages/dotnet/config/Makefile.in	Sun Dec 28 05:02:32 2008
@@ -13,12 +13,15 @@
 # #########################
 PERL     = ${perl}
 RM_F     = ${rm_f}
-PARROT   = ${trans_parrot_path}${slash}parrot${exe}
 MONOLIB  = ${trans_mono_lib_path}
-PBCMERGE = ${trans_parrot_path}${slash}pbc_merge${exe}
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT     = $(SHRPENV) ${trans_parrot_path}${slash}parrot${exe}
+PBCMERGE   = $(SHRPENV) ${trans_parrot_path}${slash}pbc_merge${exe}
+PBC_TO_EXE = $(SHRPENV) ${trans_parrot_path}${slash}pbc_to_exe.exe
 PMCBUILD = $(PERL) ${build_dir}${slash}tools${slash}build${slash}dynpmc.pl
 OPSBUILD = $(PERL) ${build_dir}${slash}tools${slash}build${slash}dynoplibs.pl
-DESTDIR  = ${build_dir}${slash}runtime${slash}parrot${slash}dynext
+PARROT_DYNEXT  = ${build_dir}${slash}runtime${slash}parrot${slash}dynext
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
@@ -33,6 +36,10 @@
 
 # DIRECTORIES AND FILES
 # #####################
+BIN_DIR   = @bin_dir@
+LIB_DIR   = @lib_dir@
+DOC_DIR   = @doc_dir@
+MANDIR	  = @mandir@
 PMCDIR    = pmc
 PMCS      = dotnetassembly dotnetclassmetadata dotnetmethodmetadata \
             dotnetfieldmetadata dotnetparammetadata dotnetsignature \
@@ -60,17 +67,19 @@
 all : pmc/dotnet$(LOAD_EXT) ops/dotnet_ops$(LOAD_EXT) src/it.pbc \
       src/builtins.pbc src/translib.pbc net2pbc.pbc
 
+installable : net2pbc.pbc installable_net2pbc$exe
+
 pmc/dotnet$(LOAD_EXT) : $(PMC_FILES) pmc/structures.h pmc/tableinfo.h
 	@cd $(PMCDIR) && $(PMCBUILD) generate $(PMCS)
 	@cd $(PMCDIR) && $(PMCBUILD) compile $(PMCS)
 	@cd $(PMCDIR) && $(PMCBUILD) linklibs $(PMCS)
-	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)" $(PMCS)
+	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(PARROT_DYNEXT)" $(PMCS)
 
 ops/dotnet_ops$(LOAD_EXT) : $(OPS_FILES)
 	@cd $(OPSDIR) && $(OPSBUILD) generate $(OPSLIB)
 	@cd $(OPSDIR) && $(OPSBUILD) compile $(OPSLIB)
 	@cd $(OPSDIR) && $(OPSBUILD) linklibs $(OPSLIB)
-	@cd $(OPSDIR) && $(OPSBUILD) copy "--destination=$(DESTDIR)" $(OPSLIB)
+	@cd $(OPSDIR) && $(OPSBUILD) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)
 
 src/it.pbc : src/translation.rules build/translator.pl build/SRM/Stack.pm \
              build/SRM/Register.pm build/SRM/OptRegister.pm
@@ -91,7 +100,17 @@
 	$(PBCMERGE) -o net2pbc.pbc src/net2pbc.pbc src/translib.pbc
 
 class-library : net2pbc.pbc
-${trans_class_library}
+	${trans_class_library}
+
+# regenerate the Makefile
+Makefile: config/Makefile.in
+	$(PERL) Configure.pl
+
+net2pbc$exe : net2pbc.pbc
+	$(PBC_TO_EXE) net2pbc.pbc
+
+installable_net2pbc$exe : net2pbc.pbc
+	$(PBC_TO_EXE) net2pbc.pbc --install
 
 
 # PER FILE RULES AND DEPENDENCIES
@@ -133,6 +152,20 @@
 test : all
 	$(PERL) -It t/harness
 
+# TODO: rename build_dir. basic run for missing libs
+installable_test : installable
+	./installable_net2pbc$exe
+
+install : all installable
+	cp installable_net2pbc$exe $(DESTDIR)$(BIN_DIR)/parrot-net2pbc@exe@
+	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(OPLIBS)
+	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
+	pod2man doc/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-net2pbc.1
+	mkdir $(DESTDIR)$(DOC_DIR)/languages/$(LANG)
+	cp $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(LANG)
+	cp doc/*.pod $(DESTDIR)$(DOC_DIR)/languages/$(LANG)
+	mkdir $(DESTDIR)$(DOC_DIR)/languages/$(LANG)/constructs
+	cp doc/constructs/.pod $(DESTDIR)$(DOC_DIR)/languages/$(LANG)/constructs
 
 # CLEANUP TARGETS
 # ###############

Modified: branches/pdd30install_stage3/languages/eclectus/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/eclectus/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/eclectus/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,19 +4,31 @@
 # Makefile for languages/eclectus
 
 # configuration settings
-BUILD_DIR       = @build_dir@
-LOAD_EXT        = @load_ext@
-O               = @o@
+HLLNAME          = eclectus
+BUILD_DIR     = @build_dir@
+LOAD_EXT      = @load_ext@
+O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 # Set up commands
-PARROT          = ../../parrot@exe@
-PERL            = @perl@
-RM_F            = @rm_f@
-RECONFIGURE     = $(PERL) @build_dir@/tools/dev/reconfigure.pl
-BUILD_DYNPMC    = $(PERL) @build_dir@/tools/build/dynpmc.pl
+PERL          = @perl@
+RM_F          = @rm_f@
+RENAME        = @mv@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+BUILD_DYNPMC  = $(PERL) @build_dir@/tools/build/dynpmc.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 # Set up directories
 PARROT_DYNEXT   = @build_dir@/runtime/parrot/dynext
@@ -39,34 +51,42 @@
     $(PMC_DIR)/eclectuspair.pmc \
     $(PMC_DIR)/eclectusstring.pmc \
     $(PMC_DIR)/eclectusvector.pmc
-
+DOCS = MAINTAINER README docs/eclectus.pod
 
 # The default target
-default: build
+all: build
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  build:             Builds the dynamic PMCSs needed by Eclectus."
+	@echo "  all:               Builds the dynamic PMCSs needed by Eclectus."
 	@echo "                     This is the default target."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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:             Clean up temporary files."
-	@echo ""
 	@echo "  realclean:         Clean up generated files."
+	@echo "  distclean:         Removes also anything built, in theory"
 	@echo ""
+	@echo "Misc:"
 	@echo "  help:              Print this help message."
+	@echo ""
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=eclectus
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # Compilation:
 build: $(ECLECTUS_GROUP) driver_nqp.pbc
 
-$(ECLECTUS_GROUP): $(PARROT) $(PMC_SOURCES)
+$(ECLECTUS_GROUP):  $(PMC_SOURCES)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
@@ -78,6 +98,29 @@
 src/builtins/all.pbc: src/builtins/all.pir
 	$(PARROT) -o src/builtins/all.pbc src/builtins/all.pir
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ tests-driver.scm
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
+	$(POD2MAN) docs/eclectus.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: driver_nqp.pbc
+	$(PBC_TO_EXE) driver_nqp.pbc
+	$(RENAME) driver_nqp@exe@ $(HLLNAME)@exe@
+
+installable : installable_$(HLLNAME)@exe@ $(ECLECTUS_GROUP)
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : driver_nqp.pbc
+	$(PBC_TO_EXE) driver_nqp.pbc --install
+	$(RENAME) driver_nqp@exe@ installable_$(HLLNAME)@exe@
+
+
 # cleaning up
 
 clean: dynext-clean test-clean
@@ -97,8 +140,9 @@
   $(PMC_DIR)/*.ilk \
   $(PMC_DIR)/*.manifest \
   $(PMC_DIR)/*.pdb \
-  $(PMC_DIR)/*.lib
-
+  $(PMC_DIR)/*.lib \
+  installable_$(HLLNAME)@exe@ \
+  $(HLLNAME)@exe@ \
 
 realclean: clean
 	$(RM_F) Makefile
@@ -110,3 +154,11 @@
 test-clean:
 	$(RM_F) t/*.nqp
 	$(RM_F) t/*.pir
+
+distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/ecmascript/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/ecmascript/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/ecmascript/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -14,13 +14,18 @@
 RM_F          = @rm_f@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
@@ -85,7 +90,7 @@
 	$(PBC_TO_EXE) js.pbc
 
 # the default target
-js.pbc: $(PARROT) $(SOURCES)
+js.pbc:  $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o js.pbc js.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg 
@@ -104,7 +109,7 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=ecmascript
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -113,8 +118,12 @@
 	@echo ""
 	@echo "  all:               js.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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:"
@@ -129,12 +138,38 @@
 test: all
 	$(PERL) t/harness t
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo "2-1" | ./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME).pbc : js.pbc
+	$(CP) js.pbc $(HLLNAME).pbc
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 testclean:
 	$(RM_F) "t/*.js" "t/*.out"
 
 CLEANUPS = \
   js.pbc \
   js@exe@ \
+  installable_$(HLLNAME)@exe@ \
+  $(HLLNAME).pbc \
+  $(HLLNAME)@exe@ \
   js.c \
   src/gen_grammar.pir \
   src/gen_actions.pir \
@@ -159,3 +194,9 @@
 	$(RM_RF) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/forth/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/forth/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/forth/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,38 +1,44 @@
 # $Id$
 
-PARROT = ../../parrot@exe@
-PERL   = @perl@
-RM_RF  = @rm_rf@
+HLLNAME       = forth
+PERL          = @perl@
+RM_RF         = @rm_rf@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN	      = @
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
+PBC_MERGE     = $(SHRPENV) ../../pbc_merge@exe@
 
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
-DEPENDENCIES = \
-    forth.pbc \
-    tokenstream.pbc \
+PBCS = tokenstream.pbc \
     variablestack.pbc \
     virtualstack.pbc
+DEPENDENCIES = forth.pbc $(PBCS)
+DOCS = MAINTAINER
 
+build: $(DEPENDENCIES)
 
-all: $(DEPENDENCIES)
+all: $(DEPENDENCIES) forth@exe@ installable
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=forth
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 prompt: all
 	$(PARROT) forth.pbc
 
-clean:
-	$(RM_RF) $(DEPENDENCIES)
-
-realclean: clean
-	$(RM_RF) Makefile
-
-
 forth.pbc: forth.pir words.pir
 	$(PARROT) -o forth.pbc forth.pir
 
@@ -47,3 +53,69 @@
 
 test: all
 	$(PERL) t/harness
+
+# 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:               force.pbc"
+	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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 ""
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo "2-1" | ./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) tokenstream.pbc $(DESTDIR)$(LIB_DIR)/parrot/library/forth_tokenstream.pbc
+	$(CP) variablestack.pbc $(DESTDIR)$(LIB_DIR)/parrot/library/forth_variablestack.pbc
+	$(CP) virtualstack.pbc $(DESTDIR)$(LIB_DIR)/parrot/library/forth_virtualstack.pbc
+	-$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
+testclean:
+
+CLEANUPS = \
+  installable_$(HLLNAME)@exe@ \
+  *.pbc \
+  $(HLLNAME)@exe@ \
+
+clean:
+	$(RM_RF) $(CLEANUPS)
+
+realclean: clean
+	$(RM_RF) Makefile
+
+distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/forth/forth.pir
==============================================================================
--- branches/pdd30install_stage3/languages/forth/forth.pir	(original)
+++ branches/pdd30install_stage3/languages/forth/forth.pir	Sun Dec 28 05:02:32 2008
@@ -5,10 +5,25 @@
 .include 'languages/forth/words.pir'
 
 .sub ' init' :load
+
+    # determine location of libs from the Parrot config
+    .local pmc cfg
+    cfg  = _config()
+    .local string installed, lib_dir, pbc_fn
+    lib_dir = 'forth_'
+    installed = cfg['installed']
+    if installed goto inst
+
+    lib_dir = cfg['build_dir']
+    lib_dir .= 'languages/forth/'
+inst:
     # load the libraries we depend on
-    load_bytecode 'languages/forth/tokenstream.pbc'
-    load_bytecode 'languages/forth/variablestack.pbc'
-    load_bytecode 'languages/forth/virtualstack.pbc'
+    pbc_fn = concat lib_dir, 'tokenstream.pbc'
+    load_bytecode pbc_fn
+    pbc_fn = concat lib_dir, 'variablestack.pbc'
+    load_bytecode pbc_fn
+    pbc_fn = concat lib_dir, 'virtualstack.pbc'
+    load_bytecode pbc_fn
 
     # initialize the rstack
     .local pmc stack

Modified: branches/pdd30install_stage3/languages/hq9plus/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/hq9plus/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/hq9plus/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,17 +4,29 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME          = hq9plus
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 PERL          = @perl@
 RM_RF         = @rm_rf@
-PARROT        = ../../parrot@exe@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
+
 
 ## places to look for things
 PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
@@ -35,8 +47,10 @@
   src/builtins/nintynine_bottles_of_beer.pir \
   src/builtins/plus.pir \
 
+DOCS = MAINTAINER README
+
 # the default target
-hq9plus.pbc: $(PARROT) $(SOURCES)
+hq9plus.pbc:  $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o hq9plus.pbc hq9plus.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
@@ -53,7 +67,7 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=hq9plus
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -62,8 +76,12 @@
 	@echo ""
 	@echo "  all:               hq9plus.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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:"
@@ -78,6 +96,25 @@
 test: all
 	$(PERL) t/harness
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 # this target has nothing to do
 testclean:
 
@@ -96,4 +133,10 @@
 realclean: clean
 	$(RM_RF) Makefile
 
-distclean: realclean
+distclean: clean realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/jako/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/jako/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/jako/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,18 +4,31 @@
 # $Id$
 #
 
+HLLNAME       = jako
+BUILD_DIR     = @build_dir@
+LOAD_EXT      = @load_ext@
+O             = @o@
+BIN_DIR       = @bin_dir@
+PERLLIB_DIR   = $(shell $(PERL) -V::sitelib:)
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
+
 PERL          = @perl@
 RM_F          = @rm_f@
 JAKOC         = $(PERL) -I lib jakoc
-INTERP        = ../../@test_prog@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+INTERP        = $(SHRPENV) ../../@test_prog@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 BUILD_DIR     = @build_dir@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
-.SUFFIXES: .jako .pir
+DOCS = README MAINTAINER
 
+.SUFFIXES: .jako .pir
 
 # default target
 all: \
@@ -41,16 +54,23 @@
 	@echo ""
 	@echo "  all  :             Compile the example scripts"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
+	@echo "  over:              Clean and build again"
+	@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 "  over:              clean and build again"
-	@echo ""
-	@echo "  test:              run the test suite"
+	@echo "Misc:"
+	@echo "  help:              Print this help message."
 	@echo ""
-	@echo "  clean:             clean up temporary files"
-	@echo ""
-	@echo "  realclean:         clean up generated files"
-	@echo ""
-	@echo "  help:              print this help message"
 
 
 # regenerate the Makefile
@@ -109,7 +129,27 @@
 	$(INTERP) examples/queens.pir
 	$(INTERP) examples/sub.pir
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo "2-1" | ./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) jako $(DESTDIR)$(BIN_DIR)/parrot-jako
+	$(CP) jakoc $(DESTDIR)$(BIN_DIR)/parrot-jakoc
+	$(CP) -R lib/Jako $(DESTDIR)$(PERLLIB_DIR)
+	$(POD2MAN) docs/jako.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)/examples
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) *.jako $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) examples/*.jako $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)/examples
+
+installable : jako jakoc
+
+testclean:
 
 #
-# End of file.
-#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/json/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/json/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/json/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,22 +4,32 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME       = json
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
@@ -32,22 +42,18 @@
 
 all: json.pbc
 
-JSON_GROUP = $(PMC_DIR)/json_group$(LOAD_EXT)
-
 SOURCES = json.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.pir \
-#  $(JSON_GROUP)
+  src/gen_builtins.pir
+
+DOCS = MAINTAINER
 
 BUILTINS_PIR = \
   src/builtins/say.pir \
 
-# PMCS = json
-# PMC_SOURCES = $(PMC_DIR)/json.pmc
-
 # the default target
-json.pbc: $(PARROT) $(SOURCES)
+json.pbc:  $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o json.pbc json.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
@@ -63,15 +69,9 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(JSON_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
-
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=json
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -80,8 +80,12 @@
 	@echo ""
 	@echo "  all:               json.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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:"
@@ -96,6 +100,25 @@
 test: all
 	$(PERL) t/harness
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 # this target has nothing to do
 testclean:
 
@@ -103,18 +126,7 @@
   json.pbc \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.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 \
-
+  src/gen_builtins.pir
 
 clean: testclean
 	$(RM_RF) $(CLEANUPS)
@@ -123,3 +135,9 @@
 	$(RM_RF) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/lazy-k/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/lazy-k/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/lazy-k/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,47 +1,98 @@
 # $Id$
 
 # Makefile for languages/lazy-k
+HLLNAME       = lazy-k
 
 # Setup of some commands
-PARROT        = @build_dir@/parrot@exe@
 PERL          = @perl@
 RM_F          = @rm_f@
+CP            = @cp@
+MKPATH        = @mkpath@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+POD2MAN	      = @
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 # set up location
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
-default: all
-all: build
+all: lazy-k.pbc
+
+lazy-k.pbc :  $(SOURCES)
+	$(PARROT) $(PARROT_ARGS) -o lazy-k.pbc lazy-k.pir
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  build:             Nothing to do"
+	@echo "  all:               lazy-k.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
-	@echo "  test:              run the test suite,"
-	@echo ""
-	@echo "  clean:             clean up temporary files"
+	@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 "  realclean:         clean up generated files"
+	@echo "Misc:"
+	@echo "  help:              Print this help message."
 	@echo ""
-	@echo "  help:              print this help message"
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=lazy-k
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
-build:
-
-test: build
+test: all
 	cd .. && $(PERL) t/harness --languages=lazy-k
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo '1+2*3' |  ./installable_$(HLLNAME)@exe@ calc.lazy
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 clean:
+	$(RM_F) core \
+    "*.pbc" \
+    "*~" \
+    "installable_$(HLLNAME)@exe@"
 
 realclean: clean
 	$(RM_F) Makefile
+
+distclean: clean realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/lisp/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/lisp/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/lisp/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,41 +1,95 @@
 # $Id$
 
-# Setup some commands
-RM_F          = @rm_f@
-PERL          = @perl@
-PARROT        = ../../parrot@exe@
+## arguments we want to run parrot with
+PARROT_ARGS =
+
+## configuration settings
+HLLNAME       = lisp
 BUILD_DIR     = @build_dir@
-RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+LOAD_EXT      = @load_ext@
+O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
+
+## Setup some commands
+LN_S          = @lns@
+PERL          = @perl@
+RM_RF         = @rm_rf@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
+CAT           = $(PERL) -MExtUtils::Command -e cat
+BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+POD2MAN	      = @
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
+
+DOCS = CHANGES KNOWN_BUGS LICENSE MAINTAINER README
 
 all: build
 
+# regenerate the Makefile
+Makefile: config/makefiles/root.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+
+test: build
+	$(PERL) -Ilib -I../../lib t/harness
+
+build: lisp.pbc
+
+lisp.pbc: lisp.pir
+	$(PARROT) -o lisp.pbc lisp.pir
+
 # This is a listing of all targets, that are meant to be called by users
-help :
+help:
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               'lisp.pbc'"
+	@echo "  all:               lisp.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
-	@echo "  help:              Print this help message."
-	@echo ""
+	@echo "Testing:"
 	@echo "  test:              Run the test suite."
+	@echo "  test-installable:  Test self-hosting targets."
+	@echo "  testclean:         Clean up test results."
 	@echo ""
-	@echo "  clean:             Cleaning up."
+	@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 ""
 
-# regenerate the Makefile
-Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=lisp
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
-test: build
-	$(PERL) -Ilib -I../../lib t/harness
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
 
-build: lisp.pir
-	$(PARROT) -o lisp.pbc lisp.pir
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
 
 clean: testclean
 	$(RM_F) core "*.pbc" "*~"
@@ -45,3 +99,11 @@
 
 realclean: clean
 	$(RM_F) Makefile
+
+distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/lolcode/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/lolcode/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/lolcode/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -34,14 +34,11 @@
 
 all: lolcode.pbc
 
-LOLCODE_GROUP = $(PMC_DIR)/lolcode_group$(LOAD_EXT)
-
 SOURCES = lolcode.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.pir \
-  src/parser/yarn_literal.pir \
-#  $(LOLCODE_GROUP)
+  src/parser/yarn_literal.pir
 
 BUILTINS_PIR = \
   src/builtins/say.pir \
@@ -74,12 +71,6 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(LOLCODE_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
-
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=lolcode
@@ -91,8 +82,12 @@
 	@echo ""
 	@echo "  all:               lolcode.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@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:"
@@ -107,6 +102,20 @@
 test: all
 	$(PERL) t/harness
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ t/00-sanity.t
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 # this target has nothing to do
 testclean:
 
@@ -121,18 +130,7 @@
   installable_lolcode$(EXE) \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.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 \
-
+  src/gen_builtins.pir
 
 clean:
 	$(RM_RF) $(CLEANUPS)
@@ -140,6 +138,10 @@
 realclean: clean
 	$(RM_RF) Makefile
 
-distclean: realclean
-
+distclean: clean realclean
 
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/lua/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/lua/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/lua/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -2,28 +2,36 @@
 # $Id$
 
 ## configuration settings
-O        = @o@
-LOAD_EXT = @load_ext@
+HLLNAME     = lua
+O           = @o@
+LOAD_EXT    = @load_ext@
 
 ## Setup some commands
-MAKE    = @make_c@
-RM_F    = @rm_f@
-PERL    = @perl@
-PARROT  = ../../parrot@exe@
-PBC_MERGE = ../../pbc_merge@exe@
-PGE      = $(PARROT) ../../runtime/parrot/library/PGE/Perl6Grammar.pir
-TGE      = $(PARROT) ../../compilers/tge/tgc.pir
-PBC_TO_EXE = ../../pbc_to_exe@exe@
+MAKE        = @make_c@
+RM_F        = @rm_f@
+PERL        = @perl@
+PGE         = $(PARROT) ../../runtime/parrot/library/PGE/Perl6Grammar.pir
+TGE         = $(PARROT) ../../compilers/tge/tgc.pir
 RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl
-PMCBUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl
+PMCBUILD    = $(PERL) @build_dir@/tools/build/dynpmc.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT      = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE  = $(SHRPENV) ../../pbc_to_exe@exe@
+PBC_MERGE   = $(SHRPENV) ../../pbc_merge@exe@
 
 ## places to look for things
-LIBPATH  = src/lib
-PMCDIR   = src/pmc
+LIBPATH       = src/lib
+PMCDIR        = src/pmc
 PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
+BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 PMCS = \
  lua \
@@ -94,6 +102,8 @@
 GEN_PBC = \
  lua.pbc
 
+DOCS = MAINTAINER doc/running.pod doc/status.pod
+
 all: \
  $(PMCDIR)/lua_group$(LOAD_EXT) \
  $(LIB_PBCS) \
@@ -120,6 +130,16 @@
  $(GEN_PBC) \
  src/yapp/Lua/parser.pm
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo "a=1" | ./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
+	$(POD2MAN) doc/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
 src/lua51_testlex_gen.pir: src/lua51_testlex.pg
 	$(PGE) --output=src/lua51_testlex_gen.pir src/lua51_testlex.pg
@@ -138,11 +158,17 @@
 	$(PERL) -i.bak -pe "s|'PAST::|'PAST;|" src/POSTGrammar_gen.pir
 
 lua.pbc: lua.pir src/lua51.pir src/grammar51.pir src/lua51_gen.pir src/PASTGrammar_gen.pir src/POSTGrammar_gen.pir $(LIB_SRCS)
-	$(PARROT) -o lua.pbc --output-pbc lua.pir
+	$(PARROT) -o lua_i.pbc --output-pbc lua.pir
+	$(PBC_MERGE) -o lua.pbc lua_i.pbc ../../compilers/tge/TGE/Rule.pbc
 
 lua@exe@: lua.pbc
 	$(PBC_TO_EXE) lua.pbc
 
+installable_lua@exe@: lua.pbc
+	$(PBC_TO_EXE) lua.pbc --install
+
+installable: installable_lua@exe@ $(PMCDIR)/lua_group$(LOAD_EXT)
+
 $(LIBPATH)/lualibs.pbc: $(LIB_PBCS)
 	$(PBC_MERGE) -o $(LIBPATH)/lualibs.pbc $(LIB_PBCS)
 
@@ -260,7 +286,7 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd ../.. && $(RECONFIGURE) --step=gen::languages --languages=lua
+	cd ../.. && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 help:
 	@echo ""
@@ -298,6 +324,7 @@
 
 BUILD_CLEANERS = \
  lua@exe@ \
+ installable_lua@exe@ \
  lua$(O) \
  lua.c \
  "*.pbc" \
@@ -308,7 +335,8 @@
  "$(PMCDIR)/*_group.h" \
  "$(PMCDIR)/*$(LOAD_EXT)" \
  "$(PMCDIR)/*$(O)" \
- "$(LIBPATH)/*.pbc"
+ "$(LIBPATH)/*.pbc" \
+ installable_$(HLLNAME)@exe@ \
 
 clean:
 	$(RM_F) $(BUILD_CLEANERS) $(TEST_CLEANERS)
@@ -317,3 +345,9 @@
 	$(RM_F) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/m4/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/m4/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/m4/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,27 +1,48 @@
 # $Id$
 
 # Makefile for languages/m4
+HLLNAME       = m4
 
 # Setup of some commands
-PARROT        = ../../parrot@exe@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 TOUCH         = $(PERL) -MExtUtils::Command -e touch
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
-default: all
-all: build 
+DOCS = BUGS ChangeLog LICENSE MAINTAINER README TODO.pod VERSION \
+       pod/features.pod pod/freezing.pod pod/operation.pod pod/running.pod
+
+default: build
+
+all: build m4@exe@ installable_m4@exe@
+
+build: m4.pbc
 
 help:
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               m4.pbc"
+	@echo "  all:               m4.pbc m4.exe"
+	@echo "  build:             m4.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  test-gnu-m4:       Run the test suite on the installed GNU m4."
@@ -47,21 +68,38 @@
 test-gnu-m4: build
 	PARROT_M4_TEST_PROG='m4' $(PERL) -Ilib -I../../lib t/harness
 
-build: m4.pbc 
-
 m4.pbc: src/m4.pir
-	$(PARROT) -o m4.pbc src/m4.pir 
+	$(PARROT) -o m4.pbc src/m4.pir
+
+src/m4.pir: src/builtin.pir src/freeze.pir src/input.pir src/macro.pir src/output.pir
+	$(TOUCH) $@
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@
 
-src/m4.pir: src/builtin.pir src/freeze.pir src/input.pir src/macro.pir src/output.pir 
-	$(TOUCH) $@ 
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) pod/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
-html: 
-	mkdir docs/html 
+m4@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
+html:
+	$(MKPATH) docs/html
 	pod2html docs/*.pod -o docs/html
- 
+
 perlcritic:
 	$(PERL) tools/scrutinize.pl
- 
+
 clean:
 	$(RM_RF) \
 m4.pbc \
@@ -78,3 +116,9 @@
 	$(RM_RF) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/ook/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/ook/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/ook/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,18 +1,31 @@
 # $Id$
 
 # Makefile for languages/ook
+HLLNAME       = ook
 
 # Set up of commands
-PARROT        = ../../parrot
 PERL          = @perl@
 RM_F          = @rm_f@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 # Set up directories
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
+
+DOCS = Changes MAINTAINER README
 
 default: all
 
@@ -33,15 +46,34 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=ook
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 all: build
 
+build: ook.pbc
+
+ook.pbc: ook.pasm
+	$(PARROT) -o ook.pbc ook.pasm
+
 test: build
 	$(PERL) -I../../lib t/harness
 
-build: ook.pasm
-	$(PARROT) -o ook.pbc ook.pasm
+ook@exe@: ook.pbc
+	$(PBC_TO_EXE) ook.pbc
+
+installable_ook@exe@: ook.pbc
+	$(PBC_TO_EXE) ook.pbc --install
+
+installable: installable_ook@exe@
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ hello.ook
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
 clean:
 	$(RM_F) core \
@@ -52,3 +84,9 @@
 
 realclean: clean
 	$(RM_F) Makefile
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/parrot_compiler/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/parrot_compiler/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/parrot_compiler/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -6,11 +6,14 @@
 # Set up commands
 PERL          = @perl@
 RM_F          = @rm_f@
-PARROT        = ../../@test_prog@@exe@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../@test_prog@@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 # Set up directories
 BUILD_DIR     = @build_dir@
@@ -55,3 +58,8 @@
 parrot_compiler.pasm : parrot_compiler.pir
 	$(PARROT) -o parrot_compiler.pasm parrot_compiler.pir
 
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/perl6/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/perl6/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/perl6/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -14,8 +14,13 @@
 OPSDIR        = src/ops
 OPSLIB        = perl6
 OPS_FILE      = src/ops/perl6.ops
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 # Set up extensions
+HLLNAME       = perl6
 LOAD_EXT      = @load_ext@
 O             = @o@
 EXE           = @exe@
@@ -106,6 +111,7 @@
 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)
+DOCS = README MAINTAINER ROADMAP docs/compiler_overview.pod docs/glossary.pod docs/STATUS
 
 # targets for building a standalone perl6.
 # (We're not quite ready to make this a default target.)
@@ -122,6 +128,9 @@
 Test.pir: Test.pm perl6.pbc
 	$(PARROT) $(PARROT_ARGS) perl6.pbc --target=pir --output=Test.pir Test.pm
 
+$(PERL6GRAMMAR): $(PGE_LIBRARY)/Perl6Grammar.pir
+	cd $(BUILD_DIR) && $(PARROT) $(PARROT_ARGS) -o $(PERL6GRAMMAR) $(PGE_LIBRARY)/Perl6Grammar.pir
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir \
@@ -137,7 +146,7 @@
 src/gen_junction.pir: build/gen_junction_pir.pl
 	$(PERL) build/gen_junction_pir.pl src/gen_junction.pir
 
-$(PERL6_GROUP): $(PARROT) $(PMC_SOURCES)
+$(PERL6_GROUP):  $(PMC_SOURCES)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
@@ -162,6 +171,8 @@
 	@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 "  installable:       Create self-hosting binaries."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run coretest and codetest."
@@ -172,6 +183,7 @@
 	@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_regression, and codetest."
+	@echo "  test-installable:  Test self-hosting targets."
 	@echo ""
 	@echo "Cleaning:"
 	@echo "  clean:             Basic cleaning up."
@@ -234,6 +246,23 @@
 t/spec:
 	svn co http:////svn.pugscode.org//pugs//t//spec t/spec
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ -e'say 1'
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/perl6@exe@
+	@cd $(PMC_DIR) && $(BUILD_DYNPMC) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
+	@cd $(OPSDIR)  && $(BUILD_DYNOPS) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(OPSLIB)
+	$(POD2MAN) doc/running.pod > $(DESTDIR)$(MANDIR)/man1/perl6.1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+installable : installable_$(HLLNAME)@exe@ $(PERL6_GROUP)
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	@cd $(PMC_DIR) && $(BUILD_DYNPMC) copy "--destination=$(PARROT_DYNEXT)" $(PMCS)
+	@cd $(OPSDIR)  && $(BUILD_DYNOPS) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)
+
 CLEANUPS = \
   perl6.pbc \
   perl6.c \
@@ -269,3 +298,9 @@
 	$(RM_F) src/utils/Makefile Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/perl6/config/makefiles/utils.in
==============================================================================
--- branches/pdd30install_stage3/languages/perl6/config/makefiles/utils.in	(original)
+++ branches/pdd30install_stage3/languages/perl6/config/makefiles/utils.in	Sun Dec 28 05:02:32 2008
@@ -1,20 +1,31 @@
 # $Id$
 
 ## arguments we want to run parrot with
+HLLNAME        = perl6doc
 PARROT_ARGS =
 
 ## configuration settings
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
+MKPATH        = @mkpath@
+#IF(has_pod2man):POD2MAN       = @pod2man@
 MAKE          = @make_c@
-PARROT        = ../../../../parrot@exe@
+
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
+#IF(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH)
+PARROT        = $(BUILD_DIR)/parrot@exe@
+PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
@@ -39,7 +50,7 @@
 perl6doc@exe@: perl6doc.pbc
 	$(PBC_TO_EXE) perl6doc.pbc
 
-perl6doc.pbc: $(PARROT) $(PERL6DOC_SOURCES)
+perl6doc.pbc: $(PERL6DOC_SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o perl6doc.pbc perl6doc.pir
 
 perl6doc/gen_grammar.pir: $(PERL6GRAMMAR) perl6doc/grammar.pg
@@ -63,6 +74,9 @@
 	@echo ""
 	@echo "  all:               perl6doc.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting binaries."
+	@echo "  install:           Install the installable targets and docs."
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  testclean:         Clean up test results."
@@ -76,6 +90,20 @@
 	@echo "  help:              Print this help message."
 	@echo ""
 
+installable_perl6doc@exe@: perl6doc.pbc
+	$(PBC_TO_EXE) perl6doc.pbc --install
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/$(HLLNAME)@exe@
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ -f 'test'
+
+
 test: all
 	$(PERL) t/harness t/01-sanity
 
@@ -97,3 +125,9 @@
 	$(RM_RF) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/pheme/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/pheme/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/pheme/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,12 +1,20 @@
 # $Id$
 
 # configuration settings
+HLLNAME       = pheme
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 # Setup some commands
 PERL          = @perl@
 RM_F          = @rm_f@
-PARROT        = ../../parrot@exe@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN	      = @
+EXE           = @exe@
 TGE_DIR       = ../../compilers/tge
 PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
@@ -14,9 +22,17 @@
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
-# the default target
-all: pheme.pbc
+DOCS = MAINTAINER MANIFEST README TODO
+
+# the default targets
+build: pheme.pbc Makefile
+
+all: pheme.pbc Makefile pheme$(EXE) installable
 
 lib/pheme_grammar_gen.pir: lib/pheme.g
 	$(PARROT) $(PERL6GRAMMAR) \
@@ -28,6 +44,12 @@
 pheme.pbc: pheme.pir lib/PhemeSymbols.pir lib/PhemeObjects.pir lib/ASTGrammar.pir lib/pheme_grammar_gen.pir
 	$(PARROT) -o pheme.pbc pheme.pir
 
+pheme$(EXE): pheme.pbc
+	$(PBC_TO_EXE) pheme.pbc
+
+installable_pheme$(EXE): pheme.pbc
+	$(PBC_TO_EXE) pheme.pbc --install
+
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=pheme
@@ -39,6 +61,9 @@
 	@echo ""
 	@echo "  all:               pheme.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  testclean:         Clean up test results."
@@ -58,6 +83,20 @@
 testclean:
 	$(RM_F) "t/*.out"
 
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ -e'say 1'
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
 clean: testclean
 	$(RM_F) pheme.pbc
 	$(RM_F) lib/pheme_grammar_gen.pir
@@ -68,3 +107,9 @@
 	$(RM_F) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/pipp/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/pipp/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/pipp/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,28 +1,41 @@
 # $Id$
 
 # Set up extensions
+HLLNAME       = pipp
 LOAD_EXT      = @load_ext@
 O             = @o@
 EXE           = @exe@
 
 # Set up directories
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR        = @mandir@
 LIBRARY_DIR   = $(BUILD_DIR)/runtime/parrot/library
 INCLUDE_DIR   = $(BUILD_DIR)/include
 PMCDIR        = src/pmc
+PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
 PIPPDIR       = $(BUILD_DIR)/languages/pipp
 HASHDIR       = $(PIPPDIR)/src
 PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
 
 # Set up commands
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
+#IF(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH)
 PARROT        = $(BUILD_DIR)/parrot@exe@
+PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe$(EXE)
+PBC_MERGE     = $(BUILD_DIR)/pbc_merge$(EXE)
 PERL          = @perl@
 RM_F          = @rm_f@
+CP            = @cp@
+MKPATH        = @mkpath@
+#IF(has_pod2man):POD2MAN       = @pod2man@
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
 PMCBUILD      = $(PERL) @build_dir@/tools/build/dynpmc.pl
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
 PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
-PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe$(EXE)
 CC            = @cc@
 #copy/pasta from CFLAGS in config/gen/makefiles/dynpmc_pl.in
 CFLAGS        = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
@@ -115,8 +128,14 @@
   src/common/php_gmp.pbc \
   src/common/php_pcre.pbc
 
+DOCS = README ChangeLog CREDITS MAINTAINER TODO \
+       docs/antlr3.pod docs/overview.pod docs/testing.pod
+
+
 # default
-all: build
+build: build-pct
+
+all: Makefile build pipp$(EXE) installable
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -144,7 +163,7 @@
 	@echo "  test-antlr3:       Run the test suite for 'Pipp antlr3'."
 	@echo "  test-pct:          Run the test suite for 'Pipp pct'."
 	@echo "  test-pmc:          Run the test suite for Pipp's PMCs."
-	@echo "  smolder_test:      Run the PCT test suite and send report to the smolder server" 
+	@echo "  smolder_test:      Run the PCT test suite and send report to the smolder server"
 	@echo ""
 	@echo "Cleaning:"
 	@echo "  clean:             Clean up."
@@ -172,8 +191,6 @@
 	java org.antlr.Tool src/antlr3/Pipp.g
 	java org.antlr.Tool -lib src/antlr3 src/antlr3/GenPastNqp.g
 
-build:           build-pct
-
 build-all:       build-pct build-phc build-antlr3
 
 #build-common:    pmc src/common/pipplib.pbc pipp.pbc $(PHP_EXT) Test.pir
@@ -191,6 +208,9 @@
 pipp$(EXE): build-common
 	$(PBC_TO_EXE) pipp.pbc
 
+installable_pipp$(EXE): build-common
+	$(PBC_TO_EXE) pipp.pbc --install
+
 src/common/pipplib.pbc: src/common/builtins.pir src/common/guts.pir src/common/eval.pir src/common/php_standard.pir $(PHP_SRC_STD_EXT) src/common/php_API.pir src/common/php_MACRO.pir
 	$(PARROT) -o src/common/pipplib.pbc src/common/builtins.pir
 
@@ -203,8 +223,8 @@
 src/common/php_pcre.pbc: src/common/php_pcre.pir src/common/php_MACRO.pir
 	$(PARROT) -o src/common/php_pcre.pbc src/common/php_pcre.pir
 
-src/pct/gen_grammar.pir: $(LIBRARY_DIR)/PGE/Perl6Grammar.pir src/pct/grammar.pg
-	$(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir \
+src/pct/gen_grammar.pir: $(PARROT_LIB)/PGE/Perl6Grammar.pir src/pct/grammar.pg
+	$(PARROT) $(PARROT_LIB)/PGE/Perl6Grammar.pir \
             --output=src/pct/gen_grammar.pir src/pct/grammar.pg
 
 src/pct/gen_actions.pir: $(NQP) $(PCT) src/pct/actions.pm
@@ -233,12 +253,26 @@
 export DYNPMC_INCLUDE=$(PIPPDIR)
 export DYNPMC_LINK=$(HASH_OBJS)
 
-$(PHP_GROUP): $(PMC_SOURCES)
+$(PHP_GROUP): $(PARROT) $(PMC_SOURCES)
 	@cd $(PMCDIR) && $(PMCBUILD) generate $(PMCS)
-	@cd $(PMCDIR) && $(PMCBUILD) compile $(PMCS)
-	@cd $(PMCDIR) && $(PMCBUILD) linklibs $(PMCS)
+	@cd $(PMCDIR) && DYNPMC_INCLUDE=$(PIPPDIR) $(PMCBUILD) compile $(PMCS)
+	@cd $(PMCDIR) && DYNPMC_LINK=$(HASH_OBJS) $(PMCBUILD) linklibs $(PMCS)
 	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(PARROT_DYNEXT)" $(PMCS)
 
+installable : installable_$(HLLNAME)@exe@ pmc $(HLLNAME).pbc src/common/pipplib.pbc $(PHP_EXT)
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+	$(CP) src/common/pipplib.pbc $(PHP_EXT) $(PARROT_LIB)
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+	$(CP) src/common/pipplib.pbc $(PHP_EXT) $(DESTDIR)$(LIB_DIR)/parrot/library
+	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
+#IF(has_pod2man):	$(POD2MAN) docs/pipp.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 test:     all test-pct
 
 test-all: all test-php test-phc test-antlr3 test-pct test-pmc
@@ -279,7 +313,7 @@
 # e.g export PATH=~/devel/PHP/php5/sapi/cli:$PATH
 test-php-qa-testsuite: pipp \
  t/php_qa_testsuite/php5/run-tests.php \
- t/php_qa_testsuite/php5/tests 
+ t/php_qa_testsuite/php5/tests
  #t/php_qa_testsuite/php5/Zend/tests
 	cd t/php_qa_testsuite/php5 && cvs update tests run-tests.php
 	cd t/php_qa_testsuite/php5 && \
@@ -288,7 +322,7 @@
  php run-tests.php -v --keep-all | tee run_tests.log
 
 t/php_qa_testsuite/php5/run-tests.php:
-	cd t/php_qa_testsuite && cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r PHP_5_3 php5/run-tests.php  
+	cd t/php_qa_testsuite && cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r PHP_5_3 php5/run-tests.php
 
 t/php_qa_testsuite/php5/tests:
 	cd t/php_qa_testsuite && cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r PHP_5_3 php5/tests
@@ -305,7 +339,8 @@
   src/common/pipplib.pbc \
   src/common/*.pbc \
   pipp.pbc \
-  pipp.c pipp.o pipp$(EXE)
+  pipp.c pipp@o@ pipp@exe@ \
+  $(PARROT_LIB)/$(HLLNAME).pbc $(HLLNAME)@exe@ installable_*
 
 clean-pmc:
 	$(RM_F) "$(PMCDIR)/*dump" "$(PMCDIR)/*.c" "$(PMCDIR)/pmc_*h" "$(PMCDIR)/php_group.h" "$(PMCDIR)/*$(O)" "$(PMCDIR)/*$(LOAD_EXT)"

Modified: branches/pdd30install_stage3/languages/punie/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/punie/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/punie/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -1,32 +1,46 @@
 # $Id$
 
 # Setup some commands
-LN_S     = @lns@
-PERL     = @perl@
-RM_F     = @rm_f@
-PARROT   = ../../parrot@exe@
+HLLNAME          = punie
+LN_S          = @lns@
+PERL          = @perl@
+RM_F          = @rm_f@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 PGE_DIR       = ../../compilers/pge
 NQP_DIR       = ../../compilers/nqp
-CP       = @cp@
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 PARROT_LIBRARY = ../../runtime/parrot/library
 PGE_LIBRARY   = ../../runtime/parrot/library/PGE
 
+DOCS = MAINTAINER README overview.pod
+
 # the default target
 all: punie.pbc
 
+all: punie.pbc punie@exe@ installable_punie@exe@
+
 SOURCES = punie.pir \
   src/parser/grammar.pg \
   src/parser/actions.pm \
   src/builtins/builtins.pir \
 
 # the default target
-punie.pbc: $(PARROT) $(NQP_DIR)/nqp.pbc $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES)
+punie.pbc:  $(NQP_DIR)/nqp.pbc $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES)
 	$(PARROT) $(PGE_LIBRARY)/Perl6Grammar.pir --output=src/gen_punie.pir src/parser/grammar.pg
 	$(PARROT) $(NQP_DIR)/nqp.pbc --target=pir --output=src/gen_punie-actions.pir src/parser/actions.pm
 	$(PARROT) -o punie.pbc punie.pir
@@ -36,8 +50,12 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               punie.pbc"
+	@echo "  build:             punie.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               punie.pbc punie@exe@"
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  testclean:         Clean up test results."
@@ -56,7 +74,26 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=punie
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ demo.p1
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) punie.pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
 
 testclean:
 	$(RM_F) "t/*.p1" "t/*.out" "t/*.pir"
@@ -73,3 +110,9 @@
 	$(RM_F) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/pynie/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/pynie/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/pynie/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -63,8 +63,12 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               pynie.pbc"
+	@echo "  build:             pynie.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               pynie.pbc pynie@exe@ installable"
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  testclean:         Clean up test results."
@@ -84,6 +88,25 @@
 # this target has nothing to do
 testclean:
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ t/00-parrot/03-op-logic.t
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) pynie.pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 CLEANUPS = \
   pynie.pbc \
   src/gen_grammar.pir \
@@ -96,3 +119,9 @@
 	$(RM_RF) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/regex/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/regex/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/regex/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -2,25 +2,33 @@
 # $Id$
 
 # Makefile for languages/regex
+HLLNAME       = regex
 
 # Set up commands
-PARROT        = ../../parrot@exe@
 PERL          = @perl@
 RM_F          = @rm_f@
 YAPP          = yapp
-PMC_DIR       = pmc
 BUILD_DYNPMC  = $(PERL) @build_dir@/tools/build/dynpmc.pl
-PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 # Set up directories
-LOAD_EXT      = @load_ext@
 BUILD_DIR     = @build_dir@
+PMC_DIR       = pmc
+PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 # set up extensions
+LOAD_EXT      = @load_ext@
 O             = @o@
 
 PMCS = match matchrange
@@ -39,7 +47,7 @@
 regex-compiler.pbc : regex-compiler.pir
 	$(PARROT) -o regex-compiler.pbc regex-compiler.pir
 
-$(PMC_DIR)/match_group$(LOAD_EXT): $(PARROT) $(PMC_SOURCES)
+$(PMC_DIR)/match_group$(LOAD_EXT):  $(PMC_SOURCES)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
@@ -80,3 +88,8 @@
 
 distclean: realclean
 
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/scheme/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/scheme/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/scheme/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -2,6 +2,7 @@
 # $Id$
 
 # Makefile for languages/scheme
+HLLNAME          = scheme
 
 # Set up commands
 PERL          = @perl@
@@ -10,9 +11,17 @@
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
 # Set up directories
 BUILD_DIR     = @build_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
+#PERL_LIB     = @ perl_lib @
 
 # The default target
 default: build
@@ -34,12 +43,22 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=scheme
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # Compilation:
 build:
 	$(PERL) -c schemec
 
+# perl libs where? need @ perl_lib @
+#	-$(MKPATH) $(DESTDIR)$(LIB_DIR)
+#	-$(MKPATH) $(DESTDIR)$(LIB_DIR)/Scheme
+#	$(CP) lib/Scheme.pm $(DESTDIR)$(LIB_DIR)/Scheme.pm
+#	$(CP) lib/Scheme/*.pm $(DESTDIR)$(LIB_DIR)/Scheme
+install : installable
+	$(CP) schemec $(DESTDIR)$(BIN_DIR)/parrot-schemec
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 # cleaning up
 
 clean:
@@ -60,3 +79,9 @@
 # testing
 test:
 	cd .. && $(PERL) scheme/t/harness
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/squaak/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/squaak/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/squaak/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,16 +4,22 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME          = squaak
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot@exe@
+MKPATH        = @mkpath@
+POD2MAN       = @pod2man@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
@@ -27,29 +33,41 @@
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
 PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
+PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
 
-PMC_DIR       = src/pmc
+build: squaak.pbc
 
-all: squaak.pbc
-
-SQUAAK_GROUP = $(PMC_DIR)/squaak_group$(LOAD_EXT)
+all: build squaak@exe@ installable
 
 SOURCES = squaak.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.pir \
-#  $(SQUAAK_GROUP)
 
 BUILTINS_PIR = \
   src/builtins/say.pir \
 
-# PMCS = squaak
-# PMC_SOURCES = $(PMC_DIR)/squaak.pmc
+DOCS = MAINTAINER README \
+  pod/tutorial_episode_1.pod \
+  pod/tutorial_episode_2.pod \
+  pod/tutorial_episode_3.pod \
+  pod/tutorial_episode_4.pod \
+  pod/tutorial_episode_5.pod \
+  pod/tutorial_episode_6.pod \
+  pod/tutorial_episode_7.pod \
+  pod/tutorial_episode_8.pod \
+  pod/tutorial_episode_9.pod
 
 # the default target
-squaak.pbc: $(PARROT) $(SOURCES)
+squaak.pbc:  $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o squaak.pbc squaak.pir
 
+squaak@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir \
@@ -62,23 +80,37 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(SQUAAK_GROUP): $(PARROT) $(PMC_SOURCES)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
-	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(POD2MAN) squaak.pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+installable : installable_$(HLLNAME)@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=squaak
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # 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:               squaak.pbc"
+	@echo "  build:             squaak.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               squaak.pbc squaak.exe installable"
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  testclean:         Clean up test results."
@@ -102,18 +134,7 @@
   squaak.pbc \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.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 \
-
+  src/gen_builtins.pir
 
 clean:
 	$(RM_RF) $(CLEANUPS)
@@ -124,3 +145,8 @@
 distclean: realclean
 
 
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/unlambda/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/unlambda/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/unlambda/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -4,7 +4,14 @@
 # Makefile for languages/unlambda
 
 # configuration settings
-BUILD_DIR       = @build_dir@
+HLLNAME	      = unlambda
+BUILD_DIR     = @build_dir@
+LOAD_EXT      = @load_ext@
+O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 # Set up commands
 PERL            = @perl@
@@ -51,3 +58,9 @@
 # testing
 test: build
 	$(PERL) t/harness
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/languages/urm/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/urm/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/urm/config/makefiles/root.in	Sun Dec 28 05:02:32 2008
@@ -5,30 +5,41 @@
 # Setup of some commands
 RM_F          = @rm_f@
 PERL          = @perl@
-PARROT        = ../../parrot@exe@
 BUILD_DIR     = @build_dir@
 RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)"
+#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib"
+PARROT        = $(SHRPENV) ../../parrot@exe@
 
-default: build
+default: all
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
+	@echo "  all:               This is the default."
 	@echo "  build:             Just check whether 'urmc' compiles"
-	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
 	@echo ""
-	@echo "  test:              run the test suite,"
-	@echo ""
-	@echo "  clean:             clean up temporary files"
-	@echo ""
-	@echo "  realclean:         clean up generated files"
+	@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"
 
+all: build
+
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=urm
@@ -47,6 +58,14 @@
 build: 
 	$(PERL) -c urmc
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : test
+
+install : build
+	$(CP) urmc $(DESTDIR)$(BIN_DIR)/parrot-urmc
+
+installable: build
+
 clean:
 	$(RM_F) \
 		core "*.pbc" "*~" "foo.p*" \
@@ -60,4 +79,11 @@
 
 realclean: clean
 	$(RM_F) Makefile
-	
+
+distclean: clean realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/tools/dev/mk_language_shell.pl
==============================================================================
--- branches/pdd30install_stage3/tools/dev/mk_language_shell.pl	(original)
+++ branches/pdd30install_stage3/tools/dev/mk_language_shell.pl	Sun Dec 28 05:02:32 2008
@@ -142,9 +142,14 @@
 PARROT_ARGS =
 
 ## configuration settings
+LANG          = @lang@
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
+BIN_DIR       = @bin_dir@
+LIB_DIR       = @lib_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
 
 ## Setup some commands
 LN_S          = @lns@
@@ -153,8 +158,10 @@
 CP            = @cp@
 PARROT        = ../../parrot@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+POD2MAN	      = pod2man
 #CONDITIONED_LINE(darwin):
 #CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
 #CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
@@ -183,6 +190,7 @@
 
 # PMCS = @lclang@
 # PMC_SOURCES = $(PMC_DIR)/@lclang@.pmc
+DOCS = MAINTAINER README TODO
 
 # the default target
 @lclang@.pbc: $(PARROT) $(SOURCES)
@@ -207,9 +215,16 @@
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
 
+installable : installable_$(LANG)@exe@ $(@UCLANG@_GROUP)
+	cp installable_$(LANG)@exe@ $(BUILD_DIR)
+	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
+
+installable_$(LANG)@exe@ : $(LANG).pbc
+	$(PBC_TO_EXE) $(LANG).pbc --install
+
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=@lclang@
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(LANG)
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -218,8 +233,12 @@
 	@echo ""
 	@echo "  all:               @lclang@.pbc"
 	@echo "                     This is the default."
+	@echo "  installable:       Create self-hosting binaries."
+	@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:"
@@ -234,6 +253,16 @@
 test: all
 	$(PERL) t/harness
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	echo "1" | ./installable_$(LANG)@exe@
+
+install : installable
+	cp installable_$(LANG)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(LANG)@exe@
+	$(POD2MAN) $(LANG).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(LANG).1
+	mkdir $(DESTDIR)$(DOC_DIR)/languages/$(LANG)
+	cp $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(LANG)
+
 # this target has nothing to do
 testclean:
 
@@ -252,6 +281,8 @@
   $(PMC_DIR)/*.manifest \
   $(PMC_DIR)/*.pdb \
   $(PMC_DIR)/*.lib \
+  $(LANG)@exe@ \
+  installable_$(LANG)@exe@ \
 
 
 clean: testclean



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