]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Preserve the variables unexpanded in the pkg-config file
authorGuillem Jover <guillem@hadrons.org>
Mon, 25 May 2009 07:57:14 +0000 (09:57 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 25 May 2009 07:57:14 +0000 (09:57 +0200)
Makefile

index 6ba703bfd69d9afa0550252a6e96362bd147d817..df8e4fef71b7c37569bb038ee89f654ec7c42ca3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -82,13 +82,13 @@ CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable
 
 MK_CFLAGS := -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
 
-prefix         := /usr
-exec_prefix    :=
-libdir         := ${exec_prefix}/lib
-usrlibdir      := ${prefix}/lib
-includedir     := ${prefix}/include
-pkgconfigdir   := ${usrlibdir}/pkgconfig
-mandir         := ${prefix}/share/man
+prefix         = /usr
+exec_prefix    =
+libdir         = ${exec_prefix}/lib
+usrlibdir      = ${prefix}/lib
+includedir     = ${prefix}/include
+pkgconfigdir   = ${usrlibdir}/pkgconfig
+mandir         = ${prefix}/share/man
 
 .PHONY: libs
 libs: $(LIB_STATIC) $(LIB_SHARED_SO) $(LIB_PKGCONFIG)
@@ -108,13 +108,12 @@ man/md5.3bsd:  man/mdX.3
 src/hash/md5hl.c: src/hash/helper.c
        sed -e 's:hashinc:bsd/md5.h:g' -e 's:HASH:MD5:g' $< > $@
 
-# FIXME: the variables should be preserved unexpanded in the .pc file
 $(LIB_PKGCONFIG): $(LIB_PKGCONFIG).in
        sed -e 's:@VERSION@:$(LIB_VERSION):' \
-           -e 's:@prefix@:$(prefix):' \
-           -e 's:@exec_prefix@:$(exec_prefix):' \
-           -e 's:@libdir@:$(libdir):' \
-           -e 's:@includedir@:$(includedir):' \
+           -e 's:@prefix@:$(value prefix):' \
+           -e 's:@exec_prefix@:$(value exec_prefix):' \
+           -e 's:@libdir@:$(value libdir):' \
+           -e 's:@includedir@:$(value includedir):' \
            $< > $@
 
 $(LIB_STATIC): $(LIB_STATIC_OBJS)