On 2/3/16 6:12 PM, [email protected] wrote:
I was just working on importing an existing code tree into my HW directory for 
arduino zero.

Rather than re-arrange the files, I wanted to pass include directives to the 
compiler for specific directories.

But the only option is relative paths to the compiled file. That cause includes 
like

-I../../../sam0/utils/header_files
-I../../../utils/header_files
  -I../../../../utils/header_files
-I./sam0/utils/header_files

Depending how deep in the tree the compiler was working.  it'd be nice to have 
an option to have include paths that were absolute and referenced to the 
egg.yml file


Just to summarize: this is the same directory specified multiple times in the egg.yml file, because as the newt tool descends the include path, there is nothing relative to the egg itself to anchor it.

I think we should add a variable "egg_path" that can be referenced in a given egg's egg.yml file. So this would become:

egg.cflags: -I{{egg_path}}/src/sam0/utils/header_files

This means we need to come up with a syntax for variable names in YAML files, as we'll need to do a string replace in order to fix this. Options are: {{var}}, $(var), suggest your alternative here. Anyone feel strongly?

Sterling

Reply via email to