summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-05-11 13:35:23 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-05-11 13:35:23 +0000
commit7e9d402750416618b449cdb5126b914ce5f2fd0c (patch)
treebc7a1ef814967e86139fa85e8a9a26ab44fcbd6e /docs
parent61ef1764bf342f90480602770b43ec3ae768f7f1 (diff)
downloadhaskell-7e9d402750416618b449cdb5126b914ce5f2fd0c.tar.gz
Hack to make the user's guide build in a linked build tree
See comment for details
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/ghc.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/users_guide/ghc.mk b/docs/users_guide/ghc.mk
index 644f381b06..492df2d65e 100644
--- a/docs/users_guide/ghc.mk
+++ b/docs/users_guide/ghc.mk
@@ -16,3 +16,18 @@ docs/users_guide_DOCBOOK_SOURCES := \
$(eval $(call docbook,docs/users_guide,users_guide))
+# Hack: dblatex normalises the name of the input file using
+# os.path.realpath, which means that if we're in a linked build tree,
+# it won't be able to find ug-book.xml which is in the build tree but
+# not in the source tree. Hence, we copy ug-book.xml to the source
+# tree. This is a horrible hack, but I can't find a better way to do
+# it --SDM (2009-05-11)
+
+build_ug_book = $(TOP)/docs/users_guide/ug-book.xml
+src_ug_book = $(dir $(realpath $(dir $(build_ug_book))/ug-book.xml.in))ug-book.xml
+
+ifneq "$(build_ug_book)" "$(src_ug_book)"
+$(src_ug_book) : $(build_ug_book)
+ $(CP) $< $@
+docs/users_guide/users_guide.pdf: $(src_ug_book)
+endif