Home | History | Annotate | Download | only in one-true-awk
      1 cc_defaults {
      2     name: "awk-defaults",
      3 
      4     srcs: [
      5         // We remove the upstream ytab.c/ytab.h and let the build system build
      6         // awkgram.y for us. Because all the source refers to ytab.h, we have a
      7         // one-line ytab.h that includes the generated awkgram.h.
      8         "awkgram.y",
      9         "b.c",
     10         "lex.c",
     11         "lib.c",
     12         "main.c",
     13         "parse.c",
     14         // We don't build or run `maketab` because it can't cope with modern
     15         // yacc output which generates an enum rather than #defines. Luckily
     16         // the upstream prebuilt proctab.c is good enough.
     17         "proctab.c",
     18         "run.c",
     19         "tran.c",
     20     ],
     21 
     22     cflags: [
     23         "-Wall",
     24         "-Werror",
     25         "-Wextra",
     26         // Ignore a few harmless idioms widely used in this code.
     27         "-Wno-missing-field-initializers",
     28         "-Wno-self-assign",
     29         "-Wno-unused-parameter",
     30     ],
     31 }
     32 
     33 cc_binary {
     34     name: "awk",
     35     defaults: ["awk-defaults"],
     36 }
     37 
     38 cc_binary {
     39     name: "awk_vendor",
     40     defaults: ["awk-defaults"],
     41     stem: "awk",
     42     vendor: true,
     43 }
     44