File: BUILD

package info (click to toggle)
jsonnet 0.20.0%2Bds-3.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,376 kB
  • sloc: cpp: 66,583; ansic: 8,227; python: 2,833; sh: 1,948; javascript: 1,417; makefile: 196; java: 140
file content (23 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package(default_visibility = ["//visibility:public"])

filegroup(
    name = "stdlib",
    srcs = ["std.jsonnet"],
)

cc_library(
    name = "std",
    hdrs = ["std.jsonnet.h"],
    srcs = [":gen-std-jsonnet-h"],
    includes = ["."],
    linkstatic = 1,
)

genrule(
    name = "gen-std-jsonnet-h",
    srcs = ["std.jsonnet"],
    outs = ["std.jsonnet.h"],
    cmd = "((od -v -Anone -t u1 $< | tr \" \" \"\n\" | grep -v \"^$$\" " +
          "| tr \"\n\" \",\" ) && echo \"0\") > $@; " +
          "echo >> $@",
)