From: Martin Mares Date: Wed, 25 Jun 2008 15:08:27 +0000 (+0200) Subject: Build system: Substitute installation paths in .pc files if needed. X-Git-Tag: holmes-import~426 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=fa4c8a3f9d2b3504c8843f094cb6f4fa5ef17cbc;p=libucw.git Build system: Substitute installation paths in .pc files if needed. --- 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: