summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVencislav Atanasov <user890104@freemyipod.org>2019-07-28 19:44:23 +0300
committerFranklin Wei <franklin@rockbox.org>2019-07-28 21:00:57 +0200
commit7f9fc20afa3bcff007da941041ceb0c0d84d8fc3 (patch)
treec28397eb6de5f942e36811b3f4dbe717e4065d05
parentd8330c9c18ac227800ed7dc9c6ae72946e92e4fb (diff)
downloadrockbox-7f9fc20afa3bcff007da941041ceb0c0d84d8fc3.tar.gz
rockbox-7f9fc20afa3bcff007da941041ceb0c0d84d8fc3.zip
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
-rw-r--r--apps/plugins/bitmaps/pluginbitmaps.make7
-rw-r--r--apps/plugins/plugins.make4
-rw-r--r--tools/database/database.make2
-rw-r--r--tools/functions.make2
4 files changed, 8 insertions, 7 deletions
diff --git a/apps/plugins/bitmaps/pluginbitmaps.make b/apps/plugins/bitmaps/pluginbitmaps.make
index 85536ed3bb..78294a5e8c 100644
--- a/apps/plugins/bitmaps/pluginbitmaps.make
+++ b/apps/plugins/bitmaps/pluginbitmaps.make
@@ -26,13 +26,14 @@ endif
26 26
27ifdef PBMP # does player use bitmaps? 27ifdef PBMP # does player use bitmaps?
28 28
29PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o) 29PBMP_BUILD := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(PBMP))
30
31PLUGIN_BITMAPS := $(PBMP_BUILD:%.bmp=%.o)
30 32
31PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a 33PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a
32PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB)) 34PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB))
33 35
34PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP)) 36PBMPHFILES := $(shell echo $(PBMP_BUILD) | sed -e 's/\.[0-9x]*\.bmp/.h/g' -e 's/\.bmp/.h/g' | awk "{ gsub(/apps\/plugins\/bitmaps\/(mono|native|remote_mono|remote_native)/, \"pluginbitmaps\"); print }" )
35PBMPHFILES := $(shell echo $(PBMPHFILES) | sed -e 's/\.[0-9x]*\.bmp/.h/g' -e 's/\.bmp/.h/g' | awk "{ gsub(/apps\/plugins\/bitmaps\/(mono|native|remote_mono|remote_native)/, \"pluginbitmaps\"); print }" )
36 37
37$(PBMPHFILES): $(PLUGIN_BITMAPS) 38$(PBMPHFILES): $(PLUGIN_BITMAPS)
38 39
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make
index be3d35717e..d395c00e82 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -22,7 +22,7 @@ PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES)
22endif 22endif
23OTHER_SRC += $(PLUGINS_SRC) 23OTHER_SRC += $(PLUGINS_SRC)
24ROCKS1 := $(PLUGINS_SRC:.c=.rock) 24ROCKS1 := $(PLUGINS_SRC:.c=.rock)
25ROCKS1 := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS1)) 25ROCKS1 := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(ROCKS1))
26 26
27ROCKS := $(ROCKS1) 27ROCKS := $(ROCKS1)
28 28
@@ -35,7 +35,7 @@ OTHER_SRC += $(PLUGINLIB_SRC)
35 35
36PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o) 36PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o)
37PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o) 37PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o)
38PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ)) 38PLUGINLIB_OBJ := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(PLUGINLIB_OBJ))
39 39
40### build data / rules 40### build data / rules
41ifndef APP_TYPE 41ifndef APP_TYPE
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)
14 echo "\#endif" >> $(3); \ 14 echo "\#endif" >> $(3); \
15 echo $(3)) 15 echo $(3))
16 16
17METADATAS := $(subst $(ROOTDIR), ../.., $(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c)) 17METADATAS := $(call full_path_subst,$(ROOTDIR)/%,../../%,$(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c))
18 18
19SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \ 19SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \
20 $(METADATAS), \ 20 $(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 $
24asmdefs2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \ 24asmdefs2file = $(SILENT)$(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \
25 perl -ne 'if(/^_?AD_(\w+):$$/){$$var=$$1}else{/^\W\.(?:word|long)\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $(2) 25 perl -ne 'if(/^_?AD_(\w+):$$/){$$var=$$1}else{/^\W\.(?:word|long)\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $(2)
26 26
27c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1)))) 27c2obj = $(addsuffix .o,$(basename $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(1))))
28 28
29a2lnk = $(patsubst lib%.a,-l%,$(notdir $(1))) 29a2lnk = $(patsubst lib%.a,-l%,$(notdir $(1)))
30 30