about summary refs log tree commit homepage
path: root/GNUmakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-05-03 18:16:24 -0700
committerEric Wong <normalperson@yhbt.net>2010-05-03 18:16:24 -0700
commit60c57382638c8be81fe6163d1728415c494ad4f8 (patch)
tree0a4f9c64ccc7c87f010c8cefb0103210d42e0355 /GNUmakefile
parentde3bcfe3ba9402bd510f7414df1763b6b99dae47 (diff)
downloadrainbows-60c57382638c8be81fe6163d1728415c494ad4f8.tar.gz
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 42c2162..051c4fe 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -24,6 +24,7 @@ tmp/gems/$(RUBY_VERSION)/.isolate: $(ISOLATE_CONFIG)
 
 base_bins := rainbows
 bins := $(addprefix bin/, $(base_bins))
+man1_rdoc := $(addsuffix _1, $(base_bins))
 man1_bins := $(addsuffix .1, $(base_bins))
 man1_paths := $(addprefix man/man1/, $(man1_bins))
 
@@ -81,18 +82,21 @@ cgit_atom := http://git.bogomips.org/cgit/rainbows.git/atom/?h=master
 atom = <link rel="alternate" title="Atom feed" href="$(1)" \
              type="application/atom+xml"/>
 
-# using rdoc 2.4.1+
+# using rdoc 2.5.x+
 doc: .document 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) 1.html $${i}.1.html; \
           sed -e '/"documentation">/r man1/'$$i'.1.html' \
-                < $${i}_1.html > tmp && mv tmp $${i}_1.html; done
+                < $${i}_1.html > tmp && mv tmp $${i}_1.html; \
+          ln $${i}_1.html $${i}.1.html; \
+          done
         $(RUBY) -i -p -e \
           '$$_.gsub!("</title>",%q{\&$(call atom,$(cgit_atom))})' \
           doc/ChangeLog.html
@@ -106,7 +110,7 @@ doc: .document NEWS ChangeLog
           '$$_.gsub!(/INCLUDE/){File.read("Documentation/comparison.html")}' \
           doc/Summary.html
         cat Documentation/comparison.css >> doc/rdoc.css
-        $(RM) $(man1_bins)
+        $(RM) $(man1_rdoc)
 
 ifneq ($(VERSION),)
 rfproject := rainbows