Replies: 2 comments
-
use on_buildcmd_file or on_build_file rule("test")
set_extensions(".md")
on_buildcmd_file(function (target, batchcmds, sourcefile, opt)
end)
we can also use on_buildcmd_file or on_build_file to generate multiple output files
we can use on_buildcmd_files or on_build_files or on_build or on_link rule("test")
set_extensions(".xxx")
on_buildcmd_files(function (target, batchcmd, sourcebatch, opt)
-- generate single output file
end)
on_link(function ()
-- disable link
end)
use on_buildcmd_files or on_build_files or on_build |
Beta Was this translation helpful? Give feedback.
-
finished this one; opened a PR in the docs repo for it
yes but that just gives you a list of all .xxx files which were added to the target. if you have (a1, ..., an) -> a then that works fine. if you have (a1, a2) -> a and (b1, b2) -> b in the same target, you have to set custom properties when you go to do add_files or you have to carry the mappings via set_values. the cleanest way seems to be to make a separate target for a and b which you then have the project depend on. but this requires using the what i experimented with is using either custom properties in add_rules and carrying meta-data in set_values, and using separate targets. for example you can do something like
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using build_file:
1 is already done and PR'd
Using build_files:
Using buildcmd:
Using buildcmd_files:
I may be able to PR these as I figure them out.
Beta Was this translation helpful? Give feedback.
All reactions