From 17a3979ba99e2a7dbf64d5ce1770ed913542b7a3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 23 Apr 2009 18:55:06 +0000 Subject: [PATCH] pkgconfig: correct and clean up Makefile.am * pkgconfig/Makefile.am: Factor, add missing deps. (pkgconf_LIBS): Remove unused var. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2137 fd59a12c-fef9-0310-b244-a6a79926bd2f --- pkgconfig/Makefile.am | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am index 828eaa9e..8f6ba9da 100644 --- a/pkgconfig/Makefile.am +++ b/pkgconfig/Makefile.am @@ -33,33 +33,36 @@ MAINTAINERCLEANFILES = Makefile.in LIBS = cfg confdb coroipcc coroipcs cpg evs logsys pload quorum \ totem_pg votequorum -pkgconf_LIBS = $(LIBS:%=lib%) - target_LIBS = $(LIBS:%=lib%.pc) target_PACKAGE = corosync.pc -lib%: - cat $(srcdir)/libtemplate.pc.in | sed \ +lib%.pc: libtemplate.pc.in + rm -f $@-t $@ + sed \ -e 's#@PREFIX@#$(exec_prefix)#g' \ -e 's#@LIBDIR@#$(libdir)#g' \ -e 's#@LIBVERSION@#$(VERSION)#g' \ - -e 's#@LIB@#'$(@:lib%=%)'#g' \ - > $@.pc; - touch $@ + -e 's#@LIB@#'$(*:lib%=%)'#g' \ + $< > $@-t + chmod a-w $@-t + mv $@-t $@ -$(target_PACKAGE): - cat $(srcdir)/$@.in | sed \ +%: %.in + rm -f $@-t $@ + sed \ -e 's#@PREFIX@#$(exec_prefix)#g' \ -e 's#@LIBDIR@#$(libdir)#g' \ -e 's#@LIBVERSION@#$(VERSION)#g' \ -e 's#@COROLCRSODIR@#$(LCRSODIR)#g' \ -e 's#@COROSOCKETDIR@#$(SOCKETDIR)#g' \ - > $@ + $< > $@-t + chmod a-w $@-t + mv $@-t $@ -all-local: $(pkgconf_LIBS) $(target_PACKAGE) +all-local: $(target_LIBS) $(target_PACKAGE) -install-exec-local: +install-exec-local: $(target_LIBS) $(target_PACKAGE) install -d $(DESTDIR)/$(libdir)/pkgconfig install -m 644 $(target_LIBS) $(target_PACKAGE) $(DESTDIR)/$(libdir)/pkgconfig @@ -68,4 +71,4 @@ uninstall-local: rmdir $(DESTDIR)/$(libdir)/pkgconfig 2> /dev/null || : clean-local: - rm -f *.pc $(pkgconf_LIBS) + rm -f *.pc