summaryrefslogtreecommitdiff
path: root/data/RULES
blob: 17ac2d9219ca7bb183c046aa9bbfc211627bb885 (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
44
45
46
{ "staged":
  { "doc": ["Stage data to a logical subdirectory."]
  , "target_fields": ["srcs"]
  , "string_fields": ["stage"]
  , "field_doc":
    { "srcs": ["The files to be staged"]
    , "stage":
      [ "The logical directory to stage the files to."
      , "Individual directory components are joined with \"/\"."
      ]
    }
  , "expression":
    { "type": "let*"
    , "bindings":
      [ [ "stage"
        , { "type": "join"
          , "separator": "/"
          , "$1": {"type": "FIELD", "name": "stage"}
          }
        ]
      , [ "srcs"
        , { "type": "disjoint_map_union"
          , "$1":
            { "type": "foreach"
            , "var": "x"
            , "range": {"type": "FIELD", "name": "srcs"}
            , "body":
              {"type": "DEP_RUNFILES", "dep": {"type": "var", "name": "x"}}
            }
          }
        ]
      , [ "staged"
        , { "type": "to_subdir"
          , "subdir": {"type": "var", "name": "stage"}
          , "$1": {"type": "var", "name": "srcs"}
          }
        ]
      ]
    , "body":
      { "type": "RESULT"
      , "artifacts": {"type": "var", "name": "staged"}
      , "runfiles": {"type": "var", "name": "staged"}
      }
    }
  }
}