We can use rule() to define custom build rules to handle specific file types or build logic.
rule("markdown")
set_extensions(".md")
on_build_file(function (target, sourcefile, opt)
print("processing %s", sourcefile)
end)
target("test")
set_kind("phony")
add_files("src/*.md")
add_rules("markdown")
$ xmake