From 7f9fc20afa3bcff007da941041ceb0c0d84d8fc3 Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Sun, 28 Jul 2019 19:44:23 +0300 Subject: Use full_path_subst on more places, to avoid replacing the wrong occurrences in paths. If ROOTDIR=/rockbox and BUILDDIR=/rockbox/build-something, it is now possible to successfully build both target binaries and simulators. Change-Id: If12d1d5933c5a15feebf627a4f1636dc1e3a67fa --- tools/database/database.make | 2 +- tools/functions.make | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/database/database.make b/tools/database/database.make index 970aeb5581..c29dd47f9b 100644 --- a/tools/database/database.make +++ b/tools/database/database.make @@ -14,7 +14,7 @@ createsrc = $(shell cat $(1) > $(3); echo "\#if CONFIG_CODEC == SWCODEC" >> $(3) echo "\#endif" >> $(3); \ echo $(3)) -METADATAS := $(subst $(ROOTDIR), ../.., $(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c)) +METADATAS := $(call full_path_subst,$(ROOTDIR)/%,../../%,$(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c)) SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \ $(METADATAS), \ diff --git a/tools/functions.make b/tools/functions.make index a2c715e9e1..518b945320 100644 --- a/tools/functions.make +++ b/tools/functions.make @@ -24,7 +24,7 @@ preprocess2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $ asmdefs2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \ perl -ne 'if(/^_?AD_(\w+):$$/){$$var=$$1}else{/^\W\.(?:word|long)\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $(2) -c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1)))) +c2obj = $(addsuffix .o,$(basename $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(1)))) a2lnk = $(patsubst lib%.a,-l%,$(notdir $(1))) -- cgit v1.2.3