scripts/kconfig/tests/preprocess/variable/Kconfig
Source file repositories/reference/linux-study-clean/scripts/kconfig/tests/preprocess/variable/Kconfig
File Facts
- System
- Linux kernel
- Corpus path
scripts/kconfig/tests/preprocess/variable/Kconfig- Extension
[no extension]- Size
- 1219 bytes
- Lines
- 54
- Domain
- Support Tooling And Documentation
- Bucket
- scripts
- Inferred role
- Support Tooling And Documentation: build/configuration rule
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
# SPDX-License-Identifier: GPL-2.0
# Shorthand
warning = $(warning-if,y,$(1))
# Simply expanded variable.
X := 1
SIMPLE := $(X)
X := 2
$(warning,SIMPLE = $(SIMPLE))
# Recursively expanded variable.
X := 1
RECURSIVE = $(X)
X := 2
$(warning,RECURSIVE = $(RECURSIVE))
# Append something to a simply expanded variable.
Y := 3
SIMPLE += $(Y)
Y := 4
$(warning,SIMPLE = $(SIMPLE))
# Append something to a recursively expanded variable.
Y := 3
RECURSIVE += $(Y)
Y := 4
$(warning,RECURSIVE = $(RECURSIVE))
# Use += operator to an undefined variable.
# This works as a recursively expanded variable.
Y := 3
UNDEFINED_VARIABLE += $(Y)
Y := 4
$(warning,UNDEFINED_VARIABLE = $(UNDEFINED_VARIABLE))
# You can use variable references for the lefthand side of assignment statement.
X := A
Y := B
$(X)$(Y) := 5
$(warning,AB = $(AB))
# User-defined function.
greeting = $(1), my name is $(2).
$(warning,$(greeting,Hello,John))
# The number of arguments is not checked for user-defined functions.
# If some arguments are optional, it is useful to pass fewer parameters.
# $(2) will be blank in this case.
$(warning,$(greeting,Hello))
# Unreferenced parameters are just ignored.
$(warning,$(greeting,Hello,John,ignored,ignored))
Annotation
- Atlas domain: Support Tooling And Documentation / scripts.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.