summaryrefslogtreecommitdiff
path: root/tests/apis/rules_order/xmake.lua
blob: ea167dca94c52e7525264aac5d1aaf322e6c202b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

rule("markdown")
    add_deps("man", {order = true})
    set_extensions(".md", ".markdown")
    before_build_file(function (target, sourcefile)
        print("before_build_file: %s", sourcefile)
    end)
    on_build_file(function (target, sourcefile)
        print("on_build_file: %s", sourcefile)
    end)
    after_build_file(function (target, sourcefile)
        print("after_build_file: %s", sourcefile)
    end)

rule("man")
    set_extensions(".man")
    before_build_file(function (target, sourcefile)
        print("before_build_file: %s", sourcefile)
    end)
    on_build_file(function (target, sourcefile)
        print("on_build_file: %s", sourcefile)
    end)
    after_build_file(function (target, sourcefile)
        print("after_build_file: %s", sourcefile)
    end)

target("test")
    set_kind("binary")
    add_rules("markdown")
    add_files("src/*.c")
    add_files("src/*.md")
    add_files("src/*.man")
    before_build_file(function (target, sourcefile)
        print("target.before_build_file: %s", sourcefile)
    end)
    --[[
    on_build_file(function (target, sourcefile)
        print("target.on_build_file: %s", sourcefile)
    end)]]
    after_build_file(function (target, sourcefile)
        print("target.after_build_file: %s", sourcefile)
    end)