From fa4c8a3f9d2b3504c8843f094cb6f4fa5ef17cbc Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 25 Jun 2008 17:08:27 +0200 Subject: [PATCH] Build system: Substitute installation paths in .pc files if needed. --- build/Makebottom | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build/Makebottom b/build/Makebottom index 0cea489e..92bc47ea 100644 --- a/build/Makebottom +++ b/build/Makebottom @@ -73,7 +73,15 @@ $(o)/%.pc: $(s)/%.pc $(o)/%.$(LS) ifdef CONFIG_INSTALL_API +ifdef CONFIG_LOCAL +# Need an absolute path API_ROOT:=$(shell pwd)/run +API_LIBDIR=$(API_ROOT)/lib +API_INCDIR=$(API_ROOT)/include +else +API_LIBDIR=$(INSTALL_LIB_DIR) +API_INCDIR=$(INSTALL_INCLUDE_DIR) +endif INSTALL_RUNDIRS+=include lib/pkgconfig api: $(API_INCLUDES) $(addprefix run/lib/pkgconfig/,$(addsuffix .pc,$(API_LIBS))) @@ -83,7 +91,7 @@ $(o)/%/.include-stamp: run/lib/pkgconfig/%.pc: # RHS supplied in the sub-makefile $(M)PC-API $@ - $(Q)sed <$< >$@ "s@^libdir=.*@libdir=$(API_ROOT)/lib@;s@^incdir=.*@incdir=$(API_ROOT)/include@" + $(Q)sed <$< >$@ "s@^libdir=.*@libdir=$(API_LIBDIR)@;s@^incdir=.*@incdir=$(API_INCDIR)@" else api: -- 2.39.2