From 704d159c69b9e0af5341d4eddc54657d9404cc4f Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Fri, 30 Mar 2012 11:50:55 -0400 Subject: [PATCH] build: Move installation of documentation to doc Makefile. --- Makefile.in | 12 ++++-------- doc/Makefile.in | 10 ++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index dfd9e1e..15592c7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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@ VERSION=@VERSION@ @@ -7,8 +7,6 @@ PREFIX=@PREFIX@ LIBRARY=@LIBRARY@ HEADERS=@HEADERS@ PKGCONFIG_DATA=@LIBRARY@/pkgconfig -MANDIR=@MANDIR@ -GZIP_SUFFIX=@GZIP_SUFFIX@ all: doc $(MAKE) -C src all || exit @@ -33,11 +31,8 @@ install-headers: chmod 755 $(DESTDIR)/$(HEADERS)/gcc chmod 644 $(DESTDIR)/$(HEADERS)/gcc/ck_*.h $(DESTDIR)/$(HEADERS)/gcc/*/ck_*.h || exit -install-doc: doc - mkdir -p $(DESTDIR)/$(MANDIR)/man3 || exit - cp doc/*.3$(GZIP_SUFFIX) $(DESTDIR)/$(MANDIR)/man3 || exit - -install: all install-headers install-doc +install: all install-headers + $(MAKE) -C doc install mkdir -p $(DESTDIR)/$(LIBRARY) || exit cp src/libck.so $(DESTDIR)/$(LIBRARY)/libck.so.$(VERSION) || exit 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. uninstall: + $(MAKE) -C doc uninstall rm -f $(DESTDIR)/$(LIBRARY)/libck.so* rm -f $(DESTDIR)/$(LIBRARY)/libck.a rm -f $(DESTDIR)/$(HEADERS)/ck_*.h diff --git a/doc/Makefile.in b/doc/Makefile.in index 5f4fb4f..d8f0d53 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,5 +1,6 @@ .PHONY: all clean +MANDIR=@MANDIR@ GZIP=@GZIP@ GZIP_SUFFIX=.3@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 $(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: rm -f *~ *.o *.3.gz