Skip to content

Commit

Permalink
Move Perl6 runtime library code to lib/
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Aug 19, 2010
1 parent f71920f commit b82b1c8
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Niecza.proj
Expand Up @@ -31,7 +31,7 @@
<Csc Sources="obj\MAIN.cs" TargetType="exe" AdditionalLibPaths="obj"
OutputAssembly="obj\MAIN.exe"
References="Test.dll;SAFE.dll;CORE.dll;Kernel.dll"/>
<Exec Command="prove -e mono obj\MAIN.exe"/>
<Exec Command="prove -e mono obj/MAIN.exe"/>
</Target>

<Target Name="WriteVersion">
Expand All @@ -41,26 +41,26 @@
<!-- Libraries -->
<Target Name="Kernel.dll" Inputs="Kernel.cs;Cursor.cs"
Outputs="obj\Kernel.dll">
<Csc Sources="Kernel.cs;Cursor.cs" TargetType="library"
<Csc Sources="lib\Kernel.cs;lib\Cursor.cs" TargetType="library"
OutputAssembly="obj\Kernel.dll"/>
<Exec Condition="$(UseAOT) == 'Y'"
Command="mono --aot obj\Kernel.dll"/>
</Target>

<Target Name="CORE.cs" Inputs="@(CompilerPerl);obj\SAFE.store;CORE.setting" Outputs="obj\CORE.cs;obj\CORE.store" DependsOnTargets="BuildSTD;SAFE.cs;Grammar;PerlTask">
<Perl Code="compile(stopafter => 'writecs', lang => 'SAFE', file => 'CORE.setting');"/>
<Target Name="CORE.cs" Inputs="@(CompilerPerl);obj\SAFE.store;lib\CORE.setting" Outputs="obj\CORE.cs;obj\CORE.store" DependsOnTargets="BuildSTD;SAFE.cs;Grammar;PerlTask">
<Perl Code="compile(stopafter => 'writecs', lang => 'SAFE', file => 'lib/CORE.setting');"/>
</Target>

<Target Name="SAFE.cs" Inputs="@(CompilerPerl);SAFE.setting"
<Target Name="SAFE.cs" Inputs="@(CompilerPerl);lib\SAFE.setting"
Outputs="obj\SAFE.cs;obj\SAFE.store"
DependsOnTargets="BuildSTD;Grammar;PerlTask">
<Perl Code="compile(stopafter => 'writecs', lang => 'NULL', file => 'SAFE.setting');"/>
<Perl Code="compile(stopafter => 'writecs', lang => 'NULL', file => 'lib/SAFE.setting');"/>
</Target>

<Target Name="Test.cs" Inputs="@(CompilerPerl);obj\CORE.store;Test.pm6"
<Target Name="Test.cs" Inputs="@(CompilerPerl);obj\CORE.store;lib\Test.pm6"
Outputs="obj\Test.cs;obj\Test.store"
DependsOnTargets="CORE.cs;BuildSTD;Grammar;PerlTask">
<Perl Code="compile(stopafter => 'writecs', lang => 'CORE', file => 'Test.pm6');"/>
<Perl Code="compile(stopafter => 'writecs', lang => 'CORE', file => 'lib/Test.pm6');"/>
</Target>

<Target Name="CORE.dll" Inputs="obj\CORE.cs;obj\SAFE.dll;obj\Kernel.dll" Outputs="obj\CORE.dll" DependsOnTargets="CORE.cs;SAFE.dll;Kernel.dll">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions src/CompilerDriver.pm
Expand Up @@ -30,10 +30,12 @@ use Storable;
use Niecza::Grammar ();
use Niecza::Actions ();

my $builddir;
my ($srcdir, $rootdir, $builddir, $libdir);
{
my $libdir = dirname($INC{'CompilerDriver.pm'});
$builddir = File::Spec->catdir($libdir, "../obj");
$srcdir = dirname($INC{'CompilerDriver.pm'});
$rootdir = dirname($srcdir);
$builddir = File::Spec->catdir($rootdir, "obj");
$libdir = File::Spec->catdir($rootdir, "lib");
}
File::Path::make_path($builddir);

Expand All @@ -57,7 +59,7 @@ sub metadata_for {
}

sub sys_get_perl6lib {
File::Spec->curdir
$libdir, File::Spec->curdir
}

sub sys_load_modinfo {
Expand Down

0 comments on commit b82b1c8

Please sign in to comment.