1 # -----------------------------------------------------------------------------
3 # (c) 2009 The University of Glasgow
5 # This file is part of the GHC build system.
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
11 # -----------------------------------------------------------------------------
13 docs/users_guide_GENERATED_DOCBOOK_SOURCES := \
14 docs/users_guide/what_glasgow_exts_does.gen.xml
16 # sort remove duplicates
17 docs/users_guide_DOCBOOK_SOURCES := \
18 $(sort $(docs/users_guide_GENERATED_DOCBOOK_SOURCES) \
19 $(wildcard docs/users_guide/*.xml) \
20 $(basename $(wildcard docs/users_guide/*.xml.in)))
22 $(docs/users_guide_GENERATED_DOCBOOK_SOURCES): %.gen.xml: inplace/bin/mkUserGuidePart
23 inplace/bin/mkUserGuidePart $@
25 $(eval $(call docbook,docs/users_guide,users_guide))
27 # Hack: dblatex normalises the name of the input file using
28 # os.path.realpath, which means that if we're in a linked build tree,
29 # it won't be able to find ug-book.xml which is in the build tree but
30 # not in the source tree. Hence, we copy ug-book.xml to the source
31 # tree. This is a horrible hack, but I can't find a better way to do
32 # it --SDM (2009-05-11)
34 build_ug_book = docs/users_guide/ug-book.xml
35 src_ug_book = $(dir $(realpath $(dir $(build_ug_book))/ug-book.xml.in))ug-book.xml
37 # ... and similarly for ug-ent.xml, which is now generated by configure from
38 # ug-ent.xml.in --SDM (2010-02-25)
40 build_ug_ent = docs/users_guide/ug-ent.xml
41 src_ug_ent = $(dir $(realpath $(dir $(build_ug_ent))/ug-ent.xml.in))ug-ent.xml
43 html_docs/users_guide : docs/users_guide/users_guide/prof_scc.png
45 docs/users_guide/users_guide/prof_scc.png : \
46 docs/users_guide/prof_scc.png \
47 docs/users_guide/users_guide/index.html
49 # dep. on d/u/u/index.html is to make sure that the d/u/u dir is created first
51 ifneq "$(build_ug_book)" "$(src_ug_book)"
52 $(src_ug_book) : $(build_ug_book)
54 ifneq "$(BINDIST)" "YES"
55 docs/users_guide/users_guide.pdf docs/users_guide/users_guide.ps: $(src_ug_book)
59 ifneq "$(build_ug_ent)" "$(src_ug_ent)"
60 $(src_ug_ent) : $(build_ug_ent)
62 ifneq "$(BINDIST)" "YES"
63 docs/users_guide/users_guide.pdf docs/users_guide/users_guide.ps: $(src_ug_ent)