Skip to content

Commit

Permalink
Merge pull request #10 from patzim/home-config-option
Browse files Browse the repository at this point in the history
--perl6-home and --nqp-home support
  • Loading branch information
patrickbkr committed Sep 22, 2019
2 parents 9c948ec + d250586 commit d0eed92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/Macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ A configuration variable is set either from CLI options, or as a result of
detection process performed by the `Configure.pl` script, or any other source of
information.

For example, `@libdir@` could either be set with `--libdir` option of
For example, `@perl6_home@` could either be set with `--perl6-home` option of
`Configure.pl`, or set to a default value using a value from `@prefix@`
variable.

Expand Down
14 changes: 8 additions & 6 deletions lib/NQP/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,13 @@ sub configure_relocatability {
);
}

if ( $self->{options}->{relocatable} && ($self->{options}->{'perl6-home'} || $self->{options}->{'nqp-home'} ) ) {
$self->sorry( "It's not possible to build a relocatable rakudo and use hard coded perl6-home"
. "\nor nqp-home directories. So either don't use the `--relocatable` parameter or don't"
. "\nuse the `--perl6-home` and `--nqp-home` parameters."
);
}

$self->{config}->{relocatable} =
$self->{options}->{relocatable} ? 'reloc' : 'nonreloc';
}
Expand Down Expand Up @@ -579,11 +586,6 @@ sub configure_refine_vars {
$config->{prefix} = $default;
}
$config->{prefix} = File::Spec->rel2abs( $config->{prefix} );

unless ( $config->{libdir} ) {
$config->{libdir} =
File::Spec->catdir( $config->{prefix}, 'share' );
}
}

sub parse_backends {
Expand Down Expand Up @@ -630,7 +632,7 @@ sub configure_from_options {
my $self = shift;
my $config = $self->{config};
for my $opt (
qw<prefix libdir sdkroot sysroot github-user git-protocol
qw<prefix perl6-home nqp-home sdkroot sysroot github-user git-protocol
rakudo-repo nqp-repo moar-repo roast-repo makefile-timing
relocatable reference>
)
Expand Down

0 comments on commit d0eed92

Please sign in to comment.