program
comment "#!/bin/sh"
comment "# SPDX-License-Identifier: GPL-2.0"
comment "#"
comment "# merge_config.sh - Takes a list of config fragment values,"...
comment "# them one by one. Provides warnings on overridden values, "...
comment "# values that did not make it to the resulting .config file"...
comment "# dependencies or config symbol removal)."
comment "#"
comment "# Portions reused from kconf_check and generate_cfg:"
comment "# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-to"...
comment "# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-to"...
comment "#"
comment "# Copyright (c) 2009-2010 Wind River Systems, Inc."
comment "# Copyright 2011 Linaro"
command
command_name
word "set"
word "-e"
function_definition (+28 nodes collapsed)
function_definition (+88 nodes collapsed)
variable_assignment
variable_name "RUNMAKE"
= "="
word "true"
variable_assignment
variable_name "ALLTARGET"
= "="
word "alldefconfig"
variable_assignment
variable_name "WARNREDUN"
= "="
word "false"
variable_assignment
variable_name "BUILTIN"
= "="
word "false"
variable_assignment
variable_name "OUTPUT"
= "="
word "."
variable_assignment
variable_name "STRICT"
= "="
word "false"
variable_assignment
variable_name "CONFIG_PREFIX"
= "="
expansion
${ "${"
variable_name "CONFIG_"
- "-"
word "CONFIG_"
} "}"
variable_assignment
variable_name "WARNOVERRIDE"
= "="
word "echo"
if_statement
if "if"
test_command
[ "["
unary_expression
test_operator "-z"
string
" "\""
simple_expansion
$ "$"
variable_name "AWK"
" "\""
] "]"
; ";"
then "then"
variable_assignment
variable_name "AWK"
= "="
word "awk"
fi "fi"
while_statement (+205 nodes collapsed)
if_statement (+23 nodes collapsed)
if_statement (+57 nodes collapsed)
variable_assignment
variable_name "INITFILE"
= "="
simple_expansion
$ "$"
variable_name "1"
command
command_name
word "shift"
; ";"
if_statement (+42 nodes collapsed)
variable_assignment
variable_name "MERGE_LIST"
= "="
simple_expansion
$ "$"
special_variable_name "*"
variable_assignment
variable_name "TMP_FILE"
= "="
command_substitution
$( "$("
command
command_name
word "mktemp"
word "./.tmp.config.XXXXXXXXXX"
) ")"
command
command_name
word "echo"
string
" "\""
string_content "Using "
simple_expansion
$ "$"
variable_name "INITFILE"
string_content " as base"
" "\""
command
command_name
word "trap"
word "clean_up"
word "EXIT"
redirected_statement
command
command_name
word "cat"
simple_expansion
$ "$"
variable_name "INITFILE"
file_redirect
> ">"
simple_expansion
$ "$"
variable_name "TMP_FILE"
variable_assignment
variable_name "PROCESSED_FILES"
= "="
string
" "\""
" "\""
comment "# Merge files, printing warnings on overridden values"
for_statement (+207 nodes collapsed)
if_statement (+31 nodes collapsed)
if_statement (+65 nodes collapsed)
comment "# If we have an output dir, setup the O= argument, otherwise"...
comment "# it blank, since O=. will create an unnecessary ./source so"...
variable_assignment
variable_name "OUTPUT_ARG"
= "="
string
" "\""
" "\""
if_statement (+30 nodes collapsed)
comment "# Use the merged file as the starting point for:"
comment "# alldefconfig: Fills in any missing symbols with Kconfig de"...
comment "# allnoconfig: Fills in any missing symbols with # CONFIG_* "...
command
command_name
word "make"
concatenation
word "KCONFIG_ALLCONFIG="
simple_expansion
$ "$"
variable_name "TMP_FILE"
simple_expansion
$ "$"
variable_name "OUTPUT_ARG"
simple_expansion
$ "$"
variable_name "ALLTARGET"
comment "# Check all specified config values took effect (might have "...
if_statement (+69 nodes collapsed)
if_statement
if "if"
list
test_command
[ "["
binary_expression
string
" "\""
simple_expansion
$ "$"
variable_name "STRICT"
" "\""
== "=="
string
" "\""
string_content "true"
" "\""
] "]"
&& "&&"
test_command
[ "["
binary_expression
string
" "\""
simple_expansion
$ "$"
variable_name "STRICT_MODE_VIOLATED"
" "\""
== "=="
string
" "\""
string_content "true"
" "\""
] "]"
; ";"
then "then"
command
command_name
word "echo"
string
" "\""
string_content "Requested and effective config differ"
" "\""
command
command_name
word "exit"
number "1"
fi "fi"