diff options
| author | ruki <[email protected]> | 2020-11-29 17:48:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-29 17:48:51 +0800 |
| commit | d48118e840fc0be69f3d78a3894e4bf76b8d801b (patch) | |
| tree | a1c8cc286e5ea36e1a1a275c93dfdb2d3b56113c /xmake/rules | |
| parent | df66e75b59c300af221c647faadb58d9db527abd (diff) | |
export yacc includedirs
Diffstat (limited to 'xmake/rules')
| -rw-r--r-- | xmake/rules/lex_yacc/lex/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/lex_yacc/yacc/xmake.lua | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/xmake/rules/lex_yacc/lex/xmake.lua b/xmake/rules/lex_yacc/lex/xmake.lua index 382081730..2993eedb5 100644 --- a/xmake/rules/lex_yacc/lex/xmake.lua +++ b/xmake/rules/lex_yacc/lex/xmake.lua @@ -69,7 +69,7 @@ rule("lex") local compinst = compiler.load((extension == ".ll" and "cxx" or "cc"), {target = target}) -- get compile flags - local compflags = compinst:compflags({target = target, sourcefile = sourcefile_cx, configs = {includedirs = sourcefile_dir}}) + local compflags = compinst:compflags({target = target, sourcefile = sourcefile_cx}) -- add objectfile table.insert(target:objectfiles(), objectfile) diff --git a/xmake/rules/lex_yacc/yacc/xmake.lua b/xmake/rules/lex_yacc/yacc/xmake.lua index 460b977ef..c5fa5ad34 100644 --- a/xmake/rules/lex_yacc/yacc/xmake.lua +++ b/xmake/rules/lex_yacc/yacc/xmake.lua @@ -74,6 +74,9 @@ rule("yacc") -- add objectfile table.insert(target:objectfiles(), objectfile) + -- add includedirs + target:add("includedirs", sourcefile_dir) + -- load dependent info local dependfile = target:dependfile(objectfile) local dependinfo = option.get("rebuild") and {} or (depend.load(dependfile) or {}) |
