blob: aed5304c5ac3a5f3ad1fdc194eb633a220f62499 [file] [log] [blame]
cc_defaults {
name: "awk-defaults",
srcs: [
// We remove the upstream ytab.c/ytab.h and let the build system build
// awkgram.y for us. Because all the source refers to ytab.h, we have a
// one-line ytab.h that includes the generated awkgram.h.
"awkgram.y",
"b.c",
"lex.c",
"lib.c",
"main.c",
"parse.c",
// We don't build or run `maketab` because it can't cope with modern
// yacc output which generates an enum rather than #defines. Luckily
// the upstream prebuilt proctab.c is good enough.
"proctab.c",
"run.c",
"tran.c",
],
cflags: [
"-Wall",
"-Werror",
"-Wextra",
// Ignore a few harmless idioms widely used in this code.
"-Wno-missing-field-initializers",
"-Wno-self-assign",
"-Wno-unused-parameter",
],
}
cc_binary {
name: "awk",
defaults: ["awk-defaults"],
}
cc_binary {
name: "awk_vendor",
defaults: ["awk-defaults"],
stem: "awk",
vendor: true,
}