Commit 30dbc81f authored by Geoffrey Lalonde's avatar Geoffrey Lalonde Committed by Andreas Schuh

Changed include directory in bazel build

parent 8935ef45
......@@ -10,7 +10,7 @@ def gflags_sources(namespace=["google", "gflags"]):
native.genrule(
name = "gflags_declare_h",
srcs = ["src/gflags_declare.h.in"],
outs = ["gflags/gflags_declare.h"],
outs = ["include/gflags/gflags_declare.h"],
cmd = ("awk '{ " +
"gsub(/@GFLAGS_NAMESPACE@/, \"" + namespace[0] + "\"); " +
"gsub(/@(HAVE_STDINT_H|HAVE_SYS_TYPES_H|HAVE_INTTYPES_H|GFLAGS_INTTYPES_FORMAT_C99)@/, \"1\"); " +
......@@ -23,7 +23,7 @@ def gflags_sources(namespace=["google", "gflags"]):
native.genrule(
name = gflags_ns_h_file.replace('.', '_'),
srcs = ["src/gflags_ns.h.in"],
outs = ["gflags/" + gflags_ns_h_file],
outs = ["include/gflags/" + gflags_ns_h_file],
cmd = ("awk '{ " +
"gsub(/@ns@/, \"" + ns + "\"); " +
"gsub(/@NS@/, \"" + ns.upper() + "\"); " +
......@@ -33,7 +33,7 @@ def gflags_sources(namespace=["google", "gflags"]):
native.genrule(
name = "gflags_h",
srcs = ["src/gflags.h.in"],
outs = ["gflags/gflags.h"],
outs = ["include/gflags/gflags.h"],
cmd = ("awk '{ " +
"gsub(/@GFLAGS_ATTRIBUTE_UNUSED@/, \"\"); " +
"gsub(/@INCLUDE_GFLAGS_NS_H@/, \"" + '\n'.join(["#include \\\"gflags/{}\\\"".format(hdr) for hdr in gflags_ns_h_files]) + "\"); " +
......@@ -42,7 +42,7 @@ def gflags_sources(namespace=["google", "gflags"]):
native.genrule(
name = "gflags_completions_h",
srcs = ["src/gflags_completions.h.in"],
outs = ["gflags/gflags_completions.h"],
outs = ["include/gflags/gflags_completions.h"],
cmd = "awk '{ gsub(/@GFLAGS_NAMESPACE@/, \"" + namespace[0] + "\"); print; }' $(<) > $(@)"
)
hdrs = [":gflags_h", ":gflags_declare_h", ":gflags_completions_h"]
......@@ -85,7 +85,7 @@ def gflags_library(hdrs=[], srcs=[], threads=1):
name = name,
hdrs = hdrs,
srcs = srcs,
includes = ["$(GENDIR)"],
includes = ["include/"],
copts = copts,
linkopts = linkopts,
visibility = ["//visibility:public"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment