X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fghc.mk;h=bfd9433f7ce23eebd91d3b1d07bd33f4056b4321;hb=af6b7e5d76247e9577ab6b9ad8c70dd90df1105d;hp=25cd001c96fad587351832d51601a2e4425584a4;hpb=29eb3f7c9b37706017bde65110896b2b996e2ad4;p=ghc-hetmet.git diff --git a/docs/users_guide/ghc.mk b/docs/users_guide/ghc.mk index 25cd001..bfd9433 100644 --- a/docs/users_guide/ghc.mk +++ b/docs/users_guide/ghc.mk @@ -10,24 +10,28 @@ # # ----------------------------------------------------------------------------- -docs/users_guide_DOCBOOK_SOURCES := \ - $(wildcard docs/users_guide/*.xml) \ - $(basename $(wildcard docs/users_guide/*.xml.in)) +docs/users_guide_GENERATED_DOCBOOK_SOURCES := \ + docs/users_guide/users_guide.xml \ + docs/users_guide/what_glasgow_exts_does.gen.xml + +# sort remove duplicates +docs/users_guide_DOCBOOK_SOURCES := \ + $(sort $(docs/users_guide_GENERATED_DOCBOOK_SOURCES) \ + $(wildcard docs/users_guide/*.xml) \ + $(basename $(wildcard docs/users_guide/*.xml.in))) + +$(docs/users_guide_GENERATED_DOCBOOK_SOURCES): %.xml: inplace/bin/mkUserGuidePart$(exeext) + inplace/bin/mkUserGuidePart$(exeext) $@ $(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) +$(eval $(call clean-target,docs/users_guide,gen,$(docs/users_guide_GENERATED_DOCBOOK_SOURCES))) -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 +html_docs/users_guide : docs/users_guide/users_guide/prof_scc.png -ifneq "$(build_ug_book)" "$(src_ug_book)" -$(src_ug_book) : $(build_ug_book) +docs/users_guide/users_guide/prof_scc.png : \ + docs/users_guide/prof_scc.png \ + docs/users_guide/users_guide/index.html $(CP) $< $@ -docs/users_guide/users_guide.pdf docs/users_guide/users_guide.ps: $(src_ug_book) -endif +# dep. on d/u/u/index.html is to make sure that the d/u/u dir is created first +