]> mj.ucw.cz Git - libucw.git/commitdiff
If requested by config.mk, install all libraries and their include
authorMartin Mares <mj@ucw.cz>
Wed, 16 Feb 2005 17:08:39 +0000 (17:08 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 16 Feb 2005 17:08:39 +0000 (17:08 +0000)
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 [new file with mode: 0755]
charset/Makefile
lib/Makefile

diff --git a/build/install-includes b/build/install-includes
new file mode 100755 (executable)
index 0000000..1bf3248
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+# A simple installer of include files
+# (c) 2005 Martin Mares <mj@ucw.cz>
+
+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
index b944a79f1dbd79afe9740fc8e11427a607f991ff..115b0bb1abb8a20a7ef84407cfd5d7e01fa81afb 100644 (file)
@@ -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
 
index 390a37942167753d1d4d8fb60e880b484c54c2ff..66e5c91f8ed76056f1fa5141aeb6b46e158d4795 100644 (file)
@@ -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