doc: Initial support for manual pages, pending portability concerns.

I must update this for Solaris.
ck_pring
Samy Al Bahra 13 years ago
parent ea6f422e5b
commit 90cffdf4fb

@ -1,4 +1,4 @@
.PHONY: all clean distribution regressions install install-headers uninstall
.PHONY: all clean distribution regressions install install-headers install-doc uninstall doc
CFLAGS=@CFLAGS@
VERSION=@VERSION@
@ -7,13 +7,18 @@ PREFIX=@PREFIX@
LIBRARY=@LIBRARY@
HEADERS=@HEADERS@
PKGCONFIG_DATA=@LIBRARY@/pkgconfig
MANDIR=@MANDIR@
all:
all: doc
$(MAKE) -C src all || exit
@echo
@echo
@echo ---[ Concurrency Kit has built successfully. You may now \"make install\".
doc:
$(MAKE) -C doc all || exit
@echo ---[ Manual pages are ready for installation.
regressions:
$(MAKE) -C regressions all || exit
@echo ---[ Regressions have built successfully.
@ -27,7 +32,11 @@ install-headers:
chmod 755 $(DESTDIR)/$(HEADERS)/gcc
chmod 644 $(DESTDIR)/$(HEADERS)/gcc/ck_*.h $(DESTDIR)/$(HEADERS)/gcc/*/ck_*.h || exit
install: all install-headers
install-doc: doc
mkdir -p $(MANDIR)/man3 || exit
cp doc/*.3.gz $(MANDIR)/man3 || exit
install: all install-headers install-doc
mkdir -p $(DESTDIR)/$(LIBRARY) || exit
cp src/libck.so $(DESTDIR)/$(LIBRARY)/libck.so.$(VERSION) || exit
ln -s libck.so.$(VERSION) $(DESTDIR)/$(LIBRARY)/libck.so
@ -38,6 +47,9 @@ install: all install-headers
cp build/ck.pc $(DESTDIR)/$(PKGCONFIG_DATA)/ck.pc || exit
cp src/libck.a $(DESTDIR)/$(LIBRARY)/libck.a || exit
chmod 644 $(DESTDIR)/$(LIBRARY)/libck.a || exit
@echo
@echo
@echo ---[ Concurrency Kit has installed successfully.
uninstall:
rm -f $(DESTDIR)/$(LIBRARY)/libck.so*
@ -48,6 +60,7 @@ uninstall:
rm -f $(DESTDIR)/$(PKGCONFIG_DATA)/ck.pc
clean:
$(MAKE) -C doc clean
$(MAKE) -C src clean
$(MAKE) -C regressions clean
rm -f *~ *.o

@ -37,7 +37,11 @@ resources needed for developing Concurrency Kit applications.
%setup -q
%build
CFLAGS=$RPM_OPT_FLAGS ./configure --libdir=%{_libdir} --includedir=%{_includedir}/%{name} --prefix=%{_prefix}
CFLAGS=$RPM_OPT_FLAGS ./configure \
--libdir=%{_libdir} \
--includedir=%{_includedir}/%{name} \
--mandir=%{_mandir} \
--prefix=%{_prefix}
make %{?_smp_mflags}
%install
@ -60,6 +64,7 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/%{name}/*/*/*.h
%{_libdir}/libck.a
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/*.3.gz
%post
/sbin/ldconfig

6
configure vendored

@ -88,6 +88,7 @@ generate()
-e "s#@LD@#$LD#g" \
-e "s#@LDFLAGS@#$LDFLAGS#g" \
-e "s#@PTHREAD_CFLAGS@#$PTHREAD_CFLAGS#g" \
-e "s#@MANDIR@#$MANDIR#g" \
$1 > $2
}
@ -105,6 +106,7 @@ generate_stdout()
echo
echo "Headers will be installed in $HEADERS"
echo "Libraries will be installed in $LIBRARY"
echo "Documentation will be installed in $MANDIR"
}
for option in $*; do
@ -141,6 +143,9 @@ for option in $*; do
--libdir=*)
LIBRARY=$value
;;
--mandir=*)
MANDIR=$value
;;
*)
echo "./configure [--help]"
exit $EXIT_FAILURE
@ -150,6 +155,7 @@ done
HEADERS=${HEADERS:-"${PREFIX}/include"}
LIBRARY=${LIBRARY:-"${PREFIX}/lib"}
MANDIR=${MANDIR:-"${PREFIX}/man"}
if test "$PROFILE"; then
printf "Using user-specified profile....."

@ -0,0 +1,57 @@
.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
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
clean:
rm -f *~ *.o *.3.gz
Loading…
Cancel
Save