mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-23 01:11:53 -09:00
package/pkg-hare: refactor build command
In order to avoid duplicating the build command, use an intermediate "target" shell variable to store the make target to be invoked for the build. This is in preparation to extending the build command. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Acked-by: Francois Perrad <francois.perrad.86@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
75a25f5c90
commit
69cb418bc8
@@ -49,10 +49,9 @@ ifndef $(2)_BUILD_CMDS
|
||||
# but in real world, the target "all" is not always the default one
|
||||
define $(2)_BUILD_CMDS
|
||||
if grep "^all:" $$($(2)_SRCDIR)Makefile > /dev/null; then \
|
||||
$(MAKE) -C $$($(2)_SRCDIR) HARE="$$(HARE_RUN_CMD)" HAREFLAGS="$$(HARE_ARCH_OPT) $$(HARE_LIBDIR_OPT)" all; \
|
||||
else \
|
||||
$(MAKE) -C $$($(2)_SRCDIR) HARE="$$(HARE_RUN_CMD)" HAREFLAGS="$$(HARE_ARCH_OPT) $$(HARE_LIBDIR_OPT)"; \
|
||||
fi
|
||||
target=all ; \
|
||||
fi ; \
|
||||
$(MAKE) -C $$($(2)_SRCDIR) HARE="$$(HARE_RUN_CMD)" HAREFLAGS="$$(HARE_ARCH_OPT) $$(HARE_LIBDIR_OPT)" $${target}
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user