Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--perl6-home and --nqp-home support #10

Merged
merged 2 commits into from
Sep 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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