Hi Aaron,

Aaron J Mackey [03/07/01 13:01 -0400]:
> [snip]
> Now when Inline creates the build/ directory I realize it's not smart
> enough to copy along the .h file; AUTO_INCLUDE doesn't seem to be the
> ticket.  perhaps I need to INC => '../../../' ??  That seems rash.

I've run into this before, and used something like this to solve it:

----8<----
use Cwd qw(cwd abs_path);
use Inline C => 'DATA', INC => abs_path(cwd);

foo();

__END__
__C__

#include "myheader.h"

void foo() { }
---->8----

The idea is to use an absolute path to the current directory, which will
still be valid when the source code is moved into the temporary build
area. 

Should that be the default? Should the "current directory" (the actual source
directory, not the build area) be added to the INC by default? Something like
this:

----8<----
use Inline C => DATA => ENABLE  => 'INC_CWD'; # default
use Inline C => DATA => DISABLE => 'INC_CWD'; # _don't_ include '.'
---->8----

Thoughts?

Later,
Neil

Reply via email to