From 4bef5b2d0bf9cdad88a47a32b751f834877e4802 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 26 Apr 2010 16:17:26 -0700 Subject: GNUmakefile: rdoc 2.5.x compatibility --- .document | 4 ++-- GNUmakefile | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.document b/.document index 2156af2..459f863 100644 --- a/.document +++ b/.document @@ -13,6 +13,6 @@ NEWS ChangeLog lib ext/unicorn_http/unicorn_http.c -unicorn.1 -unicorn_rails.1 +unicorn_1 +unicorn_rails_1 ISSUES diff --git a/GNUmakefile b/GNUmakefile index 735f5ee..67d9fb7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -41,6 +41,7 @@ c_files := $(ext)/unicorn_http.c $(wildcard $(ext)/*.h) rl_files := $(wildcard $(ext)/*.rl) base_bins := unicorn unicorn_rails bins := $(addprefix bin/, $(base_bins)) +man1_rdoc := $(addsuffix _1, $(base_bins)) man1_bins := $(addsuffix .1, $(base_bins)) man1_paths := $(addprefix man/man1/, $(man1_bins)) rb_files := $(bins) $(shell find lib ext -type f -name '*.rb') @@ -176,18 +177,20 @@ cgit_atom := http://git.bogomips.org/cgit/unicorn.git/atom/?h=master atom = -# using rdoc 2.4.1+ +# using rdoc 2.5.x+ doc: .document $(ext)/unicorn_http.c NEWS ChangeLog - for i in $(man1_bins); do > $$i; done + for i in $(man1_rdoc); do echo > $$i; done find bin lib -type f -name '*.rbc' -exec rm -f '{}' ';' - rdoc -Na -t "$(shell sed -ne '1s/^= //p' README)" + rdoc -a -t "$(shell sed -ne '1s/^= //p' README)" install -m644 COPYING doc/COPYING install -m644 $(shell grep '^[A-Z]' .document) doc/ $(MAKE) -C Documentation install-html install-man install -m644 $(man1_paths) doc/ cd doc && for i in $(base_bins); do \ + $(RM) $${i}.1.html; \ + ln $${i}_1.html $${i}.1.html; \ sed -e '/"documentation">/r man1/'$$i'.1.html' \ - < $${i}_1.html > tmp.html && mv tmp.html $${i}_1.html; done + < $${i}.1.html > tmp && mv tmp $${i}_1.html; done $(RUBY) -i -p -e \ '$$_.gsub!("",%q{\&$(call atom,$(cgit_atom))})' \ doc/ChangeLog.html @@ -196,7 +199,7 @@ doc: .document $(ext)/unicorn_http.c NEWS ChangeLog doc/NEWS.html doc/README.html $(RAKE) -s news_atom > doc/NEWS.atom.xml cd doc && ln README.html tmp && mv tmp index.html - $(RM) $(man1_bins) + $(RM) $(man1_rdoc) rails_git_url = git://github.com/rails/rails.git rails_git := vendor/rails.git -- cgit v1.2.3-24-ge0c7