about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-08-25 00:12:23 +0000
committerEric Wong <normalperson@yhbt.net>2013-08-25 00:15:07 +0000
commit7a00d725015534bb551c7f97952af4b9a9367332 (patch)
tree7b3c0209839b847957ee8591f3976344cd980c8c
parent6c197ba96877164d2e89ee1f1cc74d15a34af6e1 (diff)
downloaddtas-7a00d725015534bb551c7f97952af4b9a9367332.tar.gz
This may make lives easier for users without pandoc.
-rw-r--r--.gitignore2
-rw-r--r--Documentation/GNUmakefile2
-rw-r--r--Rakefile14
3 files changed, 18 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a0f864e..bfa9c6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@
 /coverage.dump
 *.tar.gz
 *.log
+/man
+*.gem
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile
index 37411e5..9144949 100644
--- a/Documentation/GNUmakefile
+++ b/Documentation/GNUmakefile
@@ -23,7 +23,9 @@ man: $(man1) $(man7)
 
 install-man: man
         mkdir -p ../man/man1
+        mkdir -p ../man/man7
         install -m 644 $(man1) ../man/man1
+        install -m 644 $(man7) ../man/man7
 
 %.1: %.1.txt
         $(pandoc) -s -t man < $< > $@+ && mv $@+ $@
diff --git a/Rakefile b/Rakefile
index f4d4a69..660b194 100644
--- a/Rakefile
+++ b/Rakefile
@@ -6,6 +6,20 @@ if ! File.exist?(manifest) || File.stat(manifest).mtime < gitidx.mtime
   File.open(manifest, "a") do |fp|
     fp.puts "NEWS"
     fp.puts "lib/dtas/version.rb"
+
+    if system("make -C Documentation")
+      require 'fileutils'
+      FileUtils.rm_rf 'man'
+      if system("make -C Documentation install-man")
+        `git ls-files -o man`.split(/\n/).each do |man|
+          fp.puts man
+        end
+      else
+        warn "failed to install manpages for distribution"
+      end
+    else
+      warn "failed to build manpages for distribution"
+    end
   end
   File.open("NEWS", "w") do |fp|
     `git tag -l`.split(/\n/).each do |tag|