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@ CFLAGS=@CFLAGS@
VERSION=@VERSION@ VERSION=@VERSION@
@ -7,13 +7,18 @@ PREFIX=@PREFIX@
LIBRARY=@LIBRARY@ LIBRARY=@LIBRARY@
HEADERS=@HEADERS@ HEADERS=@HEADERS@
PKGCONFIG_DATA=@LIBRARY@/pkgconfig PKGCONFIG_DATA=@LIBRARY@/pkgconfig
MANDIR=@MANDIR@
all: all: doc
$(MAKE) -C src all || exit $(MAKE) -C src all || exit
@echo @echo
@echo @echo
@echo ---[ Concurrency Kit has built successfully. You may now \"make install\". @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: regressions:
$(MAKE) -C regressions all || exit $(MAKE) -C regressions all || exit
@echo ---[ Regressions have built successfully. @echo ---[ Regressions have built successfully.
@ -27,7 +32,11 @@ install-headers:
chmod 755 $(DESTDIR)/$(HEADERS)/gcc chmod 755 $(DESTDIR)/$(HEADERS)/gcc
chmod 644 $(DESTDIR)/$(HEADERS)/gcc/ck_*.h $(DESTDIR)/$(HEADERS)/gcc/*/ck_*.h || exit 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 mkdir -p $(DESTDIR)/$(LIBRARY) || exit
cp src/libck.so $(DESTDIR)/$(LIBRARY)/libck.so.$(VERSION) || exit cp src/libck.so $(DESTDIR)/$(LIBRARY)/libck.so.$(VERSION) || exit
ln -s libck.so.$(VERSION) $(DESTDIR)/$(LIBRARY)/libck.so 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 build/ck.pc $(DESTDIR)/$(PKGCONFIG_DATA)/ck.pc || exit
cp src/libck.a $(DESTDIR)/$(LIBRARY)/libck.a || exit cp src/libck.a $(DESTDIR)/$(LIBRARY)/libck.a || exit
chmod 644 $(DESTDIR)/$(LIBRARY)/libck.a || exit chmod 644 $(DESTDIR)/$(LIBRARY)/libck.a || exit
@echo
@echo
@echo ---[ Concurrency Kit has installed successfully.
uninstall: uninstall:
rm -f $(DESTDIR)/$(LIBRARY)/libck.so* rm -f $(DESTDIR)/$(LIBRARY)/libck.so*
@ -48,6 +60,7 @@ uninstall:
rm -f $(DESTDIR)/$(PKGCONFIG_DATA)/ck.pc rm -f $(DESTDIR)/$(PKGCONFIG_DATA)/ck.pc
clean: clean:
$(MAKE) -C doc clean
$(MAKE) -C src clean $(MAKE) -C src clean
$(MAKE) -C regressions clean $(MAKE) -C regressions clean
rm -f *~ *.o rm -f *~ *.o

@ -37,7 +37,11 @@ resources needed for developing Concurrency Kit applications.
%setup -q %setup -q
%build %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} make %{?_smp_mflags}
%install %install
@ -60,6 +64,7 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/%{name}/*/*/*.h %{_includedir}/%{name}/*/*/*.h
%{_libdir}/libck.a %{_libdir}/libck.a
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/*.3.gz
%post %post
/sbin/ldconfig /sbin/ldconfig

6
configure vendored

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