mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-15 17:16:29 +00:00
Fall back to buildroot make in top-level make (#4039)
* Fall back to buildroot make in top-level make To make running Buildroot commands easier, define .DEFAULT rule and fall back to targets from Buildroot with necessary variables set. This makes "savedefconfig" redundant as it's been simply passed to BR. * Also implicitly fall back to 'clean' target * Fix typo
This commit is contained in:
parent
dbf7d46d5b
commit
9e8e9ce773
20
Makefile
20
Makefile
@ -16,14 +16,10 @@ endif
|
||||
|
||||
.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all
|
||||
|
||||
.PHONY: $(TARGETS) $(TARGETS_CONFIG) all clean help
|
||||
.PHONY: $(TARGETS) $(TARGETS_CONFIG) all buildroot-help help
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
savedefconfig:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "savedefconfig"
|
||||
|
||||
$(TARGETS_CONFIG): %-config:
|
||||
@echo "config $*"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
|
||||
@ -39,12 +35,18 @@ ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
|
||||
endif
|
||||
@echo "finished $@"
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
|
||||
.DEFAULT:
|
||||
@echo "falling back to Buildroot target '$@'"
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$@"
|
||||
|
||||
buildroot-help:
|
||||
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) help
|
||||
|
||||
help:
|
||||
@echo "Supported targets: $(TARGETS)"
|
||||
@echo "Run 'make <target>' to build a target image."
|
||||
@echo "Run 'make all' to build all target images."
|
||||
@echo "Run 'make clean' to clean the build output."
|
||||
@echo "Run 'make <target>-config' to configure buildroot for a target."
|
||||
@echo ""
|
||||
@echo "Supported targets: $(TARGETS)"
|
||||
@echo ""
|
||||
@echo "Unknown Makefile targets fall back to Buildroot make - for details run 'make buildroot-help'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user