aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/lib_package
diff options
context:
space:
mode:
authorGravatar Yu-Cheng Ling <ycling@google.com>2018-01-18 13:16:01 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-18 13:19:28 -0800
commit053470bc1a06b5f1cc65605bf21d48b3e92d6857 (patch)
treea523ce942e413eb973f5eba18fb400c969327fa0 /tensorflow/contrib/lite/lib_package
parentf2faebdd87e63282333d207d2c12d078baaf1f87 (diff)
Bazel rule to generate LICENSE for TFLite C library.
PiperOrigin-RevId: 182426880
Diffstat (limited to 'tensorflow/contrib/lite/lib_package')
-rw-r--r--tensorflow/contrib/lite/lib_package/BUILD16
-rwxr-xr-xtensorflow/contrib/lite/lib_package/concat_licenses.sh28
2 files changed, 44 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/lib_package/BUILD b/tensorflow/contrib/lite/lib_package/BUILD
new file mode 100644
index 0000000000..3c1b8d3d45
--- /dev/null
+++ b/tensorflow/contrib/lite/lib_package/BUILD
@@ -0,0 +1,16 @@
+package(default_visibility = ["//visibility:private"])
+
+# Create the LICENSE file for libraries that are used by TensorFlow Lite
+# C library.
+genrule(
+ name = "clicenses_generate",
+ srcs = [
+ "//third_party/eigen3:LICENSE",
+ "@arm_neon_2_x86_sse//:LICENSE",
+ "@farmhash_archive//:COPYING",
+ "@gemmlowp//:LICENSE",
+ ],
+ outs = ["LICENSE"],
+ cmd = "$(location :concat_licenses.sh) $(SRCS) >$@",
+ tools = [":concat_licenses.sh"],
+)
diff --git a/tensorflow/contrib/lite/lib_package/concat_licenses.sh b/tensorflow/contrib/lite/lib_package/concat_licenses.sh
new file mode 100755
index 0000000000..2070f64e9f
--- /dev/null
+++ b/tensorflow/contrib/lite/lib_package/concat_licenses.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+#
+# Script aimed to combining multiple license files into a single one.
+
+for f in $@
+do
+ echo "--------------------------------------------------------------------------------"
+ echo "BEGIN LICENSE FOR $f"
+ echo "--------------------------------------------------------------------------------"
+ cat $f
+ echo "--------------------------------------------------------------------------------"
+ echo "END LICENSE FOR $f"
+ echo "--------------------------------------------------------------------------------"
+done