Prevent calling make with unsupported targets, fix build of individual images
This commit is contained in:
parent
9ac754a92c
commit
bae01b742b
29
Makefile
29
Makefile
@ -4,6 +4,31 @@ LC_ALL:=C
|
|||||||
LANG:=C
|
LANG:=C
|
||||||
export LC_ALL LANG
|
export LC_ALL LANG
|
||||||
|
|
||||||
|
ifneq ($(GLUON_BUILD),1)
|
||||||
|
|
||||||
|
override GLUON_BUILD=1
|
||||||
|
export GLUON_BUILD
|
||||||
|
TARGETS := all prepare images
|
||||||
|
SUBMAKE := $(MAKE) --no-print-directory
|
||||||
|
|
||||||
|
FORCE: ;
|
||||||
|
|
||||||
|
$(TARGETS): FORCE
|
||||||
|
@$(SUBMAKE) $@
|
||||||
|
|
||||||
|
image/%:: FORCE
|
||||||
|
@$(SUBMAKE) $@
|
||||||
|
|
||||||
|
clean: FORCE
|
||||||
|
@$(SUBMAKE) clean-gluon
|
||||||
|
|
||||||
|
cleanall: FORCE
|
||||||
|
@$(SUBMAKE) clean
|
||||||
|
|
||||||
|
.PHONY: FORCE
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
GLUONMAKE = $(SUBMAKE) -C $(GLUON_OPENWRTDIR) -f $(GLUONDIR)/Makefile
|
GLUONMAKE = $(SUBMAKE) -C $(GLUON_OPENWRTDIR) -f $(GLUONDIR)/Makefile
|
||||||
|
|
||||||
ifneq ($(OPENWRT_BUILD),1)
|
ifneq ($(OPENWRT_BUILD),1)
|
||||||
@ -38,6 +63,9 @@ prepare: FORCE
|
|||||||
images: FORCE
|
images: FORCE
|
||||||
+@$(GLUONMAKE) images
|
+@$(GLUONMAKE) images
|
||||||
|
|
||||||
|
image/%:: FORCE
|
||||||
|
+@$(GLUONMAKE) $@
|
||||||
|
|
||||||
clean: clean-gluon
|
clean: clean-gluon
|
||||||
|
|
||||||
clean-gluon:
|
clean-gluon:
|
||||||
@ -130,3 +158,4 @@ images: $(patsubst %,image/%,$(PROFILES))
|
|||||||
.PHONY: all images prepare clean cleanall
|
.PHONY: all images prepare clean cleanall
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user