summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Build/MakeMans.hs15
-rw-r--r--Build/Mans.hs4
-rw-r--r--Makefile6
-rw-r--r--git-annex.cabal1
5 files changed, 22 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 0b9774d01..bdd614510 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,7 @@ Build/Standalone
Build/OSXMkLibs
Build/LinuxMkLibs
Build/BuildVersion
-Build/Mans
+Build/MakeMans
git-annex
man
git-union-merge
diff --git a/Build/MakeMans.hs b/Build/MakeMans.hs
new file mode 100644
index 000000000..25e09c4aa
--- /dev/null
+++ b/Build/MakeMans.hs
@@ -0,0 +1,15 @@
+{- Build man pages, for use by Makefile
+ -
+ - Copyright 2016 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+{-# OPTIONS_GHC -fno-warn-tabs #-}
+
+module Main where
+
+import Build.Mans
+
+main :: IO ()
+main = buildMansOrWarn
diff --git a/Build/Mans.hs b/Build/Mans.hs
index a50396e5e..e7455d858 100644
--- a/Build/Mans.hs
+++ b/Build/Mans.hs
@@ -18,8 +18,8 @@ import System.Exit
import Data.Maybe
import Utility.Exception
-main :: IO ()
-main = do
+buildMansOrWarn :: IO ()
+buildMansOrWarn = do
mans <- buildMans
when (any isNothing mans) $
error "mdwn2man failed"
diff --git a/Makefile b/Makefile
index 768e0ac78..b75e9864f 100644
--- a/Makefile
+++ b/Makefile
@@ -76,8 +76,8 @@ else
IKIWIKI=ikiwiki
endif
-mans: Build/Mans
- ./Build/Mans
+mans: Build/MakeMans
+ ./Build/MakeMans
docs: mans
LC_ALL=C TZ=UTC $(IKIWIKI) doc html -v --wikiname git-annex \
@@ -111,7 +111,7 @@ Build/OSXMkLibs: Build/OSXMkLibs.hs
$(GHC) --make $@ -Wall -fno-warn-tabs
Build/LinuxMkLibs: Build/LinuxMkLibs.hs
$(GHC) --make $@ -Wall -fno-warn-tabs
-Build/Mans: Build/Mans.hs
+Build/MakeMans: Build/MakeMans.hs
$(GHC) --make $@ -Wall -fno-warn-tabs
# Upload to hackage.
diff --git a/git-annex.cabal b/git-annex.cabal
index f9c665a5f..9f8dc8d26 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -662,6 +662,7 @@ Executable git-annex
Build.EvilSplicer
Build.InstallDesktopFile
Build.LinuxMkLibs
+ Build.MakeMans
Build.Mans
Build.NullSoftInstaller
Build.OSXMkLibs