Substitute version into termkey.pc.in at 'make dist' time

This commit is contained in:
Paul LeoNerd Evans 2008-12-15 20:49:59 +00:00
parent 51ed20590a
commit af50967d12
2 changed files with 4 additions and 2 deletions

View File

@ -65,6 +65,8 @@ install-man:
MANSOURCE=$(wildcard *.3.sh) MANSOURCE=$(wildcard *.3.sh)
BUILTMAN=$(MANSOURCE:.3.sh=.3) BUILTMAN=$(MANSOURCE:.3.sh=.3)
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR)
all: doc all: doc
doc: $(BUILTMAN) doc: $(BUILTMAN)
@ -87,7 +89,7 @@ DISTDIR=libtermkey-$(VERSION_MAJOR).$(VERSION_MINOR)
distdir: all distdir: all
mkdir $(DISTDIR) mkdir $(DISTDIR)
cp *.c *.h *.3 $(DISTDIR) cp *.c *.h *.3 $(DISTDIR)
cp *.pc.in $(DISTDIR) sed "s,@VERSION@,$(VERSION)," <termkey.pc.in >$(DISTDIR)/termkey.pc.in
sed "/^# DIST CUT/Q" <Makefile >$(DISTDIR)/Makefile sed "/^# DIST CUT/Q" <Makefile >$(DISTDIR)/Makefile
TARBALL=$(DISTDIR).tar.gz TARBALL=$(DISTDIR).tar.gz

View File

@ -4,6 +4,6 @@ includedir=${prefix}/include
Name: termkey Name: termkey
Description: Abstract terminal key input library Description: Abstract terminal key input library
Version: 0.1 Version: @VERSION@
Libs: -L${libdir} -ltermkey Libs: -L${libdir} -ltermkey
Cflags: -I${includedir} Cflags: -I${includedir}