Commit 15e7ad8d authored by Afif Elghraoui's avatar Afif Elghraoui

Add support for Make include paths

There's some minor code duplication, but this is such a special
case that it does not seem worth adding a whole abstraction layer.

Closes #6
parent c05d2e17
......@@ -32,6 +32,19 @@ sub main {
$env_command .= generate_export_cmd($var, $ENV{$var});
}
Make:
# * Make is special and has a weird way of defining its include environment
# variable. See:
# <http://lists.gnu.org/archive/html/help-make/2016-05/msg00013.html>
#
# * Make's include directory is shared with C/C++ headers.
$ENV{'MAKEFLAGS'} = '' if !defined $ENV{'MAKEFLAGS'};
foreach my $element (@{$variables{'CPATH'}}) {
$ENV{'MAKEFLAGS'} = "-I$prefix/$element $ENV{'MAKEFLAGS'}";
}
$env_command .= generate_export_cmd('MAKEFLAGS', $ENV{'MAKEFLAGS'});
print $env_command;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment