File tree Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,15 @@ endif
177177
178178CFLAGS += -include config.h
179179
180- # Only include build rules when not running configuration targets
181- ifeq ($(filter $(check_goal ) ,config defconfig) ,)
182- include mk/common.mk
180+ # Only skip build rules when running ONLY config/defconfig (no other targets)
181+ ifneq ($(filter-out config defconfig,$(check_goal ) ) ,)
182+ # Has targets other than config/defconfig
183+ include mk/common.mk
184+ else ifeq ($(check_goal),)
185+ # Empty goals means building 'all'
186+ include mk/common.mk
183187endif
188+ # Otherwise, only config/defconfig targets - skip mk/common.mk
184189
185190KCONFIGLIB := tools/kconfig/kconfiglib.py
186191$(KCONFIGLIB ) :
Original file line number Diff line number Diff line change @@ -4,18 +4,18 @@ config CONFIGURED
44 bool
55 default y
66
7- # Dependency detection using Kbuild toolchain functions
7+ # Dependency detection using Kconfiglib shell function
88config HAVE_SDL2
9- def_bool $(success ,pkg-config --exists sdl2)
9+ def_bool $(shell ,pkg-config --exists sdl2 && echo y )
1010
1111config HAVE_PIXMAN
12- def_bool $(success ,pkg-config --exists pixman-1)
12+ def_bool $(shell ,pkg-config --exists pixman-1 && echo y )
1313
1414config HAVE_LIBPNG
15- def_bool $(success ,pkg-config --exists libpng)
15+ def_bool $(shell ,pkg-config --exists libpng && echo y )
1616
1717config HAVE_LIBJPEG
18- def_bool $(success ,pkg-config --exists libjpeg)
18+ def_bool $(shell ,pkg-config --exists libjpeg && echo y )
1919
2020choice
2121 prompt "Backend Selection"
Original file line number Diff line number Diff line change @@ -681,10 +681,11 @@ __FORCE:
681681# Only include dependencies when building known targets
682682build-goals := all clean $(target-builds )
683683ifneq ($(MAKECMDGOALS ) ,)
684- # MAKECMDGOALS is not empty, check if it's a known target
685- ifneq ($(filter $(MAKECMDGOALS),$(build-goals)),)
686- # Known target, include dependencies (except for clean)
687- ifneq "$(MAKECMDGOALS)" "clean"
684+ # MAKECMDGOALS is not empty, check if ALL goals are known
685+ # (i.e., no unknown goals remain after filtering out known ones)
686+ ifeq ($(filter-out $(build-goals),$(MAKECMDGOALS)),)
687+ # All goals are known, include dependencies (except for clean-only builds)
688+ ifeq ($(filter clean,$(MAKECMDGOALS)),)
688689 -include $(target-depends )
689690 endif
690691 endif
You can’t perform that action at this time.
0 commit comments