From 6f89b9c1d6b29eaa600ac4a8ac1314b0d06f15e3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 20 Jan 2014 14:10:10 +0900 Subject: kbuild: docbook: include cmd files more simply Signed-off-by: Masahiro Yamada Signed-off-by: Michal Marek --- Documentation/DocBook/Makefile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'Documentation') diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 0f9c6ff41aac..105ba8e21777 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -36,6 +36,7 @@ PS_METHOD = $(prefer-db2x) # The targets that may be used. PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs +targets += $(DOCBOOKS) BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) xmldocs: $(BOOKS) sgmldocs: xmldocs @@ -90,14 +91,6 @@ endef %.xml: %.tmpl FORCE $(call if_changed_rule,docproc) -### -#Read in all saved dependency files -cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) - -ifneq ($(cmd_files),) - include $(cmd_files) -endif - ### # Changes in kernel-doc force a rebuild of all documentation $(BOOKS): $(KERNELDOC) -- cgit v1.2.3 From 100da4c0150c97ce34d4d3b38bf2f5449b05ae4f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 20 Jan 2014 14:10:11 +0900 Subject: kbuild: docbook: specify KERNELDOC dependency correctly It is not a good idea to describe %.xml: %.tmpl FORCE ... and $(BOOKS): $(KERNELDOC) separately. This cannot detect missing template files. For example, add something to DOCBOOKS variable: DOCBOOKS += foobar.xml and run make xmldocs It will succeed even if Documention/DocBook/foobar.tmpl does not exist. Signed-off-by: Masahiro Yamada Signed-off-by: Michal Marek --- Documentation/DocBook/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Documentation') diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 105ba8e21777..89d9982ee667 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -88,13 +88,9 @@ define rule_docproc ) > $(dir $@).$(notdir $@).cmd endef -%.xml: %.tmpl FORCE +%.xml: %.tmpl $(KERNELDOC) $(DOCPROC) FORCE $(call if_changed_rule,docproc) -### -# Changes in kernel-doc force a rebuild of all documentation -$(BOOKS): $(KERNELDOC) - # Tell kbuild to always build the programs always := $(hostprogs-y) -- cgit v1.2.3 From ec3fadd64b9940baa2a369bf978e8561837db3f5 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 18 Mar 2014 15:47:13 +0900 Subject: kbuild: docbook: use $(obj) and $(src) rather than specific path Signed-off-by: Masahiro Yamada Signed-off-by: Michal Marek --- Documentation/DocBook/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Documentation') diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 89d9982ee667..c19ebeaf280b 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -16,7 +16,7 @@ DOCBOOKS := z8530book.xml device-drivers.xml \ alsa-driver-api.xml writing-an-alsa-driver.xml \ tracepoint.xml drm.xml media_api.xml -include $(srctree)/Documentation/DocBook/media/Makefile +include $(src)/media/Makefile ### # The build process is as follows (targets): @@ -59,14 +59,14 @@ mandocs: $(MAN) installmandocs: mandocs mkdir -p /usr/local/man/man9/ - install Documentation/DocBook/man/*.9.gz /usr/local/man/man9/ + install $(obj)/man/*.9.gz /usr/local/man/man9/ ### #External programs used KERNELDOC = $(srctree)/scripts/kernel-doc DOCPROC = $(objtree)/scripts/docproc -XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl +XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl XMLTOFLAGS += --skip-validation ### @@ -128,7 +128,7 @@ quiet_cmd_db2pdf = PDF $@ index = index.html -main_idx = Documentation/DocBook/$(index) +main_idx = $(obj)/$(index) build_main_index = rm -rf $(main_idx); \ echo '

Linux Kernel HTML Documentation

' >> $(main_idx) && \ echo '

Kernel Version: $(KERNELVERSION)

' >> $(main_idx) && \ @@ -137,7 +137,7 @@ build_main_index = rm -rf $(main_idx); \ quiet_cmd_db2html = HTML $@ cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ echo ' \ - $(patsubst %.html,%,$(notdir $@))

' > $@ + $(patsubst %.html,%,$(notdir $@))

' > $@ %.html: %.xml @(which xmlto > /dev/null 2>&1) || \ -- cgit v1.2.3 From b12f73740b8764952a112a677991300545e98c06 Mon Sep 17 00:00:00 2001 From: Kevin Hao Date: Tue, 1 Apr 2014 14:36:10 +0800 Subject: kbuild: docbook: fix the include error when executing "make help" The commit ec3fadd64b99 (kbuild: docbook: use $(obj) and $(src) rather than specific path) replaces the specific path with $(src). But when executing "make help", the $(src) is null and then causes an include error. Fix it by restoring the specific path. Signed-off-by: Kevin Hao Signed-off-by: Michal Marek --- Documentation/DocBook/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index c19ebeaf280b..ca8fd2628a0f 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -16,7 +16,7 @@ DOCBOOKS := z8530book.xml device-drivers.xml \ alsa-driver-api.xml writing-an-alsa-driver.xml \ tracepoint.xml drm.xml media_api.xml -include $(src)/media/Makefile +include Documentation/DocBook/media/Makefile ### # The build process is as follows (targets): -- cgit v1.2.3