From: Simon Marlow Date: Mon, 11 May 2009 12:02:56 +0000 (+0000) Subject: make it so that 'make html', 'make pdf', and 'make ps' work for docs X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=61ef1764bf342f90480602770b43ec3ae768f7f1;p=ghc-hetmet.git make it so that 'make html', 'make pdf', and 'make ps' work for docs --- diff --git a/mk/sub-makefile.mk b/mk/sub-makefile.mk index 1e9cf22..1d41bd1 100644 --- a/mk/sub-makefile.mk +++ b/mk/sub-makefile.mk @@ -21,7 +21,7 @@ default : .NOTPARALLEL: # all comes first, we want it to be the default target -STD_TARGETS = all clean distclean maintainer_clean install +STD_TARGETS = all clean distclean maintainer_clean install html ps pdf # The + tells make that we're recursively invoking make, otherwise 'make -j2' # goes wrong. diff --git a/rules/docbook.mk b/rules/docbook.mk index 3eb5d94..ce014c8 100644 --- a/rules/docbook.mk +++ b/rules/docbook.mk @@ -20,7 +20,10 @@ define docbook $(call clean-target,$1,docbook,$1/$2 $1/$2.pdf $1/$2.ps) ifeq "$$(BUILD_DOCBOOK_HTML)" "YES" -$(call all-target,$1_html,$1/$2/index.html) +$(call all-target,$1,html_$1) + +.PHONY: html_$1 +html_$1 : $1/$2/index.html $1/$2/index.html: $$($1_DOCBOOK_SOURCES) $$(RM) -r $$(dir $$@) @@ -33,14 +36,20 @@ $1/$2/index.html: $$($1_DOCBOOK_SOURCES) endif ifeq "$$(BUILD_DOCBOOK_PS)" "YES" -$(call all-target,$1_ps,$1/$2.ps) +$(call all-target,$1,ps_$1) + +.PHONY: ps_$1 +ps_$1 : $1/$2.ps $1/$2.ps: $$($1_DOCBOOK_SOURCES) $$(DBLATEX) $$(DBLATEX_OPTS) $1/$2.xml --ps -o $$@ endif ifeq "$$(BUILD_DOCBOOK_PDF)" "YES" -$(call all-target,$1_pdf,$1/$2.pdf) +$(call all-target,$1,pdf_$1) + +.PHONY: pdf_$1 +pdf_$1 : $1/$2.pdf $1/$2.pdf: $$($1_DOCBOOK_SOURCES) $$(DBLATEX) $$(DBLATEX_OPTS) $1/$2.xml --pdf -o $$@