From 4142f7dcef8b1fb17fdf5519a2d3e79a64a4c8c0 Mon Sep 17 00:00:00 2001 From: Siarzhuk Zharski Date: Mon, 28 Feb 2011 19:17:55 +0000 Subject: [PATCH] A workaround for compatibility problem, originated from r40300 changes. Proposed in it "LD ?= gcc" assignment doesn't works both with existing makefiles and with current version of the makefile template. User must define LD in it's makefile to let them work. That is bad. This workaround uses $origin function to check for redefinition of LD variable in user's makefile. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40739 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- data/develop/makefile-engine | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/develop/makefile-engine b/data/develop/makefile-engine index 740d473c9d..569b78a67e 100644 --- a/data/develop/makefile-engine +++ b/data/develop/makefile-engine @@ -79,7 +79,9 @@ endif endif # set the linker and linker flags - LD ?= gcc +ifeq ($(origin LD), default) + LD := gcc +endif LDFLAGS += $(DEBUG) # SETTING: set linker flags for each binary type