doc: Support systems that lack gzip.

ck_pring
Samy Al Bahra 13 years ago
parent c862b08fb7
commit 6929e9372b

@ -8,6 +8,7 @@ LIBRARY=@LIBRARY@
HEADERS=@HEADERS@
PKGCONFIG_DATA=@LIBRARY@/pkgconfig
MANDIR=@MANDIR@
GZIP_SUFFIX=@GZIP_SUFFIX@
all: doc
$(MAKE) -C src all || exit
@ -34,7 +35,7 @@ install-headers:
install-doc: doc
mkdir -p $(DESTDIR)/$(MANDIR)/man3 || exit
cp doc/*.3.gz $(DESTDIR)/$(MANDIR)/man3 || exit
cp doc/*.3$(GZIP_SUFFIX) $(DESTDIR)/$(MANDIR)/man3 || exit
install: all install-headers install-doc
mkdir -p $(DESTDIR)/$(LIBRARY) || exit
@ -71,3 +72,4 @@ distribution: clean
rm -f build/ck.spec
rm -f build/ck.pc
rm -f Makefile
rm -f doc/Makefile

29
configure vendored

@ -89,6 +89,8 @@ generate()
-e "s#@LDFLAGS@#$LDFLAGS#g" \
-e "s#@PTHREAD_CFLAGS@#$PTHREAD_CFLAGS#g" \
-e "s#@MANDIR@#$MANDIR#g" \
-e "s#@GZIP@#$GZIP#g" \
-e "s#@GZIP_SUFFIX@#$GZIP_SUFFIX#g" \
$1 > $2
}
@ -103,6 +105,7 @@ generate_stdout()
echo " PTHREAD_CFLAGS = $PTHREAD_CFLAGS"
echo " LD = $LD"
echo " LDFLAGS = $LDFLAGS"
echo " GZIP = $GZIP"
echo
echo "Headers will be installed in $HEADERS"
echo "Libraries will be installed in $LIBRARY"
@ -122,11 +125,14 @@ for option in $*; do
echo "The following options may be used to modify installation behavior."
echo " --includedir=N Headers directory (default is ${PREFIX}/include)"
echo " --libdir=N Libraries directory (default is ${PREFIX}/lib)"
echo " --mandir=N Manual pages directory (default is ${PREFIX}/man)"
echo " --prefix=N Installs library files in N (default is $PREFIX)"
echo
echo "The following environment variables may be used:"
echo " CC C compiler command"
echo " CFLAGS C compiler flags"
echo " LDFLAGS Linker flags"
echo " GZIP GZIP compression tool"
echo
echo "Report bugs to ${MAINTAINER}."
exit $EXIT_SUCCESS
@ -156,6 +162,7 @@ done
HEADERS=${HEADERS:-"${PREFIX}/include"}
LIBRARY=${LIBRARY:-"${PREFIX}/lib"}
MANDIR=${MANDIR:-"${PREFIX}/man"}
GZIP=${GZIP:-"gzip -c"}
if test "$PROFILE"; then
printf "Using user-specified profile....."
@ -172,6 +179,7 @@ if test "$PROFILE"; then
echo "success [$PROFILE]"
printf "Generating build files..........."
generate doc/Makefile.in doc/Makefile
generate build/ck.build.in build/ck.build
generate build/regressions.build.in build/regressions.build
generate build/ck.pc.in build/ck.pc
@ -305,8 +313,6 @@ assert "$PLATFORM" "$PLATFORM" "unsupported"
PROFILE="${PROFILE:-$PLATFORM}"
PLATFORM="__${PLATFORM}__"
printf "Finding suitable compiler........"
# `which` on Solaris sucks
pathsearch()
{
@ -323,6 +329,24 @@ pathsearch()
IFS="$oldFS"
}
printf "Finding gzip tool................"
GZIP=`pathsearch "${GZIP:-gzip}"`
if test -z "$GZIP" -o ! -x "$GZIP"; then
GZIP=`pathsearch "${GZIP:-gzip}"`
GZIP="$GZIP"
fi
if test -z "$GZIP"; then
echo "not found"
GZIP=cat
GZIP_SUFFIX=""
else
echo "success [$GZIP]"
GZIP="$GZIP -c"
GZIP_SUFFIX=".gz"
fi
printf "Finding suitable compiler........"
CC=`pathsearch "${CC:-cc}"`
if test -z "$CC" -o ! -x "$CC"; then
CC=`pathsearch "${CC:-gcc}"`
@ -396,6 +420,7 @@ done
printf "Generating build files..........."
generate doc/Makefile.in doc/Makefile
generate build/ck.build.in build/ck.build
generate build/regressions.build.in build/regressions.build
generate build/ck.pc.in build/ck.pc

@ -1,61 +0,0 @@
.PHONY: all clean
GZIP=gzip
OBJECTS=ck_ht_allocator_set.3.gz \
ck_ht_count.3.gz \
ck_ht_destroy.3.gz \
ck_ht_get_spmc.3.gz \
ck_ht_grow_spmc.3.gz \
ck_ht_hash.3.gz \
ck_ht_hash_direct.3.gz \
ck_ht_init.3.gz \
ck_ht_put_spmc.3.gz \
ck_ht_remove_spmc.3.gz \
ck_ht_reset_spmc.3.gz \
ck_ht_set_spmc.3.gz \
ck_ht_entry_empty.3.gz
all: $(OBJECTS)
ck_ht_allocator_set.3.gz: ck_ht_allocator_set.3
$(GZIP) -c ck_ht_allocator_set.3 > ck_ht_allocator_set.3.gz
ck_ht_count.3.gz: ck_ht_count.3
$(GZIP) -c ck_ht_count.3 > ck_ht_count.3.gz
ck_ht_destroy.3.gz: ck_ht_destroy.3
$(GZIP) -c ck_ht_destroy.3 > ck_ht_destroy.3.gz
ck_ht_get_spmc.3.gz: ck_ht_get_spmc.3
$(GZIP) -c ck_ht_get_spmc.3 > ck_ht_get_spmc.3.gz
ck_ht_grow_spmc.3.gz: ck_ht_grow_spmc.3
$(GZIP) -c ck_ht_grow_spmc.3 > ck_ht_grow_spmc.3.gz
ck_ht_hash.3.gz: ck_ht_hash.3
$(GZIP) -c ck_ht_hash.3 > ck_ht_hash.3.gz
ck_ht_hash_direct.3.gz: ck_ht_hash_direct.3
$(GZIP) -c ck_ht_hash_direct.3 > ck_ht_hash_direct.3.gz
ck_ht_init.3.gz: ck_ht_init.3
$(GZIP) -c ck_ht_init.3 > ck_ht_init.3.gz
ck_ht_put_spmc.3.gz: ck_ht_put_spmc.3
$(GZIP) -c ck_ht_put_spmc.3 > ck_ht_put_spmc.3.gz
ck_ht_remove_spmc.3.gz: ck_ht_remove_spmc.3
$(GZIP) -c ck_ht_remove_spmc.3 > ck_ht_remove_spmc.3.gz
ck_ht_reset_spmc.3.gz: ck_ht_reset_spmc.3
$(GZIP) -c ck_ht_reset_spmc.3 > ck_ht_reset_spmc.3.gz
ck_ht_set_spmc.3.gz: ck_ht_set_spmc.3
$(GZIP) -c ck_ht_set_spmc.3 > ck_ht_set_spmc.3.gz
ck_ht_entry_empty.3.gz: ck_ht_entry_empty.3
$(GZIP) -c ck_ht_entry_empty.3 > ck_ht_entry_empty.3.gz
clean:
rm -f *~ *.o *.3.gz

@ -0,0 +1,62 @@
.PHONY: all clean
GZIP=@GZIP@
GZIP_SUFFIX=.3@GZIP_SUFFIX@
OBJECTS=ck_ht_allocator_set$(GZIP_SUFFIX) \
ck_ht_count$(GZIP_SUFFIX) \
ck_ht_destroy$(GZIP_SUFFIX) \
ck_ht_get_spmc$(GZIP_SUFFIX) \
ck_ht_grow_spmc$(GZIP_SUFFIX) \
ck_ht_hash$(GZIP_SUFFIX) \
ck_ht_hash_direct$(GZIP_SUFFIX) \
ck_ht_init$(GZIP_SUFFIX) \
ck_ht_put_spmc$(GZIP_SUFFIX) \
ck_ht_remove_spmc$(GZIP_SUFFIX) \
ck_ht_reset_spmc$(GZIP_SUFFIX) \
ck_ht_set_spmc$(GZIP_SUFFIX) \
ck_ht_entry_empty$(GZIP_SUFFIX)
all: $(OBJECTS)
ck_ht_allocator_set$(GZIP_SUFFIX): ck_ht_allocator_set
$(GZIP) ck_ht_allocator_set > ck_ht_allocator_set$(GZIP_SUFFIX)
ck_ht_count$(GZIP_SUFFIX): ck_ht_count
$(GZIP) ck_ht_count > ck_ht_count$(GZIP_SUFFIX)
ck_ht_destroy$(GZIP_SUFFIX): ck_ht_destroy
$(GZIP) ck_ht_destroy > ck_ht_destroy$(GZIP_SUFFIX)
ck_ht_get_spmc$(GZIP_SUFFIX): ck_ht_get_spmc
$(GZIP) ck_ht_get_spmc > ck_ht_get_spmc$(GZIP_SUFFIX)
ck_ht_grow_spmc$(GZIP_SUFFIX): ck_ht_grow_spmc
$(GZIP) ck_ht_grow_spmc > ck_ht_grow_spmc$(GZIP_SUFFIX)
ck_ht_hash$(GZIP_SUFFIX): ck_ht_hash
$(GZIP) ck_ht_hash > ck_ht_hash$(GZIP_SUFFIX)
ck_ht_hash_direct$(GZIP_SUFFIX): ck_ht_hash_direct
$(GZIP) ck_ht_hash_direct > ck_ht_hash_direct$(GZIP_SUFFIX)
ck_ht_init$(GZIP_SUFFIX): ck_ht_init
$(GZIP) ck_ht_init > ck_ht_init$(GZIP_SUFFIX)
ck_ht_put_spmc$(GZIP_SUFFIX): ck_ht_put_spmc
$(GZIP) ck_ht_put_spmc > ck_ht_put_spmc$(GZIP_SUFFIX)
ck_ht_remove_spmc$(GZIP_SUFFIX): ck_ht_remove_spmc
$(GZIP) ck_ht_remove_spmc > ck_ht_remove_spmc$(GZIP_SUFFIX)
ck_ht_reset_spmc$(GZIP_SUFFIX): ck_ht_reset_spmc
$(GZIP) ck_ht_reset_spmc > ck_ht_reset_spmc$(GZIP_SUFFIX)
ck_ht_set_spmc$(GZIP_SUFFIX): ck_ht_set_spmc
$(GZIP) ck_ht_set_spmc > ck_ht_set_spmc$(GZIP_SUFFIX)
ck_ht_entry_empty$(GZIP_SUFFIX): ck_ht_entry_empty
$(GZIP) ck_ht_entry_empty > ck_ht_entry_empty$(GZIP_SUFFIX)
clean:
rm -f *~ *.o *.3.gz
Loading…
Cancel
Save