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 $(eval $(call clean-target,docs/users_guide,gen,$(docs/users_guide_GENERATED_DOCBOOK_SOURCES)))
29 # Hack: dblatex normalises the name of the input file using
30 # os.path.realpath, which means that if we're in a linked build tree,
31 # it won't be able to find ug-book.xml which is in the build tree but
32 # not in the source tree. Hence, we copy ug-book.xml to the source
33 # tree. This is a horrible hack, but I can't find a better way to do
34 # it --SDM (2009-05-11)
36 build_ug_book = docs/users_guide/ug-book.xml
37 src_ug_book = $(dir $(realpath $(dir $(build_ug_book))/ug-book.xml.in))ug-book.xml
39 # ... and similarly for ug-ent.xml, which is now generated by configure from
40 # ug-ent.xml.in --SDM (2010-02-25)
42 build_ug_ent = docs/users_guide/ug-ent.xml
43 src_ug_ent = $(dir $(realpath $(dir $(build_ug_ent))/ug-ent.xml.in))ug-ent.xml
45 html_docs/users_guide : docs/users_guide/users_guide/prof_scc.png
47 docs/users_guide/users_guide/prof_scc.png : \
48 docs/users_guide/prof_scc.png \
49 docs/users_guide/users_guide/index.html
51 # dep. on d/u/u/index.html is to make sure that the d/u/u dir is created first
53 ifneq "$(build_ug_book)" "$(src_ug_book)"
54 $(src_ug_book) : $(build_ug_book)
56 ifneq "$(BINDIST)" "YES"
57 docs/users_guide/users_guide.pdf docs/users_guide/users_guide.ps: $(src_ug_book)
61 ifneq "$(build_ug_ent)" "$(src_ug_ent)"
62 $(src_ug_ent) : $(build_ug_ent)
64 ifneq "$(BINDIST)" "YES"
65 docs/users_guide/users_guide.pdf docs/users_guide/users_guide.ps: $(src_ug_ent)