build: Move installation of documentation to doc Makefile.

ck_pring
Samy Al Bahra 13 years ago
parent 3a9087c838
commit 704d159c69

@ -1,4 +1,4 @@
.PHONY: all clean distribution regressions install install-headers install-doc uninstall doc .PHONY: all clean distribution regressions install install-headers doc uninstall
CFLAGS=@CFLAGS@ CFLAGS=@CFLAGS@
VERSION=@VERSION@ VERSION=@VERSION@
@ -7,8 +7,6 @@ PREFIX=@PREFIX@
LIBRARY=@LIBRARY@ LIBRARY=@LIBRARY@
HEADERS=@HEADERS@ HEADERS=@HEADERS@
PKGCONFIG_DATA=@LIBRARY@/pkgconfig PKGCONFIG_DATA=@LIBRARY@/pkgconfig
MANDIR=@MANDIR@
GZIP_SUFFIX=@GZIP_SUFFIX@
all: doc all: doc
$(MAKE) -C src all || exit $(MAKE) -C src all || exit
@ -33,11 +31,8 @@ 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-doc: doc install: all install-headers
mkdir -p $(DESTDIR)/$(MANDIR)/man3 || exit $(MAKE) -C doc install
cp doc/*.3$(GZIP_SUFFIX) $(DESTDIR)/$(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
@ -53,6 +48,7 @@ install: all install-headers install-doc
@echo ---[ Concurrency Kit has installed successfully. @echo ---[ Concurrency Kit has installed successfully.
uninstall: uninstall:
$(MAKE) -C doc uninstall
rm -f $(DESTDIR)/$(LIBRARY)/libck.so* rm -f $(DESTDIR)/$(LIBRARY)/libck.so*
rm -f $(DESTDIR)/$(LIBRARY)/libck.a rm -f $(DESTDIR)/$(LIBRARY)/libck.a
rm -f $(DESTDIR)/$(HEADERS)/ck_*.h rm -f $(DESTDIR)/$(HEADERS)/ck_*.h

@ -1,5 +1,6 @@
.PHONY: all clean .PHONY: all clean
MANDIR=@MANDIR@
GZIP=@GZIP@ GZIP=@GZIP@
GZIP_SUFFIX=.3@GZIP_SUFFIX@ GZIP_SUFFIX=.3@GZIP_SUFFIX@
OBJECTS=ck_ht_allocator_set$(GZIP_SUFFIX) \ OBJECTS=ck_ht_allocator_set$(GZIP_SUFFIX) \
@ -57,6 +58,15 @@ ck_ht_set_spmc$(GZIP_SUFFIX): ck_ht_set_spmc
ck_ht_entry_empty$(GZIP_SUFFIX): ck_ht_entry_empty ck_ht_entry_empty$(GZIP_SUFFIX): ck_ht_entry_empty
$(GZIP) ck_ht_entry_empty > ck_ht_entry_empty$(GZIP_SUFFIX) $(GZIP) ck_ht_entry_empty > ck_ht_entry_empty$(GZIP_SUFFIX)
install:
mkdir -p $(DESTDIR)/$(MANDIR)/man3 || exit
cp *$(GZIP_SUFFIX) $(DESTDIR)/$(MANDIR)/man3 || exit
uninstall:
for target in $(OBJECTS); do \
rm -f $(DESTDIR)/$(MANDIR)/man3/$$target; \
done
clean: clean:
rm -f *~ *.o *.3.gz rm -f *~ *.o *.3.gz

Loading…
Cancel
Save