X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fghc.mk;h=ceb6db4d36e03b1785aa6140208d8663e7667dd9;hb=1c83695b5b9ae3175c18908c1d58aeadb1f225ae;hp=bae39adce8f41181ba1c9ffeae5fa68b609ec32d;hpb=34cc75e1a62638f2833815746ebce0a9114dc26b;p=ghc-hetmet.git diff --git a/docs/users_guide/ghc.mk b/docs/users_guide/ghc.mk index bae39ad..ceb6db4 100644 --- a/docs/users_guide/ghc.mk +++ b/docs/users_guide/ghc.mk @@ -1,3 +1,14 @@ +# ----------------------------------------------------------------------------- +# +# (c) 2009 The University of Glasgow +# +# This file is part of the GHC build system. +# +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# +# ----------------------------------------------------------------------------- docs/users_guide_DOCBOOK_SOURCES := \ $(wildcard docs/users_guide/*.xml) \ @@ -5,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 = 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 docs/users_guide/users_guide.ps: $(src_ug_book) +endif