Including files from within a style (dir or subdir) works fine, but I can’t make including from another style work as expected.
From the style manual:
Let’s assume a dir “MyStyles” with two subdirs “Style1” and “Style2”, referenced for mkgmap by “–style-file=/…/MyStyles” and “style=Style1” for example. Both styles get listed due to “–list-styles”.
Including a file “MyInclude” from within Style1’s line-file directly from Style1 or from a subdir “/inc/MyInclude” works as expected.
But having statements like
include "MyInclude" from Style1;
include "/inc/MyInclude" from Style1;
in Style2’s line-file fails either way with error output like
This does neither work using full path’s for Style1 using from, nor directly for MyInclude.
Hence I do neither understand the manuals
Actually I’m looking for means to nonredundantly share a block between styles, hence would prefer to have “MyInclude” separately and not as part of one style anyway.
Referencing a link “/style2/LinkToMyIncludeFromStyle1” pointing to “MyInclude” under Style1 in the include statement of Style2’s lines-file (include “LinkToMyIncludeFromStyle1” does work for the sample above and such might even serve to provide a separate location for include blocks.
But still: What am I misunderstanding or doing wrong following the manual?
In the meantime I found an example for shared rules in https://github.com/aiomaster/aiostyles/
The main style files contain lots of shared includes. Hope this helps.
Sitting on another machine right now. The main difference to your method was that directory inc was at the same level as the different style directories and something like
include …/inc/foo
include …/inc/bah
in the lines file.