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

[svn:parrot] r34502 - in branches/pdd30install_stage3: . config/gen/makefiles languages/APL/config/makefiles languages/PIR/config/makefiles languages/WMLScript/WMLScript languages/WMLScript/config/makefiles languages/WMLScript/runtime languages/Zcode lang

From:
rurban
Date:
December 28, 2008 09:10
Subject:
[svn:parrot] r34502 - in branches/pdd30install_stage3: . config/gen/makefiles languages/APL/config/makefiles languages/PIR/config/makefiles languages/WMLScript/WMLScript languages/WMLScript/config/makefiles languages/WMLScript/runtime languages/Zcode lang
Message ID:
20081228170957.8CE27CB9FA@x12.develooper.com
Author: rurban
Date: Sun Dec 28 09:09:53 2008
New Revision: 34502

Added:
   branches/pdd30install_stage3/languages/WMLScript/WMLScript/   (props changed)
      - copied from r34476, /branches/pdd30install_stage3/languages/WMLScript/runtime/
Removed:
   branches/pdd30install_stage3/languages/WMLScript/runtime/
Modified:
   branches/pdd30install_stage3/MANIFEST
   branches/pdd30install_stage3/VERSION
   branches/pdd30install_stage3/config/gen/makefiles/docs.in
   branches/pdd30install_stage3/config/gen/makefiles/dynoplibs_pl.in
   branches/pdd30install_stage3/config/gen/makefiles/dynpmc.in
   branches/pdd30install_stage3/config/gen/makefiles/dynpmc_pl.in
   branches/pdd30install_stage3/config/gen/makefiles/editor.in
   branches/pdd30install_stage3/config/gen/makefiles/ext.in
   branches/pdd30install_stage3/config/gen/makefiles/json.in
   branches/pdd30install_stage3/config/gen/makefiles/nqp.in
   branches/pdd30install_stage3/config/gen/makefiles/parrot_embed.in
   branches/pdd30install_stage3/config/gen/makefiles/pct.in
   branches/pdd30install_stage3/config/gen/makefiles/pge.in
   branches/pdd30install_stage3/config/gen/makefiles/root.in
   branches/pdd30install_stage3/config/gen/makefiles/tge.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/Zcode/config/makefiles/root.in
   branches/pdd30install_stage3/languages/Zcode/z3.pir
   branches/pdd30install_stage3/languages/Zcode/z3main.pir
   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/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/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/markdown/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/lib/Parrot/Configure/Compiler.pm
   branches/pdd30install_stage3/t/steps/gen_makefiles-01.t

Log:

- [cage] VERSION 0.8.2
- [install] 57548-CONDITIONED_LINE_enh
- [install] finish leftovers from 56554-make-install-lang
- [Zode] prepare ZCode to be installable (single file Zcode.pbc without z3main)



Modified: branches/pdd30install_stage3/MANIFEST
==============================================================================
--- branches/pdd30install_stage3/MANIFEST	(original)
+++ branches/pdd30install_stage3/MANIFEST	Sun Dec 28 09:09:53 2008
@@ -1109,10 +1109,10 @@
 languages/WMLScript/pmc/wmlsinteger.pmc                     [WMLScript]
 languages/WMLScript/pmc/wmlsinvalid.pmc                     [WMLScript]
 languages/WMLScript/pmc/wmlsstring.pmc                      [WMLScript]
-languages/WMLScript/runtime/wmlsconsole.pir                 [WMLScript]
-languages/WMLScript/runtime/wmlsfloat.pir                   [WMLScript]
-languages/WMLScript/runtime/wmlslang.pir                    [WMLScript]
-languages/WMLScript/runtime/wmlsstring.pir                  [WMLScript]
+languages/WMLScript/WMLScript/wmlsconsole.pir               [WMLScript]
+languages/WMLScript/WMLScript/wmlsfloat.pir                 [WMLScript]
+languages/WMLScript/WMLScript/wmlslang.pir                  [WMLScript]
+languages/WMLScript/WMLScript/wmlsstring.pir                [WMLScript]
 languages/WMLScript/src/WMLScript.pir                       [WMLScript]
 languages/WMLScript/src/script.pir                          [WMLScript]
 languages/WMLScript/src/translation.rules                   [WMLScript]

Modified: branches/pdd30install_stage3/VERSION
==============================================================================
--- branches/pdd30install_stage3/VERSION	(original)
+++ branches/pdd30install_stage3/VERSION	Sun Dec 28 09:09:53 2008
@@ -1 +1 @@
-0.8.1
+0.8.2

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 09:09:53 2008
@@ -2,10 +2,10 @@
 # $Id$
 
 # Setup of some commands
-PERL   = @perl@
-RM_F   = @rm_f@
-MKPATH = @mkpath@
-CHMOD  = @chmod@
+PERL      = @perl@
+RM_F      = @rm_f@
+MKPATH    = @mkpath@
+CHMOD     = @chmod@
 PERLDOC   = @perldoc@
 BUILD_DIR = @build_dir@
 RECONFIGURE = $(PERL) tools/dev/reconfigure.pl
@@ -41,8 +41,8 @@
 	$(MKPATH) ops
 
 packfile-c.pod: ../src/packfile.c
-#CONDITIONED_LINE(new_perldoc):	$(PERLDOC) -ud packfile-c.pod ../src/packfile.c 
-#INVERSE_CONDITIONED_LINE(new_perldoc):	$(PERLDOC) -u ../src/packfile.c > packfile-c.pod
+#IF(new_perldoc):	$(PERLDOC) -ud packfile-c.pod ../src/packfile.c
+#ELSE:	$(PERLDOC) -u ../src/packfile.c > packfile-c.pod
 
 clean:
 	$(RM_F) packfile-c.pod $(POD)
@@ -53,3 +53,8 @@
 html-clean:
 	$(PERL) -I../lib -MParrot::Distribution -e "Parrot::Distribution->new()->delete_html_docs()"
 
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/config/gen/makefiles/dynoplibs_pl.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/dynoplibs_pl.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/dynoplibs_pl.in	Sun Dec 28 09:09:53 2008
@@ -32,7 +32,7 @@
 our $CFLAGS = q[@ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@];
 
 our $LIBPARROT = q[];
-#CONDITIONED_LINE(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
+#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
 
 # Here comes some stuff for Win32.
 our $PATHQUOTE = q[];
@@ -53,8 +53,8 @@
              $PATHQUOTE;
 our %cores = (
     C       => q[],
-#CONDITIONED_LINE(cg_flag):   CGP     => '_cgp',
-#CONDITIONED_LINE(cg_flag):   CGoto   => '_cg',
+#IF(cg_flag):   CGP     => '_cgp',
+#IF(cg_flag):   CGoto   => '_cg',
     CSwitch => '_switch'
 );
 

Modified: branches/pdd30install_stage3/config/gen/makefiles/dynpmc.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/dynpmc.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/dynpmc.in	Sun Dec 28 09:09:53 2008
@@ -14,30 +14,30 @@
   dynlexpad \
   foo \
   rotest \
-#CONDITIONED_LINE(has_gdbm):  gdbmhash \
+#IF(has_gdbm):  gdbmhash \
   rational \
-#CONDITIONED_LINE(has_crypto):  md2 \
-#CONDITIONED_LINE(has_crypto):  md4 \
-#CONDITIONED_LINE(has_crypto):  md5 \
-#CONDITIONED_LINE(has_crypto):  ripemd160 \
-#CONDITIONED_LINE(has_crypto):  sha \
-#CONDITIONED_LINE(has_crypto):  sha1 \
-#CONDITIONED_LINE(has_crypto):  sha256 \
-#CONDITIONED_LINE(has_crypto):  sha512 \
+#IF(has_crypto):  md2 \
+#IF(has_crypto):  md4 \
+#IF(has_crypto):  md5 \
+#IF(has_crypto):  ripemd160 \
+#IF(has_crypto):  sha \
+#IF(has_crypto):  sha1 \
+#IF(has_crypto):  sha256 \
+#IF(has_crypto):  sha512 \
   subproxy 
 
 BUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl
 
 # some *.pmc file are generated
 GEN_PMC_DEFINITIONS = \
-#CONDITIONED_LINE(has_crypto):  md2.pmc \
-#CONDITIONED_LINE(has_crypto):  md4.pmc \
-#CONDITIONED_LINE(has_crypto):  md5.pmc \
-#CONDITIONED_LINE(has_crypto):  ripemd160.pmc \
-#CONDITIONED_LINE(has_crypto):  sha.pmc \
-#CONDITIONED_LINE(has_crypto):  sha1.pmc \
-#CONDITIONED_LINE(has_crypto):  sha256.pmc \
-#CONDITIONED_LINE(has_crypto):  sha512.pmc
+#IF(has_crypto):  md2.pmc \
+#IF(has_crypto):  md4.pmc \
+#IF(has_crypto):  md5.pmc \
+#IF(has_crypto):  ripemd160.pmc \
+#IF(has_crypto):  sha.pmc \
+#IF(has_crypto):  sha1.pmc \
+#IF(has_crypto):  sha256.pmc \
+#IF(has_crypto):  sha512.pmc
 
 all :
 	@$(BUILD) generate $(PMCS)

Modified: branches/pdd30install_stage3/config/gen/makefiles/dynpmc_pl.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/dynpmc_pl.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/dynpmc_pl.in	Sun Dec 28 09:09:53 2008
@@ -36,7 +36,7 @@
 our $CFLAGS = q[@ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@];
 
 our $LIBPARROT = q[];
-#CONDITIONED_LINE(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
+#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
 
 # Here comes some stuff for Win32.
 our $PATHQUOTE = '';

Modified: branches/pdd30install_stage3/config/gen/makefiles/editor.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/editor.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/editor.in	Sun Dec 28 09:09:53 2008
@@ -1,8 +1,8 @@
 # $Id$
 
 OPS_DIR     = ../src/ops
-#CONDITIONED_LINE(win32):VIM_DIR     = $(USERPROFILE)/vimfiles
-#INVERSE_CONDITIONED_LINE(win32):VIM_DIR     = $(HOME)/.vim
+#IF(win32):VIM_DIR     = $(USERPROFILE)/vimfiles
+#IF(win32):VIM_DIR     = $(HOME)/.vim
 VIM_FT_DIR  = $(VIM_DIR)/plugin
 VIM_IN_DIR  = $(VIM_DIR)/indent
 VIM_SYN_DIR = $(VIM_DIR)/syntax

Modified: branches/pdd30install_stage3/config/gen/makefiles/ext.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/ext.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/ext.in	Sun Dec 28 09:09:53 2008
@@ -59,10 +59,10 @@
 Parrot-Embed : Parrot-Embed.dummy
 
 Parrot-Embed.dummy:
-#CONDITIONED_LINE(win32):	- cd Parrot-Embed && $(PERL) Makefile.PL && nmake
-#INVERSE_CONDITIONED_LINE(win32):	- cd Parrot-Embed && $(PERL) Makefile.PL && $(MAKE)
+#IF(win32):	- cd Parrot-Embed && $(PERL) Makefile.PL && nmake
+#UNLESS(win32):	- cd Parrot-Embed && $(PERL) Makefile.PL && $(MAKE)
 
 Parrot-Embed.clean:
-#CONDITIONED_LINE(win32):	- cd Parrot-Embed && nmake clean
-#INVERSE_CONDITIONED_LINE(win32):	- cd Parrot-Embed && $(MAKE) clean
+#IF(win32):	- cd Parrot-Embed && nmake clean
+#UNLESS(win32):	- cd Parrot-Embed && $(MAKE) clean
 

Modified: branches/pdd30install_stage3/config/gen/makefiles/json.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/json.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/json.in	Sun Dec 28 09:09:53 2008
@@ -3,13 +3,21 @@
 PERL     = @perl@
 RM_F     = @rm_f@
 PARROT   = ../../parrot@exe@
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
 
 TOOL_DIR = ../..
 PGE_DIR  = ../../compilers/pge
 TGE_DIR  = ../../compilers/tge
 
 # the default target
-all: JSON.pbc
+build: JSON.pbc
+
+all: JSON.pbc Makefile
+
+# regenerate the Makefile
+Makefile: @build_dir@/config/gen/makefiles/json.in
+	cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/json/Makefile
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -52,3 +60,9 @@
 
 clean : testclean
 	@rm_f@ "JSON/*.pbc" "JSON/*.pir" JSON.pbc
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/config/gen/makefiles/nqp.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/nqp.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/nqp.in	Sun Dec 28 09:09:53 2008
@@ -4,11 +4,15 @@
 PERL     = @perl@
 RM_F     = @rm_f@
 PARROT   = ../../parrot@exe@
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
 
 PARROT_LIBRARY = @build_dir@/runtime/parrot/library
-PGE_LIBRARY  = @build_dir@/runtime/parrot/library/PGE
+PGE_LIBRARY    = @build_dir@/runtime/parrot/library/PGE
 
-all: nqp.pbc
+build: nqp.pbc
+
+all: nqp.pbc Makefile
 
 SOURCES = nqp.pir \
   src/Grammar.pg \
@@ -71,3 +75,9 @@
 	$(RM_F) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/config/gen/makefiles/parrot_embed.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/parrot_embed.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/parrot_embed.in	Sun Dec 28 09:09:53 2008
@@ -15,7 +15,7 @@
 $config{PARROT}          = '..@slash@..@slash@parrot@exe@';
 $config{C_LIBS}          = '@libs@';
 $config{INCLUDE}         = "$config{PARROTDIR}/include";
-#INVERSE_CONDITIONED_LINE(win32):$config{ALL_PARROT_LIBS} = "@libparrot_ldflags@ $config{C_LIBS}";
+#UNLESS(win32):$config{ALL_PARROT_LIBS} = "@libparrot_ldflags@ $config{C_LIBS}";
 $config{ABS_PARROTDIR}   = Cwd::realpath(
                                File::Spec->rel2abs( $config{PARROTDIR} ) );
 $config{LDDLFLAGS}       = $Config{lddlflags};
@@ -30,9 +30,9 @@
     'NAME'         => 'Parrot::Embed',
     'VERSION_FROM' => 'lib/Parrot/Embed.pm',
     'PREREQ_PM'    => { 'ExtUtils::CBuilder' => 0 },
-#CONDITIONED_LINE(win32):    'LIBS'         => [ $config{C_LIBS} ],
-#CONDITIONED_LINE(win32):    'OBJECT'       => "@libparrot_ldflags@ Embed@o@",
-#INVERSE_CONDITIONED_LINE(win32):    'LIBS'         => [ $config{ALL_PARROT_LIBS} ],
+#IF(win32):    'LIBS'         => [ $config{C_LIBS} ],
+#IF(win32):    'OBJECT'       => "@libparrot_ldflags@ Embed@o@",
+#UNLESS(win32):    'LIBS'         => [ $config{ALL_PARROT_LIBS} ],
     'INC'          => "-I$config{INCLUDE}",
     'PM'           => { map { $_ => "blib/$_" } <lib/Parrot/*pm> },
     'clean'        => { FILES => '*.xs t/greet.pbc' },

Modified: branches/pdd30install_stage3/config/gen/makefiles/pct.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/pct.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/pct.in	Sun Dec 28 09:09:53 2008
@@ -9,6 +9,8 @@
 PGE_DIR  = ../../compilers/pge
 TEST_DIR = ../../t/compilers/pct
 CP       = @cp@
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
 
 # Where to put things
 PARROT_LIBRARY    = ../../runtime/parrot/library
@@ -30,7 +32,9 @@
   src/POST/Node.pir
 
 # the default target
-all: $(PARROT_LIBRARY)/PCT.pbc
+build: $(PARROT_LIBRARY)/PCT.pbc
+
+all: build Makefile
 
 $(PARROT_LIBRARY)/PCT.pbc: $(PARROT) $(PCT_SOURCES)
 	$(PARROT) -o $(PARROT_LIBRARY)/PCT.pbc --output-pbc PCT.pir
@@ -38,6 +42,10 @@
 	$(PARROT) -o $(PARROT_LIBRARY)/PCT/Grammar.pbc --output-pbc src/PCT/Grammar.pir
 	$(PARROT) -o $(PARROT_LIBRARY)/PCT/HLLCompiler.pbc --output-pbc src/PCT/HLLCompiler.pir
 
+# regenerate the Makefile
+Makefile: @build_dir@/config/gen/makefiles/pct.in
+	cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pct/Makefile
+
 # This is a listing of all targets, that are meant to be called by users
 help:
 	@echo ""
@@ -72,3 +80,9 @@
 	$(RM_F) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/config/gen/makefiles/pge.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/pge.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/pge.in	Sun Dec 28 09:09:53 2008
@@ -7,12 +7,16 @@
 PARROT   = ../../parrot@exe@
 TOOL_DIR = ../..
 CP       = @cp@
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
 
 # Where to put things
 PARROT_LIBRARY    = ../../runtime/parrot/library
 
 # the default target
-all: $(PARROT_LIBRARY)/PGE.pbc
+build: $(PARROT_LIBRARY)/PGE.pbc
+
+all: build Makefile
 
 SOURCES = PGE.pir \
   PGE/Exp.pir \
@@ -30,10 +34,14 @@
 	$(RM_F) PGE.pbc $(PARROT_LIBRARY)/PGE.pbc
 	$(PERL) -e "" >PGE/builtins_gen.pir
 	$(PARROT) -o PGE.pbc --output-pbc PGE.pir
-	$(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir  --output=PGE/builtins_gen.pir PGE/builtins.pg
+	$(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg
 	$(RM_F) PGE.pbc
 	$(PARROT) -o PGE.pbc --output-pbc PGE.pir
 
+# regenerate the Makefile
+Makefile: @build_dir@/config/gen/makefiles/pge.in
+	cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pge/Makefile
+
 # This is a listing of all targets, that are meant to be called by users
 help:
 	@echo ""
@@ -75,3 +83,9 @@
 	$(RM_F) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

Modified: branches/pdd30install_stage3/config/gen/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/root.in	Sun Dec 28 09:09:53 2008
@@ -106,7 +106,7 @@
 RECONFIGURE      = $(PERL) tools/dev/reconfigure.pl
 INNO_SETUP       = iscc
 JIT_BUILD_TOOL   = $(BUILD_TOOLS_DIR)/jit2c.pl
-#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ###############################################################################
 #
@@ -139,7 +139,7 @@
 
 GEN_MAKEFILES = \
     Makefile \
-#CONDITIONED_LINE(has_perldoc):    docs/Makefile \
+#IF(has_perldoc):    docs/Makefile \
     compilers/bcg/Makefile \
     compilers/json/Makefile \
     compilers/ncigen/Makefile \
@@ -166,9 +166,9 @@
     lib/Parrot/PMC.pm \
     runtime/parrot/include/config.fpmc \
     $(SRC_DIR)/platform.c \
-#CONDITIONED_LINE(platform_asm):    $(SRC_DIR)/platform_asm.s \
-#CONDITIONED_LINE(has_opengl):    config/gen/call_list/opengl.in \
-#CONDITIONED_LINE(has_glut):    $(SRC_DIR)/glut_callbacks.c \
+#IF(platform_asm):    $(SRC_DIR)/platform_asm.s \
+#IF(has_opengl):    config/gen/call_list/opengl.in \
+#IF(has_glut):    $(SRC_DIR)/glut_callbacks.c \
     $(SRC_DIR)/core_pmcs.c \
     CFLAGS \
     $(IMCC_DIR)/CFLAGS \
@@ -185,8 +185,8 @@
 
 GEN_PASM_INCLUDES = \
     runtime/parrot/include/signal.pasm \
-#CONDITIONED_LINE(has_opengl):    runtime/parrot/include/opengl_defines.pasm \
-#CONDITIONED_LINE(has_opengl):    runtime/parrot/library/OpenGL_funcs.pir \
+#IF(has_opengl):    runtime/parrot/include/opengl_defines.pasm \
+#IF(has_opengl):    runtime/parrot/library/OpenGL_funcs.pir \
     @TEMP_gen_pasm_includes@
 
 CONFIGURE_GENERATED_FILES = \
@@ -254,7 +254,7 @@
     $(LIBRARY_DIR)/MIME/Base64.pbc \
     $(LIBRARY_DIR)/NCI/call_toolkit_init.pbc \
     $(LIBRARY_DIR)/ncurses.pbc \
-#CONDITIONED_LINE(has_opengl):    $(LIBRARY_DIR)/OpenGL.pbc \
+#IF(has_opengl):    $(LIBRARY_DIR)/OpenGL.pbc \
     $(LIBRARY_DIR)/P6object.pbc \
     $(LIBRARY_DIR)/parrotlib.pbc \
     $(LIBRARY_DIR)/pcre.pbc \
@@ -378,7 +378,7 @@
     $(OPS_DIR)/core_ops$(O) \
     $(OPS_DIR)/core_ops_switch$(O) \
     \
-#CONDITIONED_LINE(i386_has_gcc_cmpxchg):    $(SRC_DIR)/atomic/gcc_x86$(O) \
+#IF(i386_has_gcc_cmpxchg):    $(SRC_DIR)/atomic/gcc_x86$(O) \
     $(SRC_DIR)/byteorder$(O) \
     $(SRC_DIR)/charset$(O) \
     $(SRC_DIR)/core_pmcs$(O) \
@@ -450,7 +450,7 @@
     @TEMP_atomic_o@ \
     @TEMP_jit_o@ \
     @TEMP_gc_o@ \
-#CONDITIONED_LINE(platform_asm):    $(SRC_DIR)/platform_asm$(O) \
+#IF(platform_asm):    $(SRC_DIR)/platform_asm$(O) \
 
 O_FILES = \
     $(INTERP_O_FILES) \
@@ -493,14 +493,15 @@
 
 # Libraries
 LIBPARROT_STATIC    = @blib_dir@/@libparrot_static@
-#CONDITIONED_LINE(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH)
-#CONDITIONED_LINE(win32):LIBPARROT_SHARED  = @libparrot_shared@
-#INVERSE_CONDITIONED_LINE(win32):LIBPARROT_SHARED  = @blib_dir@/@libparrot_shared@
+#IF(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH)
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
+#IF(cygwin or win32):LIBPARROT_SHARED    = @libparrot_shared@
+#ELSE:LIBPARROT_SHARED    = @blib_dir@/@libparrot_shared@
 
 # This line controls whether a static or shared library is built
 LIBPARROT           = @libparrot@
 
-#CONDITIONED_LINE(has_icu):ICU_SHARED  = @icu_shared@
+#IF(has_icu):ICU_SHARED  = @icu_shared@
 ALL_PARROT_LIBS     = @libparrot_ldflags@ $(ICU_SHARED) $(C_LIBS)
 
 # dynamic extensions
@@ -555,7 +556,7 @@
 #
 ###############################################################################
 
-all : \
+build : \
     flags_dummy \
     PARROT_LIBS \
     $(PARROT) \
@@ -563,7 +564,7 @@
     runtime/parrot/include/config.fpmc \
     docs \
     $(LIBNCI_TEST_SO) \
-#CONDITIONED_LINE(has_glut):    $(LIBGLUTCB_SO) \
+#IF(has_glut):    $(LIBGLUTCB_SO) \
     $(GEN_LIBRARY) \
     dynpmc \
     dynoplibs \
@@ -573,6 +574,8 @@
     $(DIS) \
     $(PBCMERGE)
 
+all : build parrot_utils installable $(PERL6) languages
+
 $(GEN_LIBRARY) : $(PARROT)
 
 # constant string support
@@ -701,7 +704,7 @@
 	@echo ""
 	@echo "Smoke Testing:"
 	@echo "  smoke:             Run the test suite and send smoke.html to "
-	@echo "                     http:////smoke.parrotcode.org//"
+	@echo "                     http:////smoke.parrotcode.org/"
 	@echo "  smokej:            Same as smoke, but with JIT runcore"
 	@echo "  smokeexec:         Same as smoke, but generate first executables"
 	@echo "                     with the exec runcore"
@@ -769,7 +772,8 @@
 
 parrot_utils : $(PDUMP) $(DIS) $(PINFO) $(PDB) $(PBCMERGE) $(PBC_TO_EXE) $(PARROT_CONFIG)
 
-installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPINFO) $(INSTALLABLEPDB) $(INSTALLABLEPBCMERGE) $(INSTALLABLECONFIG)
+installable: build parrot_utils $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) \
+             $(INSTALLABLEPINFO) $(INSTALLABLEPDB) $(INSTALLABLEPBCMERGE) $(INSTALLABLECONFIG)
 
 
 flags_dummy :
@@ -780,7 +784,6 @@
 	$(PARROT) -o $@ runtime/parrot/library/parrotlib.pir
 
 runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(MINIPARROT)
-	@cygchkdll@
 	@echo Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross your fingers
 	$(MINIPARROT) config_lib.pasm > $@
 
@@ -790,7 +793,7 @@
 	$(LINK) @ld_out@$@ \
 	$(SRC_DIR)/main$(O) $(SRC_DIR)/parrot_config$(O) \
 	@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 pbc_to_exe.pir : $(PARROT) tools/dev/pbc_to_exe_gen.pl
 	$(PERL) tools/dev/pbc_to_exe_gen.pl \
@@ -802,10 +805,14 @@
 
 $(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
 	$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
-	$(PARROT) pbc_to_exe.pbc parrot_config.pbc
+	$(PARROT) pbc_to_exe.pir parrot_config.pbc
+
+$(INSTALLABLECONFIG) : $(SRC_DIR)/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE)
+	$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
+	$(PBC_TO_EXE) parrot_config.pbc --install
 
 # HLL Executable targets
-#CONDITIONED_LINE(win32):perl6 : $(PERL6)
+#IF(win32 or cygwin):perl6 : $(PERL6)
 
 $(PERL6) : compilers $(PBC_TO_EXE)
 	$(MAKE) languages/perl6 perl6$(EXE)
@@ -813,19 +820,21 @@
 	$(CHMOD) 0755 $(PERL6)
 	$(PERL6) -e"say 'Hello, world.'"
 
+
+# build the real miniparrot
 $(MINIPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
     lib/Parrot/OpLib/core.pm $(SRC_DIR)/null_config$(O)
 	$(LINK) @ld_out@$@ $(SRC_DIR)/main$(O) $(SRC_DIR)/null_config$(O) \
 	@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 $(INSTALLABLEPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
     lib/Parrot/OpLib/core.pm $(SRC_DIR)/install_config$(O) \
     $(PARROT)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/main$(O) \
-    $(ALL_PARROT_LIBS) $(LINKFLAGS) $(SRC_DIR)/install_config$(O)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+    $(SRC_DIR)/main$(O) $(SRC_DIR)/install_config$(O) \
+    $(ALL_PARROT_LIBS) $(LINKFLAGS)
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 $(INC_DIR)/parrot.h : $(INC_DIR)/pbcversion.h $(INC_DIR)/vtable.h
 
@@ -883,27 +892,23 @@
 # so always delete the lib -leo
 
 PARROT_LIBS: \
-#CONDITIONED_LINE(has_static_linking):  $(LIBPARROT_STATIC) \
-#CONDITIONED_LINE(has_dynamic_linking): $(LIBPARROT_SHARED)
+#IF(has_static_linking):  $(LIBPARROT_STATIC) \
+#IF(has_dynamic_linking): $(LIBPARROT_SHARED)
 
 $(LIBPARROT_STATIC) : $(O_FILES)
 	$(MKPATH) @blib_dir@
 	$(AR_CR) @ar_out@$@ @ar_extra@ $(O_FILES)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
 	$(RANLIB) $@
 
 $(LIBPARROT_SHARED) : $(O_FILES)
 	$(MKPATH) @blib_dir@
 	$(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) @ld_out@$@ @libparrot_soname@ \
-#CONDITIONED_LINE(cygchkdll):		-Wl,--out-implib=blib/lib/libparrot.dll.a \
+#IF(cygwin or msys or mingw):		-Wl,--out-implib=libparrot.dll.a \
 		$(O_FILES) $(C_LIBS) $(ICU_SHARED)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
-#CONDITIONED_LINE(libparrot_shared_alias):	( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ )
-
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
+#IF(libparrot_shared_alias):	( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ )
 
-$(INSTALLABLECONFIG) : $(SRC_DIR)/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE)
-	$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
-	$(PBC_TO_EXE) parrot_config.pbc --install
 
 #
 # Parrot Debugger
@@ -916,14 +921,14 @@
     $(SRC_DIR)/parrot_debugger$(O) \
     $(SRC_DIR)/parrot_config$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
-$(INSTALLABLEPDB) : $(SRC_DIR)/parrot_debugger$(O) $(LIBPARROT) $(SRC_DIR)/parrot_config$(O)
+$(INSTALLABLEPDB) : $(SRC_DIR)/parrot_debugger$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/parrot_debugger$(O) \
     $(SRC_DIR)/parrot_config$(O) \
     $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 #
 # Parrot Disassembler
@@ -935,13 +940,13 @@
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_disassemble$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 $(INSTALLABLEDIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_disassemble$(O) \
     $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 #
 # Parrot Dump
@@ -951,7 +956,7 @@
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pdump$(O) \
     $(SRC_DIR)/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 $(SRC_DIR)/pdump$(O) : $(GEN_HEADERS)
 
@@ -959,7 +964,7 @@
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pdump$(O) \
     $(SRC_DIR)/packdump$(O) $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 
 # pbc_info
@@ -967,7 +972,7 @@
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_info$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 $(SRC_DIR)/pbc_info$(O) : $(GEN_HEADERS)
 
@@ -975,7 +980,7 @@
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_info$(O) \
     $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 #
 # Parrot Bytecode File Merger
@@ -986,14 +991,14 @@
     $(SRC_DIR)/pbc_merge$(O) \
     $(SRC_DIR)/parrot_config$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 $(INSTALLABLEPBCMERGE) : $(SRC_DIR)/pbc_merge$(O) $(LIBPARROT) $(INSTALLABLECONFIG)
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_merge$(O) \
     $(SRC_DIR)/install_config$(O) \
     $(ALL_PARROT_LIBS) $(LINKFLAGS)
-#CONDITIONED_LINE(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 
 ###############################################################################
@@ -1008,19 +1013,8 @@
     lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip
 	$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl $(OPS_FILES)
 
-# FIXME: This creates a cycle sometimes
-#lib/Parrot/Config/Generated.pm \
-#    $(SRC_DIR)/platform.c \
-##CONDITIONED_LINE(platform_asm):    $(SRC_DIR)/platform_asm.s \
-##CONDITIONED_LINE(has_opengl):    config/gen/call_list/opengl.in \
-##CONDITIONED_LINE(has_glut):    $(SRC_DIR)/glut_callbacks.c \
-#    config_lib.pasm \
-#    $(BUILD_TOOLS_DIR)/dynpmc.pl \
-#    $(BUILD_TOOLS_DIR)/dynoplibs.pl \
-# : Configure.pl lib/Parrot/Configure.pm \
-#   lib/Parrot/Configure/Step/List.pm lib/Parrot/Configure/Step/Methods.pm
-#	@echo "  Makefile out-of-date: reconfigure"
-#	$(PERL) Configure.pl $(CONFIG_ARGS)
+Makefile : config/gen/makefiles/root.in
+	$(PERL) tools/dev/reconfigure.pl --step=gen::makefiles --target=Makefile
 
 ###############################################################################
 #
@@ -1114,8 +1108,8 @@
 
 $(SRC_DIR)/platform$(O) : $(GENERAL_H_FILES)
 
-#CONDITIONED_LINE(platform_asm):$(SRC_DIR)/platform_asm$(O) : $(GENERAL_H_FILES)
-#CONDITIONED_LINE(platform_asm):
+#IF(platform_asm):$(SRC_DIR)/platform_asm$(O) : $(GENERAL_H_FILES)
+#IF(platform_asm):
 $(SRC_DIR)/core_pmcs$(O) : $(GENERAL_H_FILES)
 
 $(SRC_DIR)/trace$(O) : $(GENERAL_H_FILES)
@@ -1306,11 +1300,11 @@
 #
 ###############################################################################
 
-#CONDITIONED_LINE(has_perldoc):docs : docs.dummy
-#INVERSE_CONDITIONED_LINE(has_perldoc):docs : docs.stub
+#IF(has_perldoc):docs : docs.dummy
+#ELSE:docs : docs.stub
 
-#CONDITIONED_LINE(has_perldoc):html : html.dummy
-#INVERSE_CONDITIONED_LINE(has_perldoc):html : html.stub
+#IF(has_perldoc):html : html.dummy
+#ELSE:html : html.stub
 
 html.stub:
 	@echo "Perldoc is required, but not detected."
@@ -1506,10 +1500,10 @@
 # when the needed runcores are available
 fulltest :
 	-@make@ testb \
-#CONDITIONED_LINE(cg_flag):	testC \
+#IF(cg_flag):	testC \
 	testf \
-#CONDITIONED_LINE(cg_flag):	testg \
-#CONDITIONED_LINE(cg_flag):	testj \
+#IF(cg_flag):	testg \
+#IF(cg_flag):	testj \
 	testr \
 	testS \
 	src_tests \
@@ -1625,15 +1619,15 @@
     prog-clean \
     dynext-clean \
     languages-clean \
-#CONDITIONED_LINE(has_perldoc):    docs-clean \
-#CONDITIONED_LINE(has_perldoc):    html-clean \
+#IF(has_perldoc):    docs-clean \
+#IF(has_perldoc):    html-clean \
     dynpmc-clean \
     dynoplibs-clean \
     examples-clean \
     imcc-clean \
     compilers-clean \
     smoke-clean \
-#INVERSE_CONDITIONED_LINE(win32):    cover-clean \
+#UNLESS(win32):    cover-clean \
     editor-clean
 	@TEMP_cg_r@
 	$(RM_F) chartypes "*.s" "*~"
@@ -1676,7 +1670,9 @@
     $(SRC_DIR)/string_private_cstring.h \
     "$(SRC_DIR)/*.str" "$(SRC_DIR)/io/*.str" "$(SRC_DIR)/pmc/*.str" \
     "src/pmc/*.c" "src/pmc/pmc_*.h" "src/pmc/*.dump" \
-    vtable.dump "*.def" "*.lib" "*.exp"
+    vtable.dump \
+#IF(win32):    "*.def" "*.lib" "*.exp" \
+#IF(cygwin):   "*.stackdump" \
 
 archclean: dynoplibs-clean dynpmc-clean dynext-clean
 	$(RM_F) \
@@ -1724,12 +1720,12 @@
 	$(RM_F) \
     "$(DYNEXT_DIR)/*$(LOAD_EXT)" \
     "$(DYNEXT_DIR)/*$(SHARE_EXT)" \
-    "$(DYNEXT_DIR)/*.lib" \
-    "*.pdb" "$(DYNEXT_DIR)/*.pdb" \
-    "*.ilk" "$(DYNEXT_DIR)/*.ilk" \
-    "*.exp" "$(DYNEXT_DIR)/*.exp" \
-    "*.def" "$(DYNEXT_DIR)/*.def" \
-    "*.manifest" "$(DYNEXT_DIR)/*.manifest"
+#IF(win32):    "$(DYNEXT_DIR)/*.lib" \
+#IF(win32):    "*.pdb" "$(DYNEXT_DIR)/*.pdb" \
+#IF(win32):    "*.ilk" "$(DYNEXT_DIR)/*.ilk" \
+#IF(win32):    "*.exp" "$(DYNEXT_DIR)/*.exp" \
+#IF(win32):    "*.def" "$(DYNEXT_DIR)/*.def" \
+#IF(win32):    "*.manifest" "$(DYNEXT_DIR)/*.manifest"
 
 # Remove files generated by the test suite
 # XXX Is there a danger of too long command lines in the $(RM_F) commands,
@@ -1741,21 +1737,26 @@
     "t/compilers/*/*.pbc" \
     "t/compilers/*/*_pbcexe*" \
     "t/compilers/*/*.pir" \
-    "t/compilers/*/*.stabs.s"
+    "t/compilers/*/*.stabs.s" \
+    "t/compilers/*/*.stackdump"
 	$(RM_F) \
     "t/compilers/*/*/*.out" \
     "t/compilers/*/*/*.pasm" \
     "t/compilers/*/*/*.pbc" \
     "t/compilers/*/*/*_pbcexe*" \
     "t/compilers/*/*/*.pir" \
-    "t/compilers/*/*/*.stabs.s"
+    "t/compilers/*/*/*.stabs.s" \
+    "t/compilers/*/*/*.stackdump"
+	$(RM_F) \
+    "t/examples/*.past"
 	$(RM_F) \
     "t/*/*$(O)" \
     "t/*/*.out" \
     "t/*/*.pasm" \
     "t/*/*_pbcexe*" \
     "t/*/*.pir" \
-    "t/*/*.stabs.s"
+    "t/*/*.stabs.s" \
+    "t/*/*.stackdump"
 	$(RM_F) \
     "t/library/*.pbc" \
     "t/dynoplibs/*.pbc" \
@@ -1767,14 +1768,16 @@
 	$(RM_F) \
     "t/src/*.c" \
     "t/src/*.pdb" \
-    "t/src/*.manifest"
+    "t/src/*.manifest" \
+    "t/src/*.stackdump"
 	$(RM_F) \
      "t/tools/pmc2c.t_*" \
      "t/tools/pmc2c.pmc_t_*" \
      "t/tools/parrot_debugger.t.*"
 	$(RM_F) \
      "test$(EXE)" \
-     "test.*"
+     "test.*" \
+     "*.stackdump"
 	$(RM_F) \
      "parrot_test_run.tar.gz"
 
@@ -2093,10 +2096,10 @@
 cover: \
     cover.dummy \
     cover-testb \
-#CONDITIONED_LINE(cg_flag):    cover-testC \
+#IF(cg_flag):    cover-testC \
     cover-testf \
-#CONDITIONED_LINE(cg_flag):    cover-testg \
-#CONDITIONED_LINE(jitcapable):    cover-testj \
+#IF(cg_flag):    cover-testg \
+#IF(jitcapable):    cover-testj \
     cover-testr \
     cover-testS \
     cover-src \

Modified: branches/pdd30install_stage3/config/gen/makefiles/tge.in
==============================================================================
--- branches/pdd30install_stage3/config/gen/makefiles/tge.in	(original)
+++ branches/pdd30install_stage3/config/gen/makefiles/tge.in	Sun Dec 28 09:09:53 2008
@@ -6,13 +6,17 @@
 PERL     = @perl@
 RM_F     = @rm_f@
 PARROT   = ../../parrot@exe@
+RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
+#IF(parrot_is_shared and !(cygwin|win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
 
 # Where to put things
 PARROT_LIBRARY    = ../../runtime/parrot/library
 PERL6GRAMMAR      = $(PARROT_LIBRARY)/PGE/Perl6Grammar.pbc
 
 # the default target
-all: $(PARROT_LIBRARY)/TGE.pbc
+build: $(PARROT_LIBRARY)/TGE.pbc
+
+all: $(PARROT_LIBRARY)/TGE.pbc Makefile
 
 $(PARROT_LIBRARY)/TGE.pbc: TGE.pir TGE/Rule.pbc TGE/Parser.pbc TGE/Grammar.pbc TGE/Compiler.pbc TGE/Tree.pbc
 	$(PARROT) -o $(PARROT_LIBRARY)/TGE.pbc --output-pbc TGE.pir
@@ -21,7 +25,11 @@
 	$(PARROT) -o $@ --output-pbc $<
 
 TGE/Parser.pir: TGE/Parser.pg
-	$(PARROT) $(PERL6GRAMMAR) --output=TGE//Parser.pir TGE//Parser.pg
+	$(PARROT) $(PERL6GRAMMAR) --output=TGE/Parser.pir TGE/Parser.pg
+
+# regenerate the Makefile
+Makefile: @build_dir@/config/gen/makefiles/tge.in
+	cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/tge/Makefile
 
 # This is a listing of all targets, that are meant to be called by users
 help:
@@ -62,3 +70,9 @@
 	$(RM_F) Makefile
 
 distclean: 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 09:09:53 2008
@@ -19,28 +19,32 @@
 RM_F          = @rm_f@
 CP            = @cp@
 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@
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
 
-all: APL.pbc
+build: APL.pbc
+
+all: build Makefile $(HLLNAME)@exe@ installable
 
 APL_GROUP = $(PMC_DIR)/apl_group$(LOAD_EXT)
 
@@ -55,9 +59,11 @@
 DOCS = MAINTAINER README STATUS
 
 # the default target
-APL.pbc:  $(SOURCES) $(APL_GROUP)
+APL.pbc: $(SOURCES) $(APL_GROUP)
 	$(PARROT) $(PARROT_ARGS) -o APL.pbc APL.pir
 
+all: APL.pbc Makefile $(HLLNAME)@exe@ installable
+
 $(HLLNAME)@exe@: $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc
 
@@ -74,14 +80,15 @@
 src/gen_builtins.pir: tools/gen_operator_defs.pl
 	$(PERL) tools/gen_operator_defs.pl >src/gen_builtins.pir
 
-$(APL_GROUP):  $(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)
+installable : installable_$(HLLNAME)@exe@ $(ABC_GROUP) $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
 
 installable_$(HLLNAME)@exe@: $(HLLNAME).pbc
@@ -96,8 +103,10 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               APL.pbc"
+	@echo "  build:             APL.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               APL.pbc APL@exe@ installable"
+	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           install the installable targets and docs."
 	@echo ""
 	@echo "Testing:"
@@ -123,8 +132,9 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
@@ -136,6 +146,7 @@
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.pir \
+  $(PARROT_LIB)/$(HLLNAME).pbc \
   $(PMC_DIR)/*.h \
   $(PMC_DIR)/*.c \
   $(PMC_DIR)/*.dump \

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 09:09:53 2008
@@ -1,7 +1,8 @@
 # $Id$
 
 ## arguments we want to run parrot with
-PARROT_ARGS =
+PARROT_ARGS   =
+HLLNAME       = pirc
 
 ## configuration settings
 BUILD_DIR     = @build_dir@
@@ -14,30 +15,32 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
 
-all: pirc.pbc 
+build: pirc.pbc 
 
-#PERL6_GROUP = $(PMC_DIR)/perl6_group$(LOAD_EXT)
+all: build Makefile $(HLLNAME)@exe@ installable
 
 SOURCES = pirc.pir \
   src/gen_grammar.pir \
@@ -57,9 +60,19 @@
   src/pasm/gen_pasm_core.pbc
 
 # the default target
-pirc.pbc:  $(SOURCES) $(PASMGRAMMAR)
+pirc.pbc: $(SOURCES) $(PASMGRAMMAR)
 	$(PARROT) $(PARROT_ARGS) -o pirc.pbc pirc.pir
 
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/pir.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
 	    --output=src/gen_grammar.pir \
@@ -126,8 +139,10 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               perl6.pbc"
+	@echo "  build:             pirc.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               pirc.pbc pirc@exe@ installable"
+	@echo ""
 	@echo "Testing:"
 	@echo "  test:              Run the test suite."
 	@echo "  testclean:         Clean up test results."

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 09:09:53 2008
@@ -1,35 +1,41 @@
 # Copyright (C) 2006-2007, The Perl Foundation.
 # $Id$
 
-HLLNAME = WMLScript
-RM_F    = @rm_f@
-PERL    = @perl@
-CP      = @cp@
-MKPATH  = @mkpath@
-
-PMCBUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl
-OPSBUILD = $(PERL) @build_dir@/tools/build/dynoplibs.pl
-LIBPATH  = runtime
-PMCDIR   = pmc
-OPSDIR   = ops
-O        = @o@
-LOAD_EXT = @load_ext@
+## configuration settings
+HLLNAME       = WMLScript
+
+## Setup some commands
+PERL          = @perl@
+RM_F          = @rm_f@
+CP            = @cp@
+MKPATH        = @mkpath@
+POD2MAN       = pod2man
+PMCBUILD      = $(PERL) @build_dir@/tools/build/dynpmc.pl
+OPSBUILD      = $(PERL) @build_dir@/tools/build/dynoplibs.pl
+O             = @o@
+LOAD_EXT      = @load_ext@
+
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+
+## places to look for things
 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@
+
+LIBPATH       = WMLScript
+PMCDIR        = pmc
+OPSDIR        = ops
+PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 SRM=Stack
 
@@ -50,14 +56,15 @@
  $(PMCDIR)/wmlsbytecode.pmc
 
 OPS_FILES = $(OPSDIR)/wmls.ops
-
 OPSLIB    = wmls
 
+CMDS = wmls2pir wmls2pbc wmlsd wmlsi
+
 PBCS = \
- $(PARROT_RUNTIME)/wmlslang.pbc \
- $(PARROT_RUNTIME)/wmlsfloat.pbc \
- $(PARROT_RUNTIME)/wmlsstring.pbc \
- $(PARROT_RUNTIME)/wmlsconsole.pbc
+ $(LIBPATH)/wmlslang.pbc \
+ $(LIBPATH)/wmlsfloat.pbc \
+ $(LIBPATH)/wmlsstring.pbc \
+ $(LIBPATH)/wmlsconsole.pbc
 
 GEN_PIR = \
  src/opcode.pir \
@@ -66,13 +73,20 @@
 DOCS = \
  MAINTAINER doc/running.pod doc/status.pod
 
-all: \
- Makefile \
+build: \
  pmc/wmls_group$(LOAD_EXT) \
  ops/wmls_ops$(LOAD_EXT) \
- $(PARROT_LIBPATH)/WMLScript.pbc \
+ WMLScript.pbc \
  $(PBCS)
 
+all: \
+ pmc/wmls_group$(LOAD_EXT) \
+ ops/wmls_ops$(LOAD_EXT) \
+ WMLScript.pbc \
+ Makefile \
+ $(PBCS) \
+ wmls2pir@exe@ wmls2pbc@exe@ wmlsd@exe@ wmlsi@exe@ installable
+
 pmc/wmls_group$(LOAD_EXT) : $(PMC_FILES)
 	@cd $(PMCDIR) && $(PMCBUILD) generate $(PMCS)
 	@cd $(PMCDIR) && $(PMCBUILD) compile $(PMCS)
@@ -85,9 +99,9 @@
 	@cd $(OPSDIR) && $(OPSBUILD) linklibs $(OPSLIB)
 	@cd $(OPSDIR) && $(OPSBUILD) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)
 
-$(PARROT_LIBPATH)/WMLScript.pbc: src/WMLScript.pir \
+WMLScript.pbc: src/WMLScript.pir \
  src/script.pir src/wmlsstdlibs.pir $(GEN_PIR)
-	$(PARROT) -o $@ src/WMLScript.pir
+	$(PARROT) -o WMLScript.pbc src/WMLScript.pir
 
 src/opcode.pir: src/translation.rules build/translator.pl \
  build/SRM/Stack.pm build/SRM/Register.pm
@@ -97,18 +111,33 @@
 src/stdlibs.pir: src/wmlslibs.cfg build/stdlibs.pl
 	$(PERL) build/stdlibs.pl --output src/stdlibs.pir src/wmlslibs.cfg
 
-$(PARROT_RUNTIME)/wmlslang.pbc: $(LIBPATH)/wmlslang.pir
-	-$(MKPATH) $(PARROT_RUNTIME)
-	$(PARROT) --output=$@ $(LIBPATH)/wmlslang.pir
+$(LIBPATH)/wmlslang.pbc: $(LIBPATH)/wmlslang.pir
+	$(PARROT) --output=$(LIBPATH)/wmlslang.pbc $(LIBPATH)/wmlslang.pir
 
-$(PARROT_RUNTIME)/wmlsfloat.pbc: $(LIBPATH)/wmlsfloat.pir
-	$(PARROT) --output=$@ $(LIBPATH)/wmlsfloat.pir
+$(LIBPATH)/wmlsfloat.pbc: $(LIBPATH)/wmlsfloat.pir
+	$(PARROT) --output=$(LIBPATH)/wmlsfloat.pbc $(LIBPATH)/wmlsfloat.pir
 
-$(PARROT_RUNTIME)/wmlsstring.pbc: $(LIBPATH)/wmlsstring.pir
-	$(PARROT) --output=$@ $(LIBPATH)/wmlsstring.pir
+$(LIBPATH)/wmlsstring.pbc: $(LIBPATH)/wmlsstring.pir
+	$(PARROT) --output=$(LIBPATH)/wmlsstring.pbc $(LIBPATH)/wmlsstring.pir
 
-$(PARROT_RUNTIME)/wmlsconsole.pbc: $(LIBPATH)/wmlsconsole.pir
-	$(PARROT) --output=$@ $(LIBPATH)/wmlsconsole.pir
+$(LIBPATH)/wmlsconsole.pbc: $(LIBPATH)/wmlsconsole.pir
+	$(PARROT) --output=$(LIBPATH)/wmlsconsole.pbc $(LIBPATH)/wmlsconsole.pir
+
+# regenerate the Makefile
+Makefile: config/makefiles/root.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+
+wmls2pir.pbc: wmls2pir.pir
+	$(PARROT) --output=$@ wmls2pir.pir
+
+wmls2pbc.pbc: wmls2pbc.pir
+	$(PARROT) --output=$@ wmls2pbc.pir
+
+wmlsd.pbc: wmlsd.pir
+	$(PARROT) --output=$@ wmlsd.pir
+
+wmlsi.pbc: wmlsi.pir
+	$(PARROT) --output=$@ wmlsi.pir
 
 wmls2pir@exe@: wmls2pir.pbc
 	$(PBC_TO_EXE) wmls2pir.pbc
@@ -122,16 +151,16 @@
 wmlsi@exe@: wmlsi.pbc
 	$(PBC_TO_EXE) wmlsi.pbc
 
-installable_wmls2pir@exe@: $(RUNTIMES) wmls2pir.pbc
+installable_wmls2pir@exe@: wmls2pir.pbc
 	$(PBC_TO_EXE) wmls2pir.pbc --install
 
-installable_wmls2pbc@exe@: $(RUNTIMES) wmls2pbc.pbc
+installable_wmls2pbc@exe@: wmls2pbc.pbc
 	$(PBC_TO_EXE) wmls2pbc.pbc --install
 
-installable_wmlsd@exe@: $(RUNTIMES) wmlsd.pbc
+installable_wmlsd@exe@: wmlsd.pbc
 	$(PBC_TO_EXE) wmlsd.pbc --install
 
-installable_wmlsi@exe@: $(RUNTIMES) wmlsi.pbc
+installable_wmlsi@exe@: wmlsi.pbc
 	$(PBC_TO_EXE) wmlsi.pbc --install
 
 install : installable
@@ -139,18 +168,26 @@
 	$(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@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+	$(MKPATH) $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME)
+	$(CP) $(PBCS) $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME)
 	@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
+#IF(has_pod2man):	$(MKPATH) $(DESTDIR)$(MANDIR)/man5
+#IF(has_pod2man):	$(POD2MAN) wmls2pir.pir > $(DESTDIR)$(MANDIR)/man1/parrot-wmls2pir.1
+#IF(has_pod2man):	$(POD2MAN) wmls2pbc.pir > $(DESTDIR)$(MANDIR)/man1/parrot-wmls2pbc.1
+#IF(has_pod2man):	$(POD2MAN) wmlsd.pir > $(DESTDIR)$(MANDIR)/man1/parrot-wmlsd.1
+#IF(has_pod2man):	$(POD2MAN) wmlsi.pir > $(DESTDIR)$(MANDIR)/man1/parrot-wmlsi.1
+#IF(has_pod2man):	$(POD2MAN) doc/running.pod > $(DESTDIR)$(MANDIR)/man5/parrot-wmls.5
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
-# regenerate the Makefile
-Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
-
-installable: $(RUNTIMES) installable_wmls2pir@exe@ installable_wmls2pbc@exe@ \
-             installable_wmlsd@exe@ installable_wmlsi@exe@
+installable: installable_wmls2pir@exe@ installable_wmls2pbc@exe@ \
+             installable_wmlsd@exe@ installable_wmlsi@exe@ \
+             $(HLLNAME).pbc $(PBCS)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+	-$(MKPATH) $(PARROT_LIB)/$(HLLNAME)
+	$(CP) $(PBCS) $(PARROT_LIB)/$(HLLNAME)
 
 help:
 	@echo ""
@@ -197,7 +234,11 @@
  "$(OPSDIR)/*.h" \
  "$(OPSDIR)/*$(LOAD_EXT)" \
  "$(OPSDIR)/*$(O)" \
- "$(LIBPATH)/*.pbc"
+ "$(LIBPATH)/*.pbc" \
+  $(PARROT_LIB)/$(HLLNAME).pbc \
+  $(HLLNAME).pbc installable_*@exe@ \
+  wmls2pir@exe@ wmls2pbc@exe@ wmlsd@exe@ wmlsi@exe@ \
+  $(PARROT_LIB)/$(HLLNAME)/*.pbc
 
 clean:
 	$(RM_F) $(BUILD_CLEANERS) $(TEST_CLEANERS)

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 09:09:53 2008
@@ -1,23 +1,28 @@
 # $Id$
 
 # Makefile for languages/Zcode
-HLLNAME	      = Zcode
+HLLNAME	      = z3
 
 # Setup of some commands
-BUILD_DIR  = @build_dir@
-PERL       = @perl@
-RM_F       = @rm_f@
+BUILD_DIR     = @build_dir@
+PERL          = @perl@
+RM_F          = @rm_f@
+MV            = @mv@
+
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+PBC_MERGE     = ../../pbc_merge@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) ../../parrot@exe@
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 EXAMPLES = examples/small.z3 examples/hello.z3
 
-default: all
+build: build.dummy
 
 help :
 	@echo ""
@@ -25,22 +30,25 @@
 	@echo ""
 	@echo "  build:             Build files (Currently does nothing)"
 	@echo "                     This is the default."
-	@echo ""
-	@echo "  test:              run the test suite,"
-	@echo ""
+	@echo "  all                z3.pbc z3@exe@ installable"
+	@echo "  installable:       Create self-hosting bins and libs."
+	@echo "  install:           Install the installable targets and docs."
 	@echo "  maintain:          Build examples and test files"
 	@echo "                     Requires an Inform compiler!"
 	@echo ""
+	@echo "Testing:"
+	@echo "  test:              run the test suite,"
+	@echo ""
+	@echo "Cleaning:"
 	@echo "  clean:             clean up temporary files (none presently)"
 	@echo "  realclean:         clean up generated files"
 	@echo "  maintclean:        clean up Z-code files"
 	@echo ""
+	@echo "Misc:"
 	@echo "  help:              print this help message"
 
+all: build z3.pbc Makefile z3@exe@ installable 
 
-all: build
-
-build: build.dummy
 # Replacement for GNU make's .PHONY
 build.dummy:
 
@@ -59,16 +67,37 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=Zcode
+
+z3.pbc: z3.pir
+	$(PARROT) $(PARROT_ARGS) -o z3.pbc z3.pir
+
+z3main.pbc: z3main.pir zops.pir
+	$(PARROT) $(PARROT_ARGS) -o z3main.pbc z3main.pir
+
+Zcode.pbc: z3.pbc z3main.pbc
+	$(PBC_MERGE) -o Zcode.pbc z3.pbc z3main.pbc
+
+z3@exe@ : Zcode.pbc z3main.pbc
+	$(PBC_TO_EXE) Zcode.pbc
+
+installable : installable_Zcode@exe@
+	$(CP) installable_Zcode@exe@ $(BUILD_DIR)
+	$(CP) z3.pbc $(PARROT_LIB)/z3.pbc
+	$(CP) z3main.pbc $(PARROT_LIB)/z3main.pbc
+
+# TODO: load_bytecode z3main nees to be patched if installed
+installable_Zcode@exe@: Zcode.pbc
+	$(PBC_TO_EXE) Zcode.pbc --install
 
 clean:
 	@echo "No temp files to clean"
 
-# Deletes z files. 
-# Don't do this unless you have an Inform compiler!
 realclean: clean
 	$(RM_F) Makefile
 
+# Deletes z files. 
+# Don't do this unless you have an Inform compiler!
 maintclean: realclean
 	$(RM_F) $(EXAMPLES) $(TEST_ZFILES)
 

Modified: branches/pdd30install_stage3/languages/Zcode/z3.pir
==============================================================================
--- branches/pdd30install_stage3/languages/Zcode/z3.pir	(original)
+++ branches/pdd30install_stage3/languages/Zcode/z3.pir	Sun Dec 28 09:09:53 2008
@@ -41,7 +41,7 @@
   .local pmc opt
   opt = getopts."get_options"(argv)
 
-  load_bytecode "z3main.pir"
+  load_bytecode "z3main"
   ini = global "zm_init"
   zc = ini()
   file = argv[0]

Modified: branches/pdd30install_stage3/languages/Zcode/z3main.pir
==============================================================================
--- branches/pdd30install_stage3/languages/Zcode/z3main.pir	(original)
+++ branches/pdd30install_stage3/languages/Zcode/z3main.pir	Sun Dec 28 09:09:53 2008
@@ -79,8 +79,8 @@
   .param pmc opts
 
   .local pmc instance
-  $I0 = typeof self
-  instance = new $I0
+  $P0 = typeof self
+  instance = new $P0
   instance."load"(file)
   instance."set_opts"(opts)
   .return (instance)
@@ -172,8 +172,8 @@
   addattribute $P0, "ops"
   addattribute $P0, "code"
   addattribute $P0, "temp"
-  $I0 = typeof $P0
-  comp = new $I0
+  $P1 = typeof $P0
+  comp = new $P1
   # ref instance vars
   im = getattribute self, "Zmachine\0image"
   setattribute comp, "Zmachine\0image", im

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 09:09:53 2008
@@ -19,26 +19,30 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 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@
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
-all: abc.pbc
+build: abc.pbc
+
+all: abc.pbc Makefile $(HLLNAME)@exe@ installable
 
 SOURCES = abc.pir \
   src/gen_grammar.pir \
@@ -51,7 +55,7 @@
 DOCS = MAINTAINER README TODO
 
 # the default target
-abc.pbc:  $(SOURCES)
+abc.pbc: $(PARROT) $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o abc.pbc abc.pir
 
 $(HLLNAME)@exe@: $(HLLNAME).pbc
@@ -70,25 +74,31 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
-$(ABC_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)
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+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=abc
+	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:               abc.pbc"
+	@echo "  build:             abc.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               abc.pbc abc@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 "  test-installable:  Test self-hosting targets."
 	@echo "  testclean:         Clean up test results."
 	@echo ""
 	@echo "Cleaning:"
@@ -109,8 +119,9 @@
 
 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) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	-$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
 testclean:
@@ -121,17 +132,9 @@
   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 \
-
+  $(PARROT_LIB)/$(HLLNAME).pbc \
+  $(HLLNAME)@exe@ \
+  installable_$(HLLNAME)@exe@
 
 clean: testclean
 	$(RM_RF) $(CLEANUPS)
@@ -140,3 +143,9 @@
 	$(RM_RF) Makefile
 
 distclean: realclean
+
+#
+# Local variables:
+# mode: makefile
+# ex: ft=make
+# End:

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 09:09:53 2008
@@ -15,26 +15,32 @@
 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@
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+CAT           = $(PERL) -MExtUtils::Command -e cat
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 DOCS = MAINTAINER README Changes
 
-default: all
+build: $(HLLNAME).pbc
+
+all: $(HLLNAME).pbc Makefile $(HLLNAME)@exe@ installable
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               befunge.pbc"
+	@echo "  build:             befunge.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               befunge.pbc befunge@exe@ installable"
+	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
 	@echo ""
 	@echo "Testing:"
@@ -50,22 +56,18 @@
 	@echo "  help:              Print this help message"
 
 
-all: build
-
-build: befunge.pbc
-
-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)
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@: $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install
 
-installable : installable_$(HLLNAME)@exe@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+befunge.pbc: befunge.pasm debug.pasm flow.pasm io.pasm load.pasm maths.pasm stack.pasm
+	$(PARROT) -o befunge.pbc befunge.pasm
 
 test: befunge.pbc
 	cd .. && $(PERL) t/harness --languages=$(HLLNAME)
@@ -76,14 +78,20 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
+# regenerate the Makefile
+Makefile: config/makefiles/root.in
+	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
+
 clean:
 	$(RM_F) core \
     "*.pbc" \
     "*~" \
+    "$(HLLNAME)@exe@" \
     "installable_$(HLLNAME)@exe@"
 
 realclean: clean

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 09:09:53 2008
@@ -4,23 +4,29 @@
 LIB_DIR       = @lib_dir@
 DOC_DIR       = @doc_dir@
 MANDIR        = @mandir@
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
 
 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@
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+CAT           = $(PERL) -MExtUtils::Command -e cat
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 DOCS = MAINTAINER README
 
-all : build
+build: $(HLLNAME).pbc
+
+all: $(HLLNAME).pbc Makefile $(HLLNAME)@exe@ installable
 
 help :
 	@echo ""
@@ -48,9 +54,15 @@
 test : build
 	$(PERL) -Ilib -I../../lib t/harness
 
-build: bf.pbc bfc.pbc bfco.pbc
+build: $(PBCS)
 
-installable: installable_bf@exe@ installable_bfc@exe@ installable_bfco@exe@
+installable: $(EXES) $(PBCS)
+	$(CP) installable_bf@exe@   $(BUILD_DIR)
+	$(CP) installable_bfc@exe@  $(BUILD_DIR)
+	$(CP) installable_bfco@exe@ $(BUILD_DIR)
+	$(CP) bf.pbc   $(PARROT_LIB)/bf.pbc
+	$(CP) bfc.pbc  $(PARROT_LIB)/bfco.pbc
+	$(CP) bfco.pbc $(PARROT_LIB)/bfco.pbc
 
 bf@exe@: bf.pbc
 	$(PBC_TO_EXE) bf.pbc
@@ -81,19 +93,22 @@
 
 # TODO: rename build_dir. basic run for missing libs
 test-installable : installable
-	./installable_bf@exe@ test.bf
-	./installable_bfc@exe@ test.bf
+	./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_bf@exe@   $(DESTDIR)$(BIN_DIR)/parrot-bf@exe@
+	$(CP) installable_bfc@exe@  $(DESTDIR)$(BIN_DIR)/parrot-bfc@exe@
 	$(CP) installable_bfco@exe@ $(DESTDIR)$(BIN_DIR)/parrot-bfco@exe@
+	$(CP) bf.pbc   $(DESTDIR)$(LIB_DIR)/parrot/library/bf.pbc
+	$(CP) bfc.pbc  $(DESTDIR)$(LIB_DIR)/parrot/library/bfc.pbc
+	$(CP) bfco.pbc $(DESTDIR)$(LIB_DIR)/parrot/library/bfco.pbc
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
 clean:
-	$(RM_F) core "*.pbc" "*~"
+	$(RM_F) core "*.pbc" "*~" "installable_bf*@exe@" "$(PARROT_LIB)/bf*.pbc"
 
 realclean: clean
 	$(RM_F) Makefile

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 09:09:53 2008
@@ -28,10 +28,10 @@
 ## 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
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
 

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 09:09:53 2008
@@ -19,30 +19,33 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#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
-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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
 DOCS = MAINTAINER
 
-all: c99.pbc src/cpp/cpp.pbc
+build: c99.pbc src/cpp/cpp.pbc
+
+all: build Makefile $(HLLNAME)@exe@ installable
 
 C_GROUP = $(PMC_DIR)/c_group$(LOAD_EXT)
 
@@ -55,23 +58,21 @@
   src/builtins/say.pir \
 
 # the default target
-c99.pbc:  $(SOURCES)
+c99.pbc: $(PARROT) $(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
 
+src/cpp/cpp.pbc: src/cpp/cpp.pir
+	cd src/cpp && $(MAKE) installable_cpp@exe@
+
 installable_cpp@exe@ : src/cpp/cpp.pbc
-	make installable_cpp@exe@ -C src/cpp
-	mv src/cpp/installable_cpp@exe@ installable_cpp@exe@
+	$(CP) src/cpp/installable_cpp@exe@ installable_cpp@exe@
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
@@ -86,7 +87,7 @@
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
 # regenerate the Makefile
-Makefile: config/makefiles/root.in
+Makefile: config/makefiles/root.in config/makefiles/cpp.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=c99
 
 # This is a listing of all targets, that are meant to be called by users
@@ -94,7 +95,7 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               c.pbc"
+	@echo "  build:             c99.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -123,11 +124,19 @@
 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
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+	$(CP) src/cpp/cpp.pbc $(DESTDIR)$(LIB_DIR)/parrot/library/cpp.pbc
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+#IF(has_pod2man):	$(POD2MAN) src/cpp/cpp.pir > $(DESTDIR)$(MANDIR)/man1/parrot-cpp.1
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
+installable : installable_c99@exe@ installable_cpp@exe@ $(HLLNAME).pbc src/cpp/cpp.pbc
+	$(CP) installable_c99@exe@ $(BUILD_DIR)
+	$(CP) installable_cpp@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+	$(CP) src/cpp/cpp.pbc $(PARROT_LIB)/cpp.pbc
+
 # this target has nothing to do
 testclean:
 
@@ -140,6 +149,7 @@
   src/cpp/src/gen_actions.pir \
   src/cpp/src/gen_grammar.pir \
   src/cpp/src/gen_builtins.pir \
+  c99@exe@ \
   installable_*@exe@
 
 clean:

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 09:09:53 2008
@@ -25,14 +25,17 @@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
 
-all: cardinal.pbc test.pir
+build: cardinal.pbc
+
+all: build Makefile cardinal$(EXE) installable
 
 CARDINAL_GROUP = $(PMC_DIR)/cardinal_group$(LOAD_EXT)
 
@@ -70,6 +73,7 @@
   src/builtins/eval.pir \
   src/classes/Continuation.pir \
 
+DOCS = README
 # PMCS = cardinal
 # PMC_SOURCES = $(PMC_DIR)/cardinal.pmc
 
@@ -104,16 +108,14 @@
 Makefile: config/makefiles/root.in
 	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:
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               cardinal.pbc"
+	@echo "  build:             cardinal.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               cardinal.pbc cardinal@exe@ installable"
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
 	@echo ""
@@ -140,6 +142,22 @@
 hashtest: all
 	$(PERL) t/harness --tests-from-dir=hash
 
+# TODO: rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ t/00-sanity.t
+
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
+
 # this target has nothing to do
 testclean:
 
@@ -151,6 +169,8 @@
   cardinal$(O) \
   cardinal$(EXE) \
   installable_cardinal$(EXE) \
+  $(PARROT_LIB)/$(HLLNAME).pbc \
+  $(BUILD_DIR)/installable_cardinal@exe@ \
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.pir \

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 09:09:53 2008
@@ -4,7 +4,7 @@
 PARROT_ARGS =
 
 ## configuration settings
-HLLNAME          = chitchat
+HLLNAME       = chitchat
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
@@ -19,28 +19,32 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 DOCS = MAINTAINER
 
-all: chitchat.pbc
+build: chitchat.pbc
+
+all: build Makefile $(HLLNAME)@exe@ installable
 
 SOURCES = chitchat.pir \
   src/gen_grammar.pir \
@@ -75,8 +79,9 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               chitchat.pbc"
+	@echo "  build:             chitchat.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               chitchat.pbc chitchat@exe@ installable"
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
 	@echo ""
@@ -103,15 +108,17 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install
@@ -124,8 +131,9 @@
   src/gen_grammar.pir \
   src/gen_actions.pir \
   src/gen_builtins.pir \
+  $(PARROT_LIB)/$(HLLNAME).pbc \
   $(HLLNAME)@exe@ \
-  installable_$(HLLNAME)@exe@ \
+  installable_$(HLLNAME)@exe@
 
 clean:
 	$(RM_RF) $(CLEANUPS)

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 09:09:53 2008
@@ -23,10 +23,10 @@
 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@
+#IF(has_pod2man):POD2MAN       = @pod2man@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 # Libraries:  Ordinarily, no special libraries are needed
 # for cola, but one of the following settings might be helpful

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 09:09:53 2008
@@ -4,7 +4,7 @@
 # Makefile for languages/eclectus
 
 # configuration settings
-HLLNAME          = eclectus
+HLLNAME       = eclectus
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
@@ -14,24 +14,25 @@
 MANDIR	      = @mandir@
 
 # 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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 PERL          = @perl@
 RM_F          = @rm_f@
 RENAME        = @mv@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#IF(has_pod2man):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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 # Set up directories
 PARROT_DYNEXT   = @build_dir@/runtime/parrot/dynext
+PARROT_LIB      = @build_dir@/runtime/parrot/library
 PMC_DIR         = src/pmc
 
 ECLECTUS_GROUP  = $(PMC_DIR)/eclectus_group@load_ext@
@@ -54,13 +55,15 @@
 DOCS = MAINTAINER README docs/eclectus.pod
 
 # The default target
-all: build
+default: build
+
+all: build Makefile $(HLLNAME)@exe@ installable
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               Builds the dynamic PMCSs needed by Eclectus."
+	@echo "  build:             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."
@@ -84,16 +87,17 @@
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
 # Compilation:
-build: $(ECLECTUS_GROUP) driver_nqp.pbc
+build: $(ECLECTUS_GROUP) $(HLLNAME).pbc
 
-$(ECLECTUS_GROUP):  $(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)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
 
-driver_nqp.pbc: src/builtins/all.pbc driver_nqp.pir
-	$(PARROT) -o driver_nqp.pbc driver_nqp.pir
+# TODO: merge those two and fix driver_nqp.pir
+$(HLLNAME).pbc: src/builtins/all.pbc driver_nqp.pir
+	$(PARROT) -o $(HLLNAME).pbc driver_nqp.pir
 
 src/builtins/all.pbc: src/builtins/all.pir
 	$(PARROT) -o src/builtins/all.pbc src/builtins/all.pir
@@ -104,21 +108,21 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
-	$(POD2MAN) docs/eclectus.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+#IF(has_pod2man):	$(POD2MAN) docs/$(HLLNAME).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@
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
 
-installable : installable_$(HLLNAME)@exe@ $(ECLECTUS_GROUP)
+installable : installable_$(HLLNAME)@exe@ $(ECLECTUS_GROUP) $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
-installable_$(HLLNAME)@exe@ : driver_nqp.pbc
-	$(PBC_TO_EXE) driver_nqp.pbc --install
-	$(RENAME) driver_nqp@exe@ installable_$(HLLNAME)@exe@
+installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
 
 
 # cleaning up
@@ -136,13 +140,15 @@
   $(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 \
+#IF(win32):  $(PMC_DIR)/*.exp \
+#IF(win32):  $(PMC_DIR)/*.ilk \
+#IF(win32):  $(PMC_DIR)/*.manifest \
+#IF(win32):  $(PMC_DIR)/*.pdb \
+#IF(win32):  $(PMC_DIR)/*.lib \
   installable_$(HLLNAME)@exe@ \
   $(HLLNAME)@exe@ \
+  $(HLLNAME).pbc \
+  $(PARROT_LIB)/$(HLLNAME).pbc
 
 realclean: clean
 	$(RM_F) Makefile

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 09:09:53 2008
@@ -4,6 +4,7 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME       = js
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
@@ -15,25 +16,26 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
-PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe@exe@
 
 PMCDIR   = src/pmc
 
@@ -90,7 +92,7 @@
 	$(PBC_TO_EXE) js.pbc
 
 # the default target
-js.pbc:  $(SOURCES)
+js.pbc: $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o js.pbc js.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg 
@@ -116,7 +118,7 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               js.pbc"
+	@echo "  build:             js.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -144,19 +146,15 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+#IF(has_pod2man):	$(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
+$(PARROT_LIB)/$(HLLNAME).pbc: $(HLLNAME).pbc
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
-installable : installable_$(HLLNAME)@exe@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 	$(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
@@ -165,11 +163,12 @@
 	$(RM_F) "t/*.js" "t/*.out"
 
 CLEANUPS = \
-  js.pbc \
   js@exe@ \
+  js.pbc \
   installable_$(HLLNAME)@exe@ \
   $(HLLNAME).pbc \
   $(HLLNAME)@exe@ \
+  $(PARROT_LIB)/$(HLLNAME).pbc \
   js.c \
   src/gen_grammar.pir \
   src/gen_actions.pir \
@@ -179,11 +178,11 @@
   $(PMCDIR)/*.dump \
   $(PMCDIR)/*$(O) \
   $(PMCDIR)/*$(LOAD_EXT) \
-  $(PMC_DIR)/*.exp \
-  $(PMC_DIR)/*.ilk \
-  $(PMC_DIR)/*.manifest \
-  $(PMC_DIR)/*.pdb \
-  $(PMC_DIR)/*.lib \
+#IF(win32):  $(PMC_DIR)/*.exp \
+#IF(win32):  $(PMC_DIR)/*.ilk \
+#IF(win32):  $(PMC_DIR)/*.manifest \
+#IF(win32):  $(PMC_DIR)/*.pdb \
+#IF(win32):  $(PMC_DIR)/*.lib \
   t/*.out \
   t/*.rb
 

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 09:09:53 2008
@@ -1,26 +1,31 @@
 # $Id$
 
 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@
+LOAD_EXT      = @load_ext@
+O             = @o@
 BIN_DIR       = @bin_dir@
 LIB_DIR       = @lib_dir@
 DOC_DIR       = @doc_dir@
 MANDIR	      = @mandir@
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+
+PERL          = @perl@
+RM_RF         = @rm_rf@
+CP            = @cp@
+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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+PBC_MERGE     = ../../pbc_merge@exe@
+CAT           = $(PERL) -MExtUtils::Command -e cat
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 PBCS = tokenstream.pbc \
     variablestack.pbc \
@@ -30,7 +35,7 @@
 
 build: $(DEPENDENCIES)
 
-all: $(DEPENDENCIES) forth@exe@ installable
+all: $(DEPENDENCIES) Makefile forth@exe@ installable
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
@@ -59,7 +64,7 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               force.pbc"
+	@echo "  build:             force.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -84,17 +89,24 @@
 
 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
+	$(CP) $(HLLNAME).pbc    $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+	-$(MKPATH) $(DESTDIR)$(LIB_DIR)/parrot/library/forth
+	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc    $(PARROT_LIB)/$(HLLNAME).pbc
+	-$(MKPATH) $(PARROT_LIB)/forth
+	$(CP) tokenstream.pbc   $(PARROT_LIB)/forth/tokenstream.pbc
+	$(CP) variablestack.pbc $(PARROT_LIB)/forth/variablestack.pbc
+	$(CP) virtualstack.pbc  $(PARROT_LIB)/forth/virtualstack.pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install

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 09:09:53 2008
@@ -4,7 +4,7 @@
 PARROT_ARGS =
 
 ## configuration settings
-HLLNAME          = hq9plus
+HLLNAME       = hq9plus
 BUILD_DIR     = @build_dir@
 BIN_DIR       = @bin_dir@
 LIB_DIR       = @lib_dir@
@@ -16,25 +16,29 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 
 ## places to look for things
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
-all: hq9plus.pbc
+build: hq9plus.pbc
+
+all: build Makefile $(HLLNAME)@exe@ installable
 
 SOURCES = hq9plus.pir \
   src/gen_grammar.pir \
@@ -50,7 +54,7 @@
 DOCS = MAINTAINER README
 
 # the default target
-hq9plus.pbc:  $(SOURCES)
+hq9plus.pbc: $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o hq9plus.pbc hq9plus.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
@@ -74,7 +78,7 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               hq9plus.pbc"
+	@echo "  build:             hq9plus.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -102,15 +106,17 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install
@@ -124,8 +130,11 @@
   src/gen_actions.pir \
   src/gen_builtins.pir \
   t/*.HQ9plus \
-  t/*.out
-
+  t/*.out \
+  installable_$(HLLNAME)@exe@ \
+  $(HLLNAME)@exe@ \
+  $(HLLNAME).pbc \
+  $(PARROT_LIB)/$(HLLNAME).pbc
 
 clean:
 	$(RM_RF) $(CLEANUPS)

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 09:09:53 2008
@@ -15,16 +15,19 @@
 
 PERL          = @perl@
 RM_F          = @rm_f@
+CP            = @cp@
+MKPATH        = @mkpath@
+#IF(has_pod2man):POD2MAN       = pod2man
 JAKOC         = $(PERL) -I lib jakoc
-#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@
+
+#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)
+INTERP        = ../../@test_prog@
+PBC_TO_EXE    = ../../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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 DOCS = README MAINTAINER
 
@@ -137,7 +140,7 @@
 	$(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
+#IF(has_pod2man):	$(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)

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 09:09:53 2008
@@ -19,28 +19,32 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
 
-all: json.pbc
+build: json.pbc
+
+all: build Makefile $(HLLNAME)@exe@ installable
 
 SOURCES = json.pir \
   src/gen_grammar.pir \
@@ -53,7 +57,7 @@
   src/builtins/say.pir \
 
 # the default target
-json.pbc:  $(SOURCES)
+json.pbc: $(PARROT) $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o json.pbc json.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
@@ -106,15 +110,17 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install
@@ -126,7 +132,11 @@
   json.pbc \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.pir
+  src/gen_builtins.pir \
+  installable_$(HLLNAME)@exe@ \
+  $(HLLNAME)@exe@ \
+  $(HLLNAME).pbc \
+  $(PARROT_LIB)/$(HLLNAME).pbc
 
 clean: testclean
 	$(RM_RF) $(CLEANUPS)

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 09:09:53 2008
@@ -8,15 +8,16 @@
 RM_F          = @rm_f@
 CP            = @cp@
 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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 # set up location
 BUILD_DIR     = @build_dir@
@@ -24,17 +25,20 @@
 LIB_DIR       = @lib_dir@
 DOC_DIR       = @doc_dir@
 MANDIR	      = @mandir@
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+
+build: lazy-k.pbc
 
-all: lazy-k.pbc
+all: lazy-k.pbc lazy-k@exe@ Makefile installable
 
-lazy-k.pbc :  $(SOURCES)
-	$(PARROT) $(PARROT_ARGS) -o lazy-k.pbc lazy-k.pir
+lazy-k.pbc : $(SOURCES)
+	$(PARROT) $(PARROT_ARGS) -o lazy-k.pbc lazy.pir
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               lazy-k.pbc"
+	@echo "  build:             lazy-k.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -66,25 +70,28 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) lazy.pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(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
 
 clean:
 	$(RM_F) core \
-    "*.pbc" \
-    "*~" \
-    "installable_$(HLLNAME)@exe@"
+  "*.pbc" \
+  "*~" \
+  $(HLLNAME)@exe@ \
+  "installable_$(HLLNAME)@exe@" \
+  $(PARROT_LIB)/$(HLLNAME).pbc
 
 realclean: clean
 	$(RM_F) Makefile

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 09:09:53 2008
@@ -19,22 +19,24 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#IF(has_pod2man):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@
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 DOCS = CHANGES KNOWN_BUGS LICENSE MAINTAINER README
 
-all: build
+build: lisp.pbc
+
+all: build Makefile $(HLLNAME)@exe@ installable
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
@@ -43,8 +45,6 @@
 test: build
 	$(PERL) -Ilib -I../../lib t/harness
 
-build: lisp.pbc
-
 lisp.pbc: lisp.pir
 	$(PARROT) -o lisp.pbc lisp.pir
 
@@ -53,7 +53,7 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               lisp.pbc"
+	@echo "  build:             lisp.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -78,15 +78,17 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install

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 09:09:53 2008
@@ -4,6 +4,7 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME       = lolcode
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
@@ -14,25 +15,30 @@
 PERL          = @perl@
 RM_RF         = @rm_rf@
 CP            = @cp@
-PARROT        = ../../parrot$(EXE)
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PCT           = $(PARROT_LIB)/PCT.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
-PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe$(EXE)
 
 PMC_DIR       = src/pmc
 
-all: lolcode.pbc
+build: lolcode.pbc
 
 SOURCES = lolcode.pir \
   src/gen_grammar.pir \
@@ -49,6 +55,8 @@
 # PMCS = lolcode
 # PMC_SOURCES = $(PMC_DIR)/lolcode.pmc
 
+all: lolcode.pbc lolcode@exe@ Makefile installable
+
 lolcode$(EXE): lolcode.pbc
 	$(PBC_TO_EXE) lolcode.pbc
 
@@ -80,7 +88,7 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               lolcode.pbc"
+	@echo "  build:             lolcode.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -108,13 +116,12 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
 
-installable : installable_$(HLLNAME)@exe@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
-
-installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
-	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 # this target has nothing to do
 testclean:
@@ -122,9 +129,9 @@
 CLEANUPS = \
   lolcode.pbc \
   lolcode.c \
-  lolcode.ilk \
-  *.manifest \
-  *.pdb \
+#IF(win32):  lolcode.ilk \
+#IF(win32):  *.manifest \
+#IF(win32):  *.pdb \
   lolcode$(O) \
   lolcode$(EXE) \
   installable_lolcode$(EXE) \

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 09:09:53 2008
@@ -10,29 +10,35 @@
 MAKE        = @make_c@
 RM_F        = @rm_f@
 PERL        = @perl@
+CP          = @cp@
+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      = ../../parrot@exe@
+PBC_TO_EXE  = ../../pbc_to_exe@exe@
+PBC_MERGE   = ../../pbc_merge@exe@
 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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 LIBPATH       = src/lib
 PMCDIR        = src/pmc
 PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
+PARROT_LIB    = @build_dir@/runtime/parrot/library
 BUILD_DIR     = @build_dir@
 BIN_DIR       = @bin_dir@
 LIB_DIR       = @lib_dir@
 DOC_DIR       = @doc_dir@
 MANDIR	      = @mandir@
 
+
 PMCS = \
  lua \
  luaany \
@@ -136,8 +142,10 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+	$(CP) lualibs.pbc $(DESTDIR)$(LIB_DIR)/parrot/library/lualibs.pbc
 	@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)$(LIB_DIR)/parrot/dynext" $(PMCS)
-	$(POD2MAN) doc/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+#IF(has_pod2man):	$(POD2MAN) doc/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
@@ -158,8 +166,8 @@
 	$(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_i.pbc --output-pbc lua.pir
-	$(PBC_MERGE) -o lua.pbc lua_i.pbc ../../compilers/tge/TGE/Rule.pbc
+	$(PARROT) -o lua.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
@@ -167,7 +175,16 @@
 installable_lua@exe@: lua.pbc
 	$(PBC_TO_EXE) lua.pbc --install
 
-installable: installable_lua@exe@ $(PMCDIR)/lua_group$(LOAD_EXT)
+$(PARROT_LIB)/$(HLLNAME).pbc: $(HLLNAME).pbc
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+$(PARROT_LIB)/lualibs.pbc: $(LIBPATH)/lualibs.pbc
+	$(CP) $(LIBPATH)/lualibs.pbc $(PARROT_LIB)/lualibs.pbc
+
+installable: installable_lua@exe@ $(PMCDIR)/lua_group$(LOAD_EXT) \
+  $(PARROT_LIB)/$(HLLNAME).pbc \
+  $(PARROT_LIB)/lualibs.pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
 
 $(LIBPATH)/lualibs.pbc: $(LIB_PBCS)
 	$(PBC_MERGE) -o $(LIBPATH)/lualibs.pbc $(LIB_PBCS)
@@ -336,7 +353,8 @@
  "$(PMCDIR)/*$(LOAD_EXT)" \
  "$(PMCDIR)/*$(O)" \
  "$(LIBPATH)/*.pbc" \
- installable_$(HLLNAME)@exe@ \
+ $(PARROT_LIB)/$(HLLNAME).pbc \
+ $(PARROT_LIB)/lualibs.pbc
 
 clean:
 	$(RM_F) $(BUILD_CLEANERS) $(TEST_CLEANERS)

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 09:09:53 2008
@@ -9,35 +9,37 @@
 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@
+#IF(has_pod2man):POD2MAN       = @pod2man@
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+
+#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        = ../../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
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 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
 
+all: build m4@exe@ Makefile installable_m4@exe@
+
 help:
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               m4.pbc m4.exe"
+	@echo "  all:               m4.pbc m4@exe@"
 	@echo "  build:             m4.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
@@ -80,15 +82,17 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) pod/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) doc/running.pod > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
 	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
 m4@exe@: $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc
 
-installable : installable_$(HLLNAME)@exe@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(PARROT_LIB)/$(HLLNAME).pbc $(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install
@@ -102,15 +106,18 @@
 
 clean:
 	$(RM_RF) \
-m4.pbc \
-"*.pdb" \
-"*.obj" \
-"src/*.pbc" \
-"src/*~" \
-"t/*/*.m4" \
-"t/*/*.pir_out" \
-"t/*/*.gnu_out" \
-"t/*/*.pir"
+  m4.pbc \
+  "*.pdb" \
+  "*.obj" \
+  "src/*.pbc" \
+  "src/*~" \
+  "t/*/*.m4" \
+  "t/*/*.pir_out" \
+  "t/*/*.gnu_out" \
+  "t/*/*.pir" \
+  installable_$(HLLNAME)@exe@ \
+  $(HLLNAME)@exe@ \
+  $(PARROT_LIB)/$(HLLNAME).pbc
 
 realclean: clean
 	$(RM_RF) Makefile

Modified: branches/pdd30install_stage3/languages/markdown/config/makefiles/root.in
==============================================================================
--- branches/pdd30install_stage3/languages/markdown/config/makefiles/root.in	(original)
+++ branches/pdd30install_stage3/languages/markdown/config/makefiles/root.in	Sun Dec 28 09:09:53 2008
@@ -5,7 +5,14 @@
 PARROT_ARGS =
 
 ## configuration settings
+HLLNAME	      = markdown
 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@
@@ -13,20 +20,31 @@
 RM_F          = @rm_f@
 RM_RF         = @rm_rf@
 CP            = @cp@
+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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
+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
 PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
-all: markdown.pbc
+DOCS          = README
+
+build: markdown.pbc
+
+all: markdown.pbc Makefile markdown@exe@ installable
 
 SOURCES = \
   markdown.pir \
@@ -55,6 +73,16 @@
 src/gen_builtins.pir: $(BUILTINS_PIR)
 	$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
 
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+$(HLLNAME)@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
+
+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=markdown
@@ -64,10 +92,15 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               markdown.pbc"
+	@echo "  build:             markdown.pbc"
 	@echo "                     This is the default."
+	@echo "  all:               markdown.pbc markdown@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 "  test-installable:  Test self-hosting targets."
 	@echo "  testclean:         Clean up test results."
 	@echo ""
 	@echo "Cleaning:"
@@ -91,6 +124,17 @@
 t/MarkdownTest_1.0: t/MarkdownTest_1.0.zip
 	cd t && perl -MArchive::Zip -e "Archive::Zip->new(q{MarkdownTest_1.0.zip})->extractTree();"
 
+# 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) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	-$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 TEST_CLEANUPS = \
   "t/*.html" \
   "t/*.text"
@@ -102,7 +146,10 @@
 GEN_CLEANUPS = \
   markdown.pbc \
   src/gen_grammar.pir \
-  src/gen_actions.pir
+  src/gen_actions.pir \
+  installable_$(HLLNAME)@exe@ \
+  $(HLLNAME)@exe@ \
+  $(PARROT_LIB)/$(HLLNAME).pbc
 
 clean: testclean
 	$(RM_F) $(GEN_CLEANUPS)
@@ -112,3 +159,8 @@
 
 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 09:09:53 2008
@@ -8,15 +8,17 @@
 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@
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+CAT           = $(PERL) -MExtUtils::Command -e cat
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 # Set up directories
 BUILD_DIR     = @build_dir@
@@ -24,10 +26,11 @@
 LIB_DIR       = @lib_dir@
 DOC_DIR       = @doc_dir@
 MANDIR	      = @mandir@
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
 
 DOCS = Changes MAINTAINER README
 
-default: all
+build: ook.pbc
 
 help :
 	@echo ""
@@ -48,7 +51,7 @@
 Makefile: config/makefiles/root.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=$(HLLNAME)
 
-all: build
+all: ook.pbc Makefile ook@exe@ installable
 
 build: ook.pbc
 
@@ -64,7 +67,9 @@
 installable_ook@exe@: ook.pbc
 	$(PBC_TO_EXE) ook.pbc --install
 
-installable: installable_ook@exe@
+installable: installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 # TODO: rename build_dir. basic run for missing libs
 test-installable : installable
@@ -72,7 +77,8 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+	-$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
 
 clean:
@@ -80,7 +86,10 @@
     "*.pbc" \
     "*~" \
     "hello.out" \
-    "foo.p*"
+    "foo.p*" \
+    $(HLLNAME)@exe@ \
+    installable_* \
+    $(PARROT_LIB)/$(HLLNAME).pbc
 
 realclean: clean
 	$(RM_F) Makefile

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 09:09:53 2008
@@ -6,20 +6,23 @@
 # Set up commands
 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) ../../@test_prog@@exe@
-PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@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        = ../../@test_prog@@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+CAT           = $(PERL) -MExtUtils::Command -e cat
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 # Set up directories
 BUILD_DIR     = @build_dir@
 
-default: all
-all : parrot.pbc parrot_compiler.pbc parrot_compiler.pasm
+build: parrot.pbc parrot_compiler.pbc parrot_compiler.pasm
+
+all : build Makefile
 
 help :
 	@echo ""

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 09:09:53 2008
@@ -1,15 +1,17 @@
 # $Id$
 
 # arguments we want to run parrot with
-PARROT_ARGS =
+HLLNAME       = perl6
+PARROT_ARGS   =
 
 # places to look for things
 BUILD_DIR     = @build_dir@
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
-PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PERL6GRAMMAR  = $(PARROT_LIB)/PGE/Perl6Grammar.pbc
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
+PCT           = $(PARROT_LIB)/PCT.pbc
 PMC_DIR       = src/pmc
 OPSDIR        = src/ops
 OPSLIB        = perl6
@@ -20,7 +22,6 @@
 MANDIR	      = @mandir@
 
 # Set up extensions
-HLLNAME       = perl6
 LOAD_EXT      = @load_ext@
 O             = @o@
 EXE           = @exe@
@@ -29,17 +30,24 @@
 MAKE          = @make_c@
 PERL          = @perl@
 RM_F          = @rm_f@
-PARROT        = ../../parrot$(EXE)
+CP            = @cp@
+
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
 BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
 BUILD_DYNOPS  = $(PERL) $(BUILD_DIR)/tools/build/dynoplibs.pl
 RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe$(EXE)
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+DOCS = README MAINTAINER ROADMAP docs/compiler_overview.pod docs/glossary.pod docs/STATUS
+
+build: perl6.pbc Test.pir
 
-all: perl6.pbc Test.pir
+all: build perl6$(EXE) installable
 
 xmas: perl6$(EXE)
 
@@ -119,7 +127,7 @@
 	$(PBC_TO_EXE) perl6.pbc
 
 # the default target
-perl6.pbc: $(PARROT) $(SOURCES)
+perl6.pbc: $(PARROT) $(SOURCES) $(BUILTINS_PIR)
 	$(PARROT) $(PARROT_ARGS) -o perl6.pbc perl6.pir
 
 installable_perl6$(EXE): perl6.pbc
@@ -128,8 +136,8 @@
 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
+$(PERL6GRAMMAR): $(PARROT_LIB)/PGE/Perl6Grammar.pir
+	cd $(BUILD_DIR) && $(PARROT) $(PARROT_ARGS) -o $(PERL6GRAMMAR) $(PARROT_LIB)/PGE/Perl6Grammar.pir
 
 src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
 	$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
@@ -146,7 +154,7 @@
 src/gen_junction.pir: build/gen_junction_pir.pl
 	$(PERL) build/gen_junction_pir.pl src/gen_junction.pir
 
-$(PERL6_GROUP):  $(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)
@@ -251,23 +259,26 @@
 	./installable_$(HLLNAME)@exe@ -e'say 1'
 
 install : installable
-	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/perl6@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-perl6@exe@
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/rakudo@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
 	@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
+#IF(has_pod2man):	$(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)
+installable : installable_$(HLLNAME)@exe@ $(PERL6_GROUP) $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 	@cd $(PMC_DIR) && $(BUILD_DYNPMC) copy "--destination=$(PARROT_DYNEXT)" $(PMCS)
 	@cd $(OPSDIR)  && $(BUILD_DYNOPS) copy "--destination=$(PARROT_DYNEXT)" $(OPSLIB)
 
 CLEANUPS = \
   perl6.pbc \
   perl6.c \
-  *.manifest \
-  *.pdb \
+#IF(win32):  *.manifest \
+#IF(win32):  *.pdb \
   perl6$(O) \
   perl6$(EXE) \
   installable_perl6$(EXE) \
@@ -280,11 +291,11 @@
   $(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 \
+#IF(win32):  $(PMC_DIR)/*.exp \
+#IF(win32):  $(PMC_DIR)/*.ilk \
+#IF(win32):  $(PMC_DIR)/*.manifest \
+#IF(win32):  $(PMC_DIR)/*.pdb \
+#IF(win32):  $(PMC_DIR)/*.lib \
   $(PMC_DIR)/objectref.pmc \
   $(OPSDIR)/*.h \
   $(OPSDIR)/*.c \

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 09:09:53 2008
@@ -36,10 +36,11 @@
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
 PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
-PBC_TO_EXE    = $(BUILD_DIR)/pbc_to_exe@exe@
 
 
-all: perl6doc.pbc
+build: perl6doc.pbc
+
+all: perl6doc.pbc Makefile perl6doc@exe@ installable
 
 PERL6DOC_SOURCES = \
   perl6doc.pir \

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 09:09:53 2008
@@ -13,19 +13,21 @@
 RM_F          = @rm_f@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN	      = @
 EXE           = @exe@
+#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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
 TGE_DIR       = ../../compilers/tge
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
 PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 DOCS = MAINTAINER MANIFEST README TODO
 
@@ -59,7 +61,7 @@
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  all:               pheme.pbc"
+	@echo "  build:             pheme.pbc"
 	@echo "                     This is the default."
 	@echo "  installable:       Create self-hosting bins and libs."
 	@echo "  install:           Install the installable targets and docs."
@@ -90,17 +92,19 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 clean: testclean
-	$(RM_F) pheme.pbc
+	$(RM_F) pheme.pbc pheme@exe@
 	$(RM_F) lib/pheme_grammar_gen.pir
-	$(RM_F) lib/*.pbc
+	$(RM_F) lib/*.pbc $(PARROT_LIB)/$(HLLNAME).pbc installable_*
 	$(RM_F) lib/ASTGrammar.pir
 
 realclean: clean

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 09:09:53 2008
@@ -12,14 +12,12 @@
 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)
@@ -35,7 +33,7 @@
 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
+PCT           = $(PARROT_LIB)/PCT.pbc
 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@

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 09:09:53 2008
@@ -1,36 +1,38 @@
 # $Id$
 
 # Setup some commands
-HLLNAME          = punie
+HLLNAME       = punie
 LN_S          = @lns@
 PERL          = @perl@
 RM_F          = @rm_f@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#IF(has_pod2man):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
-#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
+#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        = ../../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
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PGE_DIR       = $(BUILD_DIR)/compilers/pge
+NQP_DIR       = $(BUILD_DIR)/compilers/nqp
 
 DOCS = MAINTAINER README overview.pod
 
 # the default target
-all: punie.pbc
+build: punie.pbc
 
 all: punie.pbc punie@exe@ installable_punie@exe@
 
@@ -40,7 +42,7 @@
   src/builtins/builtins.pir \
 
 # the default target
-punie.pbc:  $(NQP_DIR)/nqp.pbc $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES)
+punie.pbc: $(PARROT) $(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
@@ -82,15 +84,17 @@
 
 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) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install
@@ -102,6 +106,7 @@
   punie.pbc \
   src/gen_punie.pir \
   src/gen_punie-actions.pir \
+  $(PARROT_LIB)/$(HLLNAME).pbc punie@exe@ installable_*
 
 clean: testclean
 	$(RM_F) $(CLEANUPS)

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 09:09:53 2008
@@ -1,36 +1,52 @@
 # $Id$
 
 ## arguments we want to run parrot with
-PARROT_ARGS =
+HLLNAME       = pynie
+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@
+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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
+PCT           = $(PARROT_LIB)/PCT.pbc
 PERL6GRAMMAR  = $(PGE_LIBRARY)/Perl6Grammar.pbc
 NQP           = $(BUILD_DIR)/compilers/nqp/nqp.pbc
-PCT           = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc
 
 PMC_DIR       = src/pmc
 
-all: pynie.pbc
+DOCS = MAINTAINER README
+
+build : pynie.pbc
+
+all: pynie.pbc Makefile pynie@exe@ installable
 
 SOURCES = pynie.pir \
   src/gen_grammar.pir \
@@ -92,25 +108,29 @@
 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
 
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) pynie.pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/$(HLLNAME)
+
 CLEANUPS = \
   pynie.pbc \
   src/gen_grammar.pir \
   src/gen_actions.pir \
+  $(PARROT_LIB)/$(HLLNAME).pbc \
+  $(HLLNAME)@exe@ installable_*
 
 clean:
 	$(RM_RF) $(CLEANUPS)

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 09:09:53 2008
@@ -2,26 +2,11 @@
 # $Id$
 
 # Makefile for languages/regex
-HLLNAME       = regex
-
-# Set up commands
-PERL          = @perl@
-RM_F          = @rm_f@
-YAPP          = yapp
-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@
+HLLNAME	      = regex-compiler
 
 # Set up directories
-BUILD_DIR     = @build_dir@
 PMC_DIR       = pmc
-PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
+BUILD_DIR     = @build_dir@
 BIN_DIR       = @bin_dir@
 LIB_DIR       = @lib_dir@
 DOC_DIR       = @doc_dir@
@@ -31,12 +16,33 @@
 LOAD_EXT      = @load_ext@
 O             = @o@
 
+# 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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+PERL          = @perl@
+RM_F          = @rm_f@
+YAPP          = yapp
+CP            = @cp@
+MKPATH        = @mkpath@
+#IF(has_pod2man):POD2MAN       = pod2man
+BUILD_DYNPMC  = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
+PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+
 PMCS = match matchrange
 
 PMC_SOURCES = $(PMC_DIR)/match.pmc $(PMC_DIR)/matchrange.pmc
 
 build : lib/Regex/Grammar.pm $(PMC_DIR)/match_group$(LOAD_EXT) regex-compiler.pbc
 
+all : build Makefile regex-compiler@exe@ installable
+
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
 	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=regex
@@ -47,12 +53,33 @@
 regex-compiler.pbc : regex-compiler.pir
 	$(PARROT) -o regex-compiler.pbc regex-compiler.pir
 
-$(PMC_DIR)/match_group$(LOAD_EXT):  $(PMC_SOURCES)
+regex-compiler@exe@ : regex-compiler.pbc
+	$(PBC_TO_EXE) regex-compiler.pbc
+
+$(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)
 	cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)
 
+installable : installable_regex-compiler@exe@ regex-compiler.pbc
+	$(CP) installable_regex-compiler@exe@ $(BUILD_DIR)
+	$(CP) regex-compiler.pbc $(PARROT_LIB)/regex-compiler.pbc
+
+installable_regex-compiler@exe@: regex-compiler.pbc
+	$(PBC_TO_EXE) regex-compiler.pbc --install
+
+# TODO: test for installed libs, rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ "(a+)?a" "aa"
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
+	$(CP) regex-compiler.pbc $(DESTDIR)$(LIB_DIR)/parrot/library/regex-compiler.pbc
+#IF(has_pod2man):	$(POD2MAN) regex-compiler.pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/regex
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/regex
+
 # Note: These tend to be in the order of the latest thing I've been
 # working on to the oldest, so that I see the failures quicker.
 .PHONY: test
@@ -72,13 +99,14 @@
   $(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 \
+#IF(win32):  $(PMC_DIR)/*.exp \
+#IF(win32):  $(PMC_DIR)/*.ilk \
+#IF(win32):  $(PMC_DIR)/*.manifest \
+#IF(win32):  $(PMC_DIR)/*.pdb \
+#IF(win32):  $(PMC_DIR)/*.lib \
   test_regex.pir \
-  test_regex.pbc
+  test_regex.pbc \
+  $(PARROT_LIB)/regex-compiler.pbc
 
 clean:
 	$(RM_F) $(CLEANUPS)

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 09:09:53 2008
@@ -2,19 +2,15 @@
 # $Id$
 
 # Makefile for languages/scheme
-HLLNAME          = scheme
+HLLNAME       = scheme
 
 # Set up commands
 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@
-PBC_TO_EXE    = $(SHRPENV) ../../pbc_to_exe@exe@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 # Set up directories
 BUILD_DIR     = @build_dir@

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 09:09:53 2008
@@ -4,7 +4,7 @@
 PARROT_ARGS =
 
 ## configuration settings
-HLLNAME          = squaak
+HLLNAME       = squaak
 BUILD_DIR     = @build_dir@
 LOAD_EXT      = @load_ext@
 O             = @o@
@@ -19,24 +19,26 @@
 RM_RF         = @rm_rf@
 CP            = @cp@
 MKPATH        = @mkpath@
-POD2MAN       = @pod2man@
+#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        = ../../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
-#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@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
-PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+PGE_LIBRARY   = $(PARROT_LIB)/PGE
+PCT           = $(PARROT_LIB)/PCT.pbc
 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@
 
 build: squaak.pbc
 
@@ -45,7 +47,7 @@
 SOURCES = squaak.pir \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.pir \
+  src/gen_builtins.pir
 
 BUILTINS_PIR = \
   src/builtins/say.pir \
@@ -62,7 +64,7 @@
   pod/tutorial_episode_9.pod
 
 # the default target
-squaak.pbc:  $(SOURCES)
+squaak.pbc: $(PARROT) $(SOURCES)
 	$(PARROT) $(PARROT_ARGS) -o squaak.pbc squaak.pir
 
 squaak@exe@: $(HLLNAME).pbc
@@ -86,12 +88,14 @@
 
 install : installable
 	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-$(HLLNAME)@exe@
-	$(POD2MAN) squaak.pir > $(DESTDIR)$(MANDIR)/man1/parrot-$(HLLNAME).1
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(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@
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
 	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
 
 installable_$(HLLNAME)@exe@ : $(HLLNAME).pbc
 	$(PBC_TO_EXE) $(HLLNAME).pbc --install
@@ -134,7 +138,8 @@
   squaak.pbc \
   src/gen_grammar.pir \
   src/gen_actions.pir \
-  src/gen_builtins.pir
+  src/gen_builtins.pir \
+  $(PARROT_LIB)/$(HLLNAME).pbc $(HLLNAME)@exe@ installable_*
 
 clean:
 	$(RM_RF) $(CLEANUPS)

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 09:09:53 2008
@@ -14,30 +14,52 @@
 MANDIR	      = @mandir@
 
 # Set up commands
-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@
+PERL          = @perl@
+RM_F          = @rm_f@
+CP            = @cp@
+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        = ../../parrot@exe@
+PBC_TO_EXE    = ../../pbc_to_exe@exe@
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+
+## places to look for things
+PARROT_LIB    = $(BUILD_DIR)/runtime/parrot/library
+
+DOCS = MAINTAINER README
 
 # The default target
-default: build
+build : $(HLLNAME).pbc
+
+all : $(HLLNAME).pbc $(HLLNAME)@exe@ Makefile installable
 
 help :
 	@echo ""
 	@echo "Following targets are available for the user:"
 	@echo ""
-	@echo "  build:             does nothing."
+	@echo "  build:             unlambda.pbc"
 	@echo "                     This is the default target."
+	@echo "  all:               unlambda.pbc unlambda@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."
 	@echo ""
+	@echo "Cleaning:"
 	@echo "  clean:             Clean up temporary files."
-	@echo ""
 	@echo "  realclean:         Clean up generated files."
 	@echo ""
+	@echo "Misc:"
 	@echo "  help:              Print this help message."
+	@echo ""
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
@@ -47,18 +69,49 @@
 build:
 	@echo "nothing to do"
 
-# cleaning up
+$(HLLNAME).pbc: unl.pir
+	$(PARROT) $(PARROT_ARGS) -o $@ unl.pir
 
-clean: 
-	@echo "nothing to do"
+$(HLLNAME)@exe@ : $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc
 
-realclean: clean
-	$(RM_F) Makefile
+installable : installable_$(HLLNAME)@exe@ $(HLLNAME).pbc
+	$(CP) installable_$(HLLNAME)@exe@ $(BUILD_DIR)
+	$(CP) $(HLLNAME).pbc $(PARROT_LIB)/$(HLLNAME).pbc
+
+installable_unlambda@exe@: $(HLLNAME).pbc
+	$(PBC_TO_EXE) $(HLLNAME).pbc --install
+
+# TODO: test for installed libs, rename build_dir. basic run for missing libs
+test-installable : installable
+	./installable_$(HLLNAME)@exe@ examples/h.unl
+
+install : installable
+	$(CP) installable_$(HLLNAME)@exe@ $(DESTDIR)$(BIN_DIR)/parrot-unlambda@exe@
+	$(CP) $(HLLNAME).pbc $(DESTDIR)$(LIB_DIR)/parrot/library/$(HLLNAME).pbc
+#IF(has_pod2man):	$(POD2MAN) $(HLLNAME).pir > $(DESTDIR)$(MANDIR)/man1/parrot-unlambda.1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/unlambda
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/unlambda
 
 # testing
 test: build
 	$(PERL) t/harness
 
+# cleaning up
+CLEANUPS = \
+  $(HLLNAME).pbc \
+  $(HLLNAME)@exe@ \
+  installable_$(HLLNAME)@exe@ \
+  $(PARROT_LIB)/$(HLLNAME).pbc
+
+clean:
+	$(RM_F) $(CLEANUPS)
+
+testclean: clean
+
+realclean: clean
+	$(RM_F) Makefile
+
 #
 # Local variables:
 # mode: makefile

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 09:09:53 2008
@@ -5,14 +5,19 @@
 # Setup of some commands
 RM_F          = @rm_f@
 PERL          = @perl@
+CP            = @cp@
 BUILD_DIR     = @build_dir@
+BIN_DIR       = @bin_dir@
+DOC_DIR       = @doc_dir@
+MANDIR	      = @mandir@
+
+#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        = ../../parrot@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) ../../parrot@exe@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 default: all
 
@@ -63,6 +68,10 @@
 
 install : build
 	$(CP) urmc $(DESTDIR)$(BIN_DIR)/parrot-urmc
+#IF(has_pod2man):	$(MKPATH) $(DESTDIR)$(MANDIR)/man1
+#IF(has_pod2man):	$(POD2MAN) urmc > $(DESTDIR)$(MANDIR)/man1/parrot-urmc.1
+	$(MKPATH) $(DESTDIR)$(DOC_DIR)/languages/unlambda
+	$(CP) $(DOCS) $(DESTDIR)$(DOC_DIR)/languages/unlambda
 
 installable: build
 

Modified: branches/pdd30install_stage3/lib/Parrot/Configure/Compiler.pm
==============================================================================
--- branches/pdd30install_stage3/lib/Parrot/Configure/Compiler.pm	(original)
+++ branches/pdd30install_stage3/lib/Parrot/Configure/Compiler.pm	Sun Dec 28 09:09:53 2008
@@ -33,6 +33,7 @@
     _run_command _build_compile_command
     move_if_diff
 );
+my $DEBUG;
 
 our %file_types_info = (
     makefile => {
@@ -210,17 +211,62 @@
 Its value will be detected automatically by target file name unless you set
 it to a special value C<none>.
 
-=item conditioned_lines
+=item conditioned_lines #IF #UNLESS #ELSIF #ELSE
 
-If C<conditioned_lines> is true, then lines in the file that begin with:
-C<#CONDITIONED_LINE(var):> are skipped if the C<var> condition is false. Lines
-that begin with C<#INVERSE_CONDITIONED_LINE(var):> are skipped if
-the C<var> condition is true.  For instance:
+If conditioned_lines is true, then several expressions at the first column
+are evaluated and replaced by the content after the C<:> dependending on
+the evaluation of the expression.
+
+Lines beginning with C<#IF(expr):> are skipped if the expr
+condition is false, otherwise the content after the C<:> is inserted.
+Lines beginning with C<#UNLESS(expr):> are skipped if the expr condition
+is true, otherwise the content after the C<:> is inserted.
+Lines beginning with C<#ELSIF(expr):> or C<#ELSE:> are evaluated if the
+former C<#IF(expr):> evaluated to false.
+
+A condition expr may be:
+
+  * a single key, which is true if a config key is true
+    - not 0 and not undef and not an empty string,
+  * or equal to the platform name, the osname - case-sensitive,
+  * or a C<key==value> expression, which checks for the config key,
+    Note that values may contain no spaces here. Quotes in values
+    are not supported.
+  * or a logical combination of C<|>, C<OR>, C<&>, C<AND>, C<!>, C<NOT>,
+    The verbose ops AND, OR and NOT are case-insensitive.
+    ! and NOT bind closer than &, AND and |, OR.
+    The order of precedence for AND and OR is undefined.
 
-  #CONDITIONED_LINE(win32): $(SRC_DIR)/atomic/gcc_x86$(O)
+A key must only consist of the chars A-Z a-z 0-9 _ -, and is checked
+case-sensitively against the config key or the platform name.
+
+For instance:
+
+  #IF(win32): $(SRC_DIR)/atomic/gcc_x86$(O)
 
 will be processed if the platform is win32.
 
+  #IF(cpuarch==i386): $(SRC_DIR)/atomic/gcc_x86$(O)
+
+will be skipped if the value of the config key "cpuarch" is not "i386".
+
+  #IF(cpuarch==i386): $(SRC_DIR)/atomic/gcc_x86$(O)
+  #ELSIF(cpuarch==sparcv9): $(SRC_DIR)/atomic/sparc_v9.s
+  #ELSE:
+
+will use " $(SRC_DIR)/atomic/gcc_x86$(O)" on cpuarch "i386",
+" $(SRC_DIR)/atomic/sparc_v9.s" on cpuarch "sparcv9"
+and print an empty line otherwise.
+
+  #IF(win32 and glut and not cygwin):
+
+will be used on win32 and if glut is defined, but not on cygwin.
+
+B<Legacy Syntax:>
+
+The old syntax #CONDITIONED_LINE(var): and
+#INVERSE_CONDITIONED_LINE(var): is still supported, but is deprecated.
+
 =item comment_type
 
 This option takes has two possible values, C<#> or C</*>. If present and
@@ -294,6 +340,7 @@
 
     open my $in,  '<', $source       or die "Can't open $source: $!";
     open my $out, '>', "$target.tmp" or die "Can't open $target.tmp: $!";
+    $DEBUG++ if $ENV{TEST_VERBOSE};
 
     if ( !exists $options{file_type}) {
         if ( $target =~ m/makefile$/i ) {
@@ -360,6 +407,8 @@
     # this loop can not be implemented as a foreach loop as the body
     # is dependent on <IN> being evaluated lazily
 
+    my $former_truth = 99;
+  LINE:
     while ( my $line = <$in> ) {
 
         # everything after the line starting with #perl is eval'ed
@@ -376,16 +425,46 @@
             $text =~ s{ \@ (\w+) \@ }{\$conf->data->get("$1")}gx;
             eval $text;
             die $@ if $@;
-            last;
+            last LINE;
         }
         if ( $options{conditioned_lines} ) {
-            if ( $line =~ m/^#CONDITIONED_LINE\(([^)]+)\):(.*)/s ) {
-                next unless $conf->data->get($1);
-                $line = $2;
-            }
-            elsif ( $line =~ m/^#INVERSE_CONDITIONED_LINE\(([^)]+)\):(.*)/s ) {
-                next if $conf->data->get($1);
-                $line = $2;
+            my ($op, $expr, $rest);
+            # allow multiple keys and nested parens here
+            if (($op,$expr,$rest)=($line =~ m/^#(IF|UNLESS|ELSIF)\((.+)\):(.*)/s)) {
+                if (($op eq 'ELSIF') and $former_truth) {
+                    next LINE;  # no useless check if former IF was true
+                }
+                my $truth = cond_eval($conf, $expr);
+                if ($op eq 'IF') {
+                    $former_truth = $truth;
+                    next LINE unless $truth;
+                }
+                elsif ($op eq 'UNLESS') {
+                    $former_truth = !$truth;
+                    next LINE if $truth;
+                }
+                elsif ($op eq 'ELSIF') {
+                    $former_truth = $truth;
+                    next LINE unless $truth;
+                }
+                $line = $rest;
+            }
+            elsif ( $former_truth != 99 and $line =~ m/^#ELSE:(.*)/s ) {
+                next LINE if $former_truth;
+                $line = $1;
+            }
+            # Legacy, DEPRECATED.
+            elsif (($expr,$rest)=($line =~ m/^#CONDITIONED_LINE\(([^)]+)\):(.*)/s)) {
+                next LINE unless cond_eval($conf, $expr);
+                $line = $rest;
+            }
+            elsif (($expr,$rest)=($line =~ m/^#INVERSE_CONDITIONED_LINE\(([^)]+)\):(.*)/s )) {
+                next LINE if cond_eval($conf, $expr);
+                $line = $rest;
+            }
+
+            else { # reset
+                $former_truth = 99; # ELSE must immediately follow a conditional.
             }
         }
 
@@ -485,6 +564,131 @@
     move_if_diff( "$target.tmp", $target, $options{ignore_pattern} );
 }
 
+# Return the next subexpression from the expression in $_[0]
+# and remove it from the input expression.
+# Allowed chars: A-Z a-z 0-9 _ -, so let's take [-\w].
+# E.g. "(not win32 and has_glut)"
+#        => not win32 => has_glut
+#      "(!win32&has_glut)|cygwin"   - perl-style
+#        !win32&has_glut => !win32 => &has_glut => |cygwin
+sub next_expr {
+    my $s = $_[0];
+    return "" unless $s;
+    # start of a subexpression?
+    if ($s =~ /^\((.+)\)\s*(.*)/o) {    # longest match to matching closing paren
+        $_[0] = $2 ? $2 : "";           # modify the 2nd arg
+        print "#** nextsub \"$s\" => (\"$1\",\"$_[0]\")\n" if $DEBUG;
+        return $1;
+    }
+    else {
+        $s =~ s/^\s+//;                 # left-trim to make it more robust
+        if ($s =~ m/^([-\w=]+)\s*(.*)?/o) { # shortest match to next non-word char
+            # start with word expr
+            $_[0] = $2 ? $2 : "";       # modify the 2nd arg expr in the caller
+            print "#** nextexpr \"$s\" => (\"$1\",\"$_[0]\")\n" if $DEBUG;
+            return $1;
+        }
+        else {
+            # special case: start with non-word op (perl-syntax only)
+            $s =~ m/^([|&!])\s*(.*)?/o; # shortest match to next word char
+            $_[0] = $2 ? $2 : "";       # modify the 2nd arg expr in the caller
+            print "#** nextop \"$s\" => (\"$1\",\"$_[0]\")\n" if $DEBUG;
+            return $1;
+        }
+    }
+}
+
+# Checks the logical truth of the hash value: exists and not empty.
+# Also check the platform name, the 'osname' key, if the hash key does not exist.
+# Also check for key==value, like #IF(ld==gcc)
+sub cond_eval_single {
+    my $conf = $_[0];
+    my $key  = $_[1];
+    return unless defined $key;
+    if ($key =~ /^([-\w]+)==(.+)$/) {
+        return ($2 eq $conf->data->get($1));
+    }
+    else {
+        return exists($conf->data->{c}->{$key})
+            ? ($conf->data()->get($key) ? 1 : 0)
+            : $key eq $conf->data()->get('osname');
+    }
+}
+
+sub truth { $_[0] ? "true" : "false"; }
+
+# Recursively evaluate boolean expressions with multiple keys and | & ! ops.
+# Order of precedence: Just "!" and "NOT" binds tighter than AND and OR.
+# There's no precedence for AND over OR defined, just left to right.
+sub cond_eval {
+    my $conf = $_[0];
+    my $expr = $_[1];
+    my @count = split /[\s!&|\(]+/, $expr; # optimizable with tr
+    if (@count > 1) { # multiple keys: recurse into
+        my $truth = 0;
+        my $prevtruth = 0;
+        my $key = next_expr($expr);
+        my $op  = '';
+      LOOP:
+        while ($key) {
+            if (($key eq '!') or (uc($key) eq 'NOT')) {
+                # bind next key immediately
+                $op = 'NOT';
+                $key = next_expr($expr);
+            }
+            elsif ($truth and ($op eq 'OR')) {
+                # true OR: => true
+                print "#* => ",truth(1)," rest=\"$expr\" SKIP on true OR\n" if $DEBUG;
+                last LOOP;
+            }
+            print "#* truth=",truth($truth)," op=\"$op\" key=\"$key\"\n" if $DEBUG;
+            $prevtruth = $truth;
+            if (!$truth and ($op eq 'AND')) { # false AND: => false, skip rest
+                print "#* => ",truth(0)," rest=\"$expr\" SKIP already false\n" if $DEBUG;
+                last LOOP;
+            }
+            $truth = cond_eval($conf, $key);
+            if ($op eq 'NOT') { # NOT *: invert
+                $truth = $truth ? 0 : 1;
+            }
+            elsif ($op eq 'AND' and !$truth) { # * AND false: => false
+                print "#* => ",truth(0)," rest=\"$expr\" SKIP rest\n" if $DEBUG;
+                last LOOP;
+            }
+            # * OR false => * (keep $truth). true OR * already handled before
+            print "#* => ",truth($truth)," rest=\"$expr\"\n" if $DEBUG;
+            my $prevexpr = $expr;
+            $op  = next_expr($expr);
+            if ($op) {
+                if ($op eq '|' or uc($op) eq 'OR') {
+                    $op = 'OR';
+                }
+                elsif ($op eq '&' or uc($op) eq 'AND') {
+                    $op = 'AND';
+                }
+                elsif ($op eq '!' or uc($op) eq 'NOT') {
+                    $op = 'NOT';
+                }
+                else {
+                    die "invalid op \"$op\" in \"$_[1]\" at \"$prevexpr\".\n";
+                }
+                $key = next_expr($expr);
+            }
+            elsif ($prevexpr) {
+                die "Makefile conditional syntax error: missing op in \"$_[1]\" at \"$prevexpr\".\n";
+            }
+            else {
+                last LOOP; # end of expr, nothing left
+            }
+            if ($prevexpr eq $expr) {
+                die "Makefile conditional parser error in \"$_[1]\" at \"$prevexpr\".\n";
+            }
+        }
+        return $truth;
+    }
+    cond_eval_single($conf, $expr);
+}
+
 sub append_configure_log {
     my $conf = shift;
     my $target = shift;

Modified: branches/pdd30install_stage3/t/steps/gen_makefiles-01.t
==============================================================================
--- branches/pdd30install_stage3/t/steps/gen_makefiles-01.t	(original)
+++ branches/pdd30install_stage3/t/steps/gen_makefiles-01.t	Sun Dec 28 09:09:53 2008
@@ -5,9 +5,80 @@
 
 use strict;
 use warnings;
-use Test::More tests =>  7;
+my @cond_tests;
+my @conf_args = ( true => 1, false => 0, value => 'xx' );
+BEGIN {
+    @cond_tests =
+      (
+       # perl-syntax       true or false
+       ["IF(true)", 		1],
+       ["IF(false)", 		0],
+       ["UNLESS(true)",	        0],
+       ["UNLESS(false)",	1],
+       ["IF(true | false)",	1],
+       ["IF(true & false)",     0],
+       ["IF(true or true)",     1],
+       ["IF(true or false)",    1],
+       ["IF(false or true)",    1],
+       ["IF(false or false)",   0],
+       ["IF(true and true)",    1],
+       ["IF(true and false)",   0],
+       ["IF(false and true)",   0],
+       ["IF(false and false)",  0],
+       ["UNLESS(true|false)",   0],
+       ["UNLESS(true&false)",   1],
+       ["IF(!false)", 		1],
+       ["IF(true)", 		1],
+       ["ELSIF(value)", 	0],
+       ["ELSE", 	        0],
+       ["IF(false)", 		0],
+       ["ELSIF(value)", 	1],
+       ["ELSE", 	        0],
+       ["IF(false)", 		0],
+       ["ELSIF(false)", 	0],
+       ["ELSE", 	        1],
+       # Strangle the parser a bit
+       ["IF(true and (!false and value))",  1],
+       ["IF(true and (!false) and value)",  1],
+       ["IF(true and !false and value)",    1, 'no parens'],
+       ["IF(true and not false and value)", 1, 'no parens'],
+       ["IF(true&!false&value)",            1],
+       ["IF(false or (!false and value))",  1, 'not parser problem'],
+       ["UNLESS(!(true&!false&value))",     1, 'no ws, but nested parens'],
+       ["IF(true&(!false&false))",          0, 'not precedence'],
+       ["IF(true&(!false&value))",          1],
+       ["IF(not true and value)",           0, 'not precedence over and'],
+       ["IF(not false and value)",          1],
+       ["IF((not false) and value)",        1],
+       ["IF(not (false and value))",        1],
+       ["IF(not (false or value))",         0],
+       ["IF(true and not false)",           1],
+       # platform
+       ["IF(someplatform)",		    1],
+       ["IF(not someplatform)",		    0],
+       ["UNLESS(someplatform)",		    0],
+       ["UNLESS(not someplatform)",	    1],
+       # key==value
+       ["IF(value==xx)",                    1],
+       ["IF(value==xxy)",                   0],
+       ["UNLESS(value==xx)",                0],
+       ["UNLESS(value==xxy)",               1],
+       ["IF(true & (value==xx & (!false)))",1],
+       # These are invalid:
+       #["IF(value == xx)",                  0], # invalid op error
+       #["IF(value = xx)",                   0], # invalid op error
+       ["IF(value=xx)",                     0], # also invalid, no warning. checks for key value=xx
+
+       # Legacy syntax                 true or false
+       ["CONDITIONED_LINE(true)", 	    1],
+       ["INVERSE_CONDITIONED_LINE(true)",   0],
+       ["CONDITIONED_LINE(false)", 	    0],
+       ["INVERSE_CONDITIONED_LINE(false)",  1],
+      );
+}
+use Test::More tests => (7 + scalar(@cond_tests));
 use Carp;
-use lib qw( lib );
+use lib qw( . lib );
 use_ok('config::gen::makefiles');
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
@@ -38,6 +109,52 @@
 is($missing_SOURCE, 0, "No Makefile source file missing");
 ok(-f $step->{CFLAGS_source}, "CFLAGS source file located");
 
+my $i = undef;
+sub result {
+    my $c = shift;
+    my $s = $c->[0];
+    $s =~ s/^\+/plus_/;
+    $s =~ s/^\-/minus_/;
+    $s =~ s/\|/OR/g;
+    $s =~ s/\&/AND/g;
+    $s =~ s/\!/NOT/g;
+    $s =~ s/[\()]//g;
+    $s =~ s/ /_/g;
+    $s .= ("_".++$i) if $s =~ /^(ELSE|ELSIF)/;
+    return $s."=".($c->[1]?"true":"false");
+}
+# test #+(keys):line RT #57548
+$conf->data->set( @conf_args, ('osname' => 'someplatform' ) );
+open IN, ">", "Makefile_$$.in";
+print IN "# There should only be =true results in .out\n";
+for my $c (@cond_tests) {
+    my $result = result($c);
+    print IN "#$c->[0]:$result\n";
+}
+close IN;
+$conf->genfile("Makefile_$$.in", "Makefile_$$.out",
+	       (makefile => 1, conditioned_lines => 1));
+open OUT, "<", "Makefile_$$.out";
+my $f;
+{
+    local $/;
+    $f = <OUT>;
+}
+END {
+    unlink "Makefile_$$.in", "Makefile_$$.out";
+}
+$i = undef;
+for my $c (@cond_tests) {
+    my $result = result($c);
+    if ($c->[2] and $c->[2] =~ /^TODO(.*)$/) {
+        local $TODO = $1;
+        ok(($c->[1] ? $f =~ /^$result$/m : $f !~ /^$result$/m), "$result");
+    }
+    else {
+        ok(($c->[1] ? $f =~ /^$result$/m : $f !~ /^$result$/m), "$result".($c->[2]?" $c->[2]":''));
+    }
+}
+
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################
@@ -60,6 +177,8 @@
 
 James E Keenan
 
+Reini Urban (#+, #-)
+
 =head1 SEE ALSO
 
 config::gen::makefiles, F<Configure.pl>.



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