Commit 3d9c3f49 authored by Tom Finegan's avatar Tom Finegan

Add license text to configure generated files.

Applies to generated files with c, h, and mk extensions.

Change-Id: Id82c46673c7aad43e95a9de5058ddcfc6fd72f14
parent 63a77cbe
...@@ -340,7 +340,8 @@ EOF ...@@ -340,7 +340,8 @@ EOF
} }
write_common_config_banner() { write_common_config_banner() {
echo '# This file automatically generated by configure. Do not edit!' > config.mk print_webm_license config.mk "##" ""
echo '# This file automatically generated by configure. Do not edit!' >> config.mk
echo "TOOLCHAIN := ${toolchain}" >> config.mk echo "TOOLCHAIN := ${toolchain}" >> config.mk
case ${toolchain} in case ${toolchain} in
...@@ -367,8 +368,9 @@ true ...@@ -367,8 +368,9 @@ true
write_common_target_config_mk() { write_common_target_config_mk() {
local CC=${CC} local CC=${CC}
enabled ccache && CC="ccache ${CC}" enabled ccache && CC="ccache ${CC}"
print_webm_license $1 "##" ""
cat > $1 << EOF cat >> $1 << EOF
# This file automatically generated by configure. Do not edit! # This file automatically generated by configure. Do not edit!
SRC_PATH="$source_path" SRC_PATH="$source_path"
SRC_PATH_BARE=$source_path SRC_PATH_BARE=$source_path
...@@ -410,7 +412,8 @@ EOF ...@@ -410,7 +412,8 @@ EOF
write_common_target_config_h() { write_common_target_config_h() {
cat > ${TMP_H} << EOF print_webm_license ${TMP_H} "/*" " */"
cat >> ${TMP_H} << EOF
/* This file automatically generated by configure. Do not edit! */ /* This file automatically generated by configure. Do not edit! */
#ifndef VPX_CONFIG_H #ifndef VPX_CONFIG_H
#define VPX_CONFIG_H #define VPX_CONFIG_H
...@@ -1031,6 +1034,22 @@ print_config_h() { ...@@ -1031,6 +1034,22 @@ print_config_h() {
done done
} }
print_webm_license() {
local destination=$1
local prefix=$2
local suffix=$3
shift 3
cat <<EOF > ${destination}
${prefix} Copyright (c) 2011 The WebM project authors. All Rights Reserved.${suffix}
${prefix} ${suffix}
${prefix} Use of this source code is governed by a BSD-style license${suffix}
${prefix} that can be found in the LICENSE file in the root of the source${suffix}
${prefix} tree. An additional intellectual property rights grant can be found${suffix}
${prefix} in the file PATENTS. All contributing project authors may${suffix}
${prefix} be found in the AUTHORS file in the root of the source tree.${suffix}
EOF
}
process_targets() { process_targets() {
true; true;
} }
......
...@@ -562,7 +562,8 @@ process_toolchain() { ...@@ -562,7 +562,8 @@ process_toolchain() {
## ##
CONFIGURE_ARGS="$@" CONFIGURE_ARGS="$@"
process "$@" process "$@"
cat <<EOF > ${BUILD_PFX}vpx_config.c print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */"
cat <<EOF >> ${BUILD_PFX}vpx_config.c
static const char* const cfg = "$CONFIGURE_ARGS"; static const char* const cfg = "$CONFIGURE_ARGS";
const char *vpx_codec_build_config(void) {return cfg;} const char *vpx_codec_build_config(void) {return cfg;}
EOF EOF
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