Permalink
Browse files

[GH #903] Rename dynext_libs to dynext_dirs

For consistency with the other config *dir entries.
Note that nqp also has now a --dynext-paths option.
perl6/nqp#69
  • Loading branch information...
1 parent bf57e28 commit f77520ac12a7cfe8074eecbff0f30786d874ef06 @rurban rurban committed Jan 2, 2013
Showing with 23 additions and 23 deletions.
  1. +1 −1 ChangeLog
  2. +3 −3 config/init/hints/darwin.pm
  3. +3 −3 config/init/hints/openbsd.pm
  4. +8 −8 src/library.c
  5. +8 −8 t/library/lib_search_path.t
View
@@ -12,7 +12,7 @@
postgres.pbc, ProfTest.pbc and ProfTest/*pbc, String/Utils.pbc, URI/Escape.pbc,
YAML/Dumper/Base.pbc, YAML/Dumper/Default.pbc
+ New experimental PARROT_DYNEXT environment variable
- + New experimental dynext_libs config entry (same as PARROT_DYNEXT)
+ + New experimental dynext_dirs config entry (same as PARROT_DYNEXT)
- Build
+ Generate MANIFEST.generated, cleanup MANIFEST,
removed MANIFEST_configure.generated, add installation of forgotten files
@@ -95,7 +95,7 @@ sub runstep {
. $conf->data->get('share_ext')
. '"'
);
- $darwin_selections{dynext_libs} = $flagsref->{dynext_libs} if $flagsref->{dynext_libs};
+ $darwin_selections{dynext_dirs} = $flagsref->{dynext_dirs} if $flagsref->{dynext_dirs};
my $darwin_hints = "Darwin hints settings:\n";
for my $k (sort keys %darwin_selections) {
$darwin_hints .= sprintf(" %-24s => %s\n" => (
@@ -213,7 +213,7 @@ sub _probe_for_fink {
linkflags => "-L$fink_lib_dir",
ldflags => "-L$fink_lib_dir",
ccflags => "-isystem $fink_include_dir",
- dynext_libs => $fink_lib_dir."/",
+ dynext_dirs => $fink_lib_dir."/",
);
return \%addl_flags;
}
@@ -237,7 +237,7 @@ sub _probe_for_macports {
linkflags => "-L$ports_lib_dir",
ldflags => "-L$ports_lib_dir",
ccflags => "-isystem $ports_include_dir",
- dynext_libs => $ports_lib_dir."/",
+ dynext_dirs => $ports_lib_dir."/",
);
return \%addl_flags;
}
@@ -22,10 +22,10 @@ sub runstep {
}
my $ldflags = $conf->data->get('ldflags');
- my $dynext_libs;
+ my $dynext_dirs;
if ( $ldflags !~ m|-L/usr/local/lib\b| ) {
$ldflags .= ' -L/usr/local/lib';
- $dynext_libs = '/usr/local/lib/';
+ $dynext_dirs = '/usr/local/lib/';
}
$conf->data->set(
@@ -40,7 +40,7 @@ sub runstep {
libparrot_shared_alias => "libparrot$share_ext",
libparrot_soname => "-Wl,-soname=libparrot$share_ext.$version",
);
- $conf->data->set( dynext_libs => $dynext_libs ) if $dynext_libs;
+ $conf->data->set( dynext_dirs => $dynext_dirs ) if $dynext_dirs;
if ( ( split( m/-/, $conf->data->get('archname_provisional'), 2 ) )[0] eq 'powerpc' ) {
$conf->data->set( as => 'as -mregnames' );
View
@@ -190,10 +190,10 @@ parrot_init_library_paths(PARROT_INTERP)
entry = CONST_STRING(interp, "dynext/");
VTABLE_push_string(interp, paths, entry);
{ /* EXPERIMENTAL: add dynext path from environment */
- STRING *dynext_libs = Parrot_getenv(interp, CONST_STRING(interp, "PARROT_DYNEXT"));
+ STRING *dynext_dirs = Parrot_getenv(interp, CONST_STRING(interp, "PARROT_DYNEXT"));
Parrot_warn_experimental(interp, "PARROT_DYNEXT environment variable is experimental");
- if (!STRING_IS_NULL(dynext_libs) && !STRING_IS_EMPTY(dynext_libs)) {
- add_env_paths(interp, paths, dynext_libs);
+ if (!STRING_IS_NULL(dynext_dirs) && !STRING_IS_EMPTY(dynext_dirs)) {
+ add_env_paths(interp, paths, dynext_dirs);
}
}
@@ -234,7 +234,7 @@ Parrot_lib_update_paths_from_config_hash(PARROT_INTERP)
STRING * versionlib = NULL;
STRING * entry = NULL;
STRING * builddir = NULL;
- STRING * dynext_libs = NULL;
+ STRING * dynext_dirs = NULL;
PMC * const lib_paths =
VTABLE_get_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_LIB_PATHS);
PMC * const config_hash =
@@ -246,12 +246,12 @@ Parrot_lib_update_paths_from_config_hash(PARROT_INTERP)
STRING * const verkey = CONST_STRING(interp, "versiondir");
STRING * const builddirkey = CONST_STRING(interp, "build_dir");
STRING * const installed = CONST_STRING(interp, "installed");
- STRING * const dynextkey = CONST_STRING(interp, "dynext_libs");
+ STRING * const dynextkey = CONST_STRING(interp, "dynext_dirs");
versionlib = VTABLE_get_string_keyed_str(interp, config_hash, libkey);
entry = VTABLE_get_string_keyed_str(interp, config_hash, verkey);
versionlib = Parrot_str_concat(interp, versionlib, entry);
- dynext_libs = VTABLE_get_string_keyed_str(interp, config_hash, dynextkey);
+ dynext_dirs = VTABLE_get_string_keyed_str(interp, config_hash, dynextkey);
if (!VTABLE_get_integer_keyed_str(interp, config_hash, installed))
builddir = VTABLE_get_string_keyed_str(interp,
@@ -309,8 +309,8 @@ Parrot_lib_update_paths_from_config_hash(PARROT_INTERP)
entry = CONST_STRING(interp, "./");
VTABLE_push_string(interp, paths, entry);
#endif
- if (!STRING_IS_NULL(dynext_libs) && !STRING_IS_EMPTY(dynext_libs)) {
- add_env_paths(interp, paths, dynext_libs);
+ if (!STRING_IS_NULL(dynext_dirs) && !STRING_IS_EMPTY(dynext_dirs)) {
+ add_env_paths(interp, paths, dynext_dirs);
}
}
@@ -31,14 +31,14 @@ dynext:
dynext/
$ENV{PARROT_DYNEXT}
$prefix/parrot/$ver/dynext/
- $Config{dynext_libs}
+ $Config{dynext_dirs}
if not installed:
dynext/
$ENV{PARROT_DYNEXT}
$build_dir/runtime/parrot/dynext
- $Config{dynext_libs}
+ $Config{dynext_dirs}
library (similar for include):
if parrot is installed:
@@ -94,40 +94,40 @@ my $code = <<"CODE";
CODE
my $dynext = Parrot::Test::_pir_stdin_output_slurp('', $code);
-my $dynext_libs = $PConfig{dynext_libs};
+my $dynext_dirs = $PConfig{dynext_dirs};
my $expected =
"dynext/
/dynenvdir1/
/dynenvdir2/
$builddir/runtime/parrot/dynext/
$versionlib/dynext/
";
-$expected .= join("\n", split /$sep/, $dynext_libs)."\n" if $dynext_libs;
+$expected .= join("\n", split /$sep/, $dynext_dirs)."\n" if $dynext_dirs;
$expected .= "./\n" if $^O eq 'MSWin32';
is ($dynext, $expected, "dynext (multi ENV)");
$ENV{PARROT_DYNEXT} = "/dynenvdir";
$dynext = Parrot::Test::_pir_stdin_output_slurp('', $code);
-$dynext_libs = $PConfig{dynext_libs};
+$dynext_dirs = $PConfig{dynext_dirs};
$expected =
"dynext/
/dynenvdir/
$builddir/runtime/parrot/dynext/
$versionlib/dynext/
";
-$expected .= join("\n", split /$sep/, $dynext_libs)."\n" if $dynext_libs;
+$expected .= join("\n", split /$sep/, $dynext_dirs)."\n" if $dynext_dirs;
$expected .= "./\n" if $^O eq 'MSWin32';
is ($dynext, $expected, "dynext (single ENV)");
undef $ENV{PARROT_DYNEXT};
$dynext = Parrot::Test::_pir_stdin_output_slurp('', $code);
-$dynext_libs = $PConfig{dynext_libs};
+$dynext_dirs = $PConfig{dynext_dirs};
$expected =
"dynext/
$builddir/runtime/parrot/dynext/
$versionlib/dynext/
";
-$expected .= join("\n", split /$sep/, $dynext_libs)."\n" if $dynext_libs;
+$expected .= join("\n", split /$sep/, $dynext_dirs)."\n" if $dynext_dirs;
$expected .= "./\n" if $^O eq 'MSWin32';
is ($dynext, $expected, "dynext (no ENV)");

0 comments on commit f77520a

Please sign in to comment.