1 # Bazel build file for gflags
3 # See INSTALL.md for instructions for adding gflags to a Bazel workspace.
11 "src/gflags_completions.cc",
12 "src/gflags_reporting.cc",
16 ":gflags_completions_h",
23 # The config.h gets generated to the package directory of
24 # GENDIR, and we don't want to put it into the includes
25 # otherwise the dependent may pull it in by accident.
26 "-I$(GENDIR)/" + PACKAGE_NAME,
38 "-DGFLAGS_INTTYPES_FORMAT_C99",
43 visibility = ["//visibility:public"],
54 cmd = "awk '{ gsub(/^#cmakedefine/, \"//cmakedefine\"); print; }' $(<) > $(@)",
65 cmd = "awk '{ gsub(/@(GFLAGS_ATTRIBUTE_UNUSED|INCLUDE_GFLAGS_NS_H)@/, \"\"); print; }' $(<) > $(@)",
69 name = "gflags_completions_h",
71 "src/gflags_completions.h.in",
74 "gflags_completions.h",
76 cmd = "awk '{ gsub(/@GFLAGS_NAMESPACE@/, \"gflags\"); print; }' $(<) > $(@)",
80 name = "gflags_declare_h",
82 "src/gflags_declare.h.in",
88 "gsub(/@GFLAGS_NAMESPACE@/, \"gflags\"); " +
89 "gsub(/@(HAVE_STDINT_H|HAVE_SYS_TYPES_H|HAVE_INTTYPES_H|GFLAGS_INTTYPES_FORMAT_C99)@/, \"1\"); " +
90 "gsub(/@([A-Z0-9_]+)@/, \"0\"); " +
91 "print; }' $(<) > $(@)"),
101 "include/gflags/gflags.h",
102 "include/gflags/gflags_declare.h",
104 cmd = "mkdir -p $(@D)/include/gflags && cp $(SRCS) $(@D)/include/gflags",