dlm: master - build: first cut at generating .pc files

Fabio M. Di Nitto fabbione@fedoraproject.org
Fri Jan 30 11:42:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=16711572a4be4a2c198830bd6dc3a930306c3d68
Commit:        16711572a4be4a2c198830bd6dc3a930306c3d68
Parent:        e3e362f07b7a3e42f5f6216308319489d75d64f2
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Fri Jan 30 10:57:05 2009 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri Jan 30 12:33:40 2009 +0100

build: first cut at generating .pc files

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 make/libs.mk |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/make/libs.mk b/make/libs.mk
index cfe01c2..e05d69b 100644
--- a/make/libs.mk
+++ b/make/libs.mk
@@ -24,14 +24,24 @@ ifndef MAKESTATICLIB
 	ifndef SHAREDLIB
 		SHAREDLIB=$(TARGET).so.${SOMAJOR}.${SOMINOR}
 	endif
+	ifndef PKGCONF
+		PKGCONF=$(TARGET).pc
+	endif
 
-all: $(STATICLIB) $(SHAREDLIB)
+all: $(STATICLIB) $(SHAREDLIB) $(PKGCONF)
 
 $(SHAREDLIB): $(OBJS)
 	$(CC) -shared -o $@ -Wl,-soname=$(TARGET).so.$(SOMAJOR) $^ $(LDFLAGS)
 	ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so
 	ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so.$(SOMAJOR)
 
+$(PKGCONF): $(S)/$(PKGCONF).in
+	cat $(S)/$(PKGCONF).in | \
+	sed \
+		-e 's#@PREFIX@#${prefix}#g' \
+		-e 's#@VERSION@#${RELEASE_VERSION}#g' \
+	> $@
+
 else
 
 all: $(STATICLIB)



More information about the Cluster-cvs mailing list