make it so that 'make html', 'make pdf', and 'make ps' work for docs
authorSimon Marlow <marlowsd@gmail.com>
Mon, 11 May 2009 12:02:56 +0000 (12:02 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 11 May 2009 12:02:56 +0000 (12:02 +0000)
mk/sub-makefile.mk
rules/docbook.mk

index 1e9cf22..1d41bd1 100644 (file)
@@ -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.
index 3eb5d94..ce014c8 100644 (file)
@@ -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 $$@