https://github.com/cilium/cilium
Revision d5d3f5bafa4051bf581b83643db5af4d1e5864d3 authored by Sebastian Wicki on 04 December 2023, 13:01:22 UTC, committed by Sebastian Wicki on 04 December 2023, 14:11:36 UTC
Commit b256fbd8 introduced the ability to override certain Makefile
variables, such as `SUBDIRS_CILIUM_CONTAINER`, which controls which
targets are built for the Cilium container.

However, due to 1fcbe96bf88e ("make: avoid building plugins/cni twice"),
the Makefile would then still append additional entries to the variable,
thus not allowing the override to e.g. override the CNI plugin build.

This commit addresses this issue by moving any modification to
`SUBDIRS_CILIUM_CONTAINER` to before the override Makefile is included.
This ensures that the override Makefile has full control over the
variables it overrides.

To compensate for the fact that SUBDIRS would then cause the CNI plugin
to be built twice (e.g. once via "make -C plugins/cilium-cni", but then
once again via "make -C plugins"), a new filter is introduced which
filters out any subdirectories already covered by parent directories.
This incidentally also fixes a bug where certain tools (e.g.
"tools/mount") were built twice.

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
1 parent 332bf33
History
Tip revision: d5d3f5bafa4051bf581b83643db5af4d1e5864d3 authored by Sebastian Wicki on 04 December 2023, 13:01:22 UTC
Makefile: Fix variable override not working in all cases
Tip revision: d5d3f5b
File Mode Size
.devcontainer
.github
.nvim
.travis
.vscode
Documentation
api
bpf
bugtool
cilium-dbg
cilium-health
clustermesh-apiserver
contrib
daemon
examples
hack
hubble-relay
images
install
operator
pkg
plugins
test
tools
vendor
.authors.aux -rw-r--r-- 416 bytes
.clang-format -rw-r--r-- 7.6 KB
.clomonitor.yml -rw-r--r-- 984 bytes
.gitattributes -rw-r--r-- 887 bytes
.gitignore -rw-r--r-- 1.8 KB
.golangci.yaml -rw-r--r-- 4.1 KB
.mailmap -rw-r--r-- 6.4 KB
.travis.yml -rw-r--r-- 506 bytes
AUTHORS -rw-r--r-- 46.8 KB
CODEOWNERS -rw-r--r-- 26.1 KB
CODE_OF_CONDUCT.md -rw-r--r-- 2.2 KB
CONTRIBUTING.md -rw-r--r-- 691 bytes
FURTHER_READINGS.rst -rw-r--r-- 6.4 KB
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS.md -rw-r--r-- 4.5 KB
Makefile -rw-r--r-- 41.0 KB
Makefile.defs -rw-r--r-- 7.1 KB
Makefile.docker -rw-r--r-- 7.1 KB
Makefile.quiet -rw-r--r-- 818 bytes
README.rst -rw-r--r-- 19.6 KB
SECURITY.md -rw-r--r-- 1.0 KB
USERS.md -rw-r--r-- 31.7 KB
VERSION -rw-r--r-- 11 bytes
Vagrantfile -rw-r--r-- 14.9 KB
go.mod -rw-r--r-- 12.6 KB
go.sum -rw-r--r-- 125.5 KB
netlify.toml -rw-r--r-- 92 bytes
stable.txt -rw-r--r-- 8 bytes
vagrant_box_defaults.rb -rw-r--r-- 334 bytes

README.rst

back to top