[Buildroot] [PATCH 1/3] Makefile: use absolute paths to BR2_EXTERNAL
Arnout Vandecappelle
arnout at mind.be
Mon Jan 27 17:26:01 UTC 2014
On 22/01/14 21:59, Yann E. MORIN wrote:
> + _BR2_EXTERNAL = $(shell cd $(BR2_EXTERNAL) >/dev/null 2>&1 && pwd)
> + ifeq ($(_BR2_EXTERNAL),)
> + ifeq ($(patsubst /%,/,$(BR2_EXTERNAL)),/)
> + $(error BR2_EXTERNAL='$(BR2_EXTERNAL)' does not exist)
> + else
> + $(error BR2_EXTERNAL='$(BR2_EXTERNAL)' does not exist, relatively to $(TOPDIR))
I don't think the limited explanation "relatively to $(TOPDIR)"
warrants the additional complexity of patsubsting stuff.
> + endif
> + endif
> + BR2_EXTERNAL := $(_BR2_EXTERNAL)
AFAICS there is no need to have a separate _BR2_EXTERNAL, since we'll
anyway error out if it is empty.
So, I'd propose:
override BR2_EXTERNAL := $(shell cd $(BR2_EXTERNAL) >/dev/null 2>&1 && pwd)
ifeq ($(BR2_EXTERNAL),)
$(error BR2_EXTERNAL directory '$(BR2_EXTERNAL)' does not exist)
endif
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
More information about the buildroot
mailing list