From bf26e57bfef82cc2041b7236fd9edea24b578ad3 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 16 Feb 2005 17:08:39 +0000 Subject: [PATCH] If requested by config.mk, install all libraries and their include files for use by external programs. I don't expect this mechanism to be used in Sherlock itself, but I need to use it in a couple of other projects (including Lestrade) and I want to keep the things consistent. --- build/install-includes | 16 ++++++++++++++++ charset/Makefile | 6 ++++++ lib/Makefile | 27 +++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100755 build/install-includes diff --git a/build/install-includes b/build/install-includes new file mode 100755 index 00000000..1bf32483 --- /dev/null +++ b/build/install-includes @@ -0,0 +1,16 @@ +#!/bin/sh +# A simple installer of include files +# (c) 2005 Martin Mares + +set -e +SRC=$1 +DEST=$2 +shift 2 +while [ -n "$1" ] ; do + if [ "$SRC/$1" -nt "$DEST/$1" ] ; then + echo "Copying $SRC/$1 to $DEST/$1" + mkdir -p $DEST/`dirname $1` + cp $SRC/$1 $DEST/$1 + fi + shift +done diff --git a/charset/Makefile b/charset/Makefile index b944a79f..115b0bb1 100644 --- a/charset/Makefile +++ b/charset/Makefile @@ -3,10 +3,16 @@ DIRS+=charset LIBCHARSET_MODS=toupper tolower tocat toligatures unaccent charconv setnames fb-charconv +LIBCHARSET_INCLUDES=charconv.h unicat.h fb-charconv.h obj/charset/libcharset.a: $(addsuffix .o,$(addprefix obj/charset/,$(LIBCHARSET_MODS))) obj/charset/libcharset.so: $(addsuffix .oo,$(addprefix obj/charset/,$(LIBCHARSET_MODS))) +INCLUDES+=obj/charset/.include-stamp +obj/charset/.include-stamp: $(addprefix charset/,$(LIBCHARSET_INCLUDES)) + build/install-includes charset run/include/charset $(?F) + touch obj/charset/.include-stamp + build_charsets: cd charset && sh misc/generate diff --git a/lib/Makefile b/lib/Makefile index 390a3794..66e5c91f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -26,6 +26,28 @@ LIBUCW_MODS= \ base64 base224 \ sync +LIBUCW_INCLUDES= \ + lib.h config.h math.h \ + mempool.h pagecache.h \ + sorter.h arraysort.h \ + lists.h clists.h \ + unaligned.h prefetch.h \ + bbuf.h gbuf.h bitarray.h bitsig.h \ + hashfunc.h hashtable.h \ + heap.h binheap.h binheap-node.h \ + redblack.h \ + conf.h ipaccess.h \ + profile.h \ + fastbuf.h lfs.h ff-utf8.h \ + chartype.h unicode.h stkstring.h \ + wildmatch.h patmatch.h \ + db.h \ + url.h \ + mainloop.h \ + lizard.h \ + md5.h \ + base64.h base224.h \ + ifdef CONFIG_OWN_REGEX include lib/regex/Makefile endif @@ -58,6 +80,11 @@ obj/lib/hash-test.test: obj/lib/hash-test obj/lib/mempool.test: obj/lib/mempool-fmt-t obj/lib/mempool-str-t obj/lib/stkstring.test: obj/lib/stkstring-t +INCLUDES+=obj/lib/.include-stamp +obj/lib/.include-stamp: $(addprefix lib/,$(LIBUCW_INCLUDES)) + build/install-includes lib run/include/lib $(?F) + touch obj/lib/.include-stamp + ifdef CONFIG_UCW_PERL include lib/perl/Makefile endif -- 2.39.2