mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Have gen/c code use relative includes
For example, gen/c/wuffs-std-gif.h now #include's "./wuffs-std-lzw.h" instead of "std/lzw.h", which removes the need to configure an -I directory when compiling it.
This commit is contained in:
1 parent
469ab1c9c1
commit
8eb9781a9d
5 files changed
+31
-13
No files matched your search
@@ -376,9 +376,10 @@ func (g *gen) genIncludes(b *buffer) error {
|
||||
}
|
||||
sort.Strings(usesList)
|
||||
|
||||
b.writes("#include \"base.h\"\n")
|
||||
b.writes("#include \"./wuffs-base.h\"\n")
|
||||
for _, use := range usesList {
|
||||
b.printf("#include \"%s.h\"\n", use)
|
||||
b.printf("#include \"./wuffs-%s.h\"\n",
|
||||
strings.Replace(use, "/", "-", -1))
|
||||
}
|
||||
|
||||
b.writeb('\n')
|
||||
|
||||
Reference in new issue
Block a user