From 4e7bbe99d475acc47fed45124bf748f3e258a702 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 24 Aug 2010 13:09:38 +0000 Subject: Change how the dblatex/lndir problem is worked around Hack: dblatex normalises the name of the main input file using os.path.realpath, which means that if we're in a linked build tree, it find the real source files rather than the symlinks in our link tree. This is fine for the static sources, but it means it can't find the generated sources. We therefore also generate the main input file, so that it really is in the link tree, and thus dblatex can find everything. --- utils/mkUserGuidePart/Main.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'utils/mkUserGuidePart/Main.hs') diff --git a/utils/mkUserGuidePart/Main.hs b/utils/mkUserGuidePart/Main.hs index 114114ca1c..c415eb4f49 100644 --- a/utils/mkUserGuidePart/Main.hs +++ b/utils/mkUserGuidePart/Main.hs @@ -12,12 +12,35 @@ main = do args <- getArgs [] -> error "Need to give filename to generate as an argument" [f] -> case f of + "docs/users_guide/users_guide.xml" -> + writeFile f userGuideMain "docs/users_guide/what_glasgow_exts_does.gen.xml" -> writeFile f whatGlasgowExtsDoes _ -> error ("Don't know what to do for " ++ show f) _ -> error "Bad args" +-- Hack: dblatex normalises the name of the main input file using +-- os.path.realpath, which means that if we're in a linked build tree, +-- it find the real source files rather than the symlinks in our link +-- tree. This is fine for the static sources, but it means it can't +-- find the generated sources. +-- We therefore also generate the main input file, so that it really +-- is in the link tree, and thus dblatex can find everything. +userGuideMain :: String +userGuideMain = unlines [ + "", + "", + "%ug-ent;", + "", + "]>", + "", + "", + "&ug-book;", + ""] + whatGlasgowExtsDoes :: String whatGlasgowExtsDoes = case maybeInitLast glasgowExtsFlags of Just (xs, x) -> -- cgit v1.2.1