mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-04-25 19:18:12 +02:00
Automatically generate libbsd.pc from libbsd.pc.in
This commit is contained in:
parent
ff8539bc03
commit
87d6d65633
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
|
libbsd.pc
|
||||||
*.lo
|
*.lo
|
||||||
*.o
|
*.o
|
||||||
*.so*
|
*.so*
|
||||||
|
14
Makefile
14
Makefile
@ -16,7 +16,7 @@ LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR)
|
|||||||
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
|
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
|
||||||
TAR_FILE := $(TAR_NAME).tar.gz
|
TAR_FILE := $(TAR_NAME).tar.gz
|
||||||
|
|
||||||
LIB_DIST := Makefile ChangeLog Versions $(LIB_PKGCONFIG)
|
LIB_DIST := Makefile ChangeLog Versions $(LIB_PKGCONFIG).in
|
||||||
|
|
||||||
LIB_SRCS := arc4random.c bsd_getopt.c err.c fgetln.c heapsort.c \
|
LIB_SRCS := arc4random.c bsd_getopt.c err.c fgetln.c heapsort.c \
|
||||||
humanize_number.c inet_net_pton.c \
|
humanize_number.c inet_net_pton.c \
|
||||||
@ -64,6 +64,15 @@ man/md5.3: man/mdX.3
|
|||||||
src/hash/md5hl.c: src/hash/helper.c
|
src/hash/md5hl.c: src/hash/helper.c
|
||||||
sed -e 's:hashinc:bsd/md5.h:g' -e 's:HASH:MD5:g' $< > $@
|
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):' \
|
||||||
|
$< > $@
|
||||||
|
|
||||||
$(LIB_STATIC): $(LIB_STATIC_OBJS)
|
$(LIB_STATIC): $(LIB_STATIC_OBJS)
|
||||||
ar rcs $@ $^
|
ar rcs $@ $^
|
||||||
|
|
||||||
@ -91,7 +100,7 @@ dist: ChangeLog
|
|||||||
rm -rf $(TAR_NAME)
|
rm -rf $(TAR_NAME)
|
||||||
gpg -a -b $(TAR_FILE)
|
gpg -a -b $(TAR_FILE)
|
||||||
|
|
||||||
install: libs man
|
install: libs man $(LIB_PKGCONFIG)
|
||||||
mkdir -p $(DESTDIR)/$(libdir)
|
mkdir -p $(DESTDIR)/$(libdir)
|
||||||
mkdir -p $(DESTDIR)/$(usrlibdir)
|
mkdir -p $(DESTDIR)/$(usrlibdir)
|
||||||
mkdir -p $(DESTDIR)/$(includedir)/bsd/
|
mkdir -p $(DESTDIR)/$(includedir)/bsd/
|
||||||
@ -108,6 +117,7 @@ install: libs man
|
|||||||
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
|
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
rm -f $(LIB_PKGCONFIG)
|
||||||
rm -f $(LIB_GEN_SRCS)
|
rm -f $(LIB_GEN_SRCS)
|
||||||
rm -f $(LIB_STATIC_OBJS)
|
rm -f $(LIB_STATIC_OBJS)
|
||||||
rm -f $(LIB_STATIC)
|
rm -f $(LIB_STATIC)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
prefix=/usr
|
prefix=@prefix@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=@exec_prefix@
|
||||||
libdir=${exec_prefix}/lib
|
libdir=@libdir@
|
||||||
includedir=${prefix}/include
|
includedir=@includedir@
|
||||||
|
|
||||||
Name: libbsd
|
Name: libbsd
|
||||||
Description: BSD compatibility library
|
Description: BSD compatibility library
|
||||||
Version: 0.0
|
Version: @VERSION@
|
||||||
URL: http://libbsd.freedesktop.org/
|
URL: http://libbsd.freedesktop.org/
|
||||||
Libs: -L${libdir} -lbsd
|
Libs: -L${libdir} -lbsd
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
Loading…
x
Reference in New Issue
Block a user