public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: add a rule to just create one file for kernel doc
@ 2012-06-26 17:40 Sebastian Andrzej Siewior
  2012-06-26 18:07 ` Richard Weinberger
  2012-06-28  9:06 ` Michal Marek
  0 siblings, 2 replies; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2012-06-26 17:40 UTC (permalink / raw)
  To: Michal Marek
  Cc: linux-kbuild, linux-kernel, Sebastian Andrzej Siewior,
	Richard Weinberger

If you are chaning the file and you want to verify that it looks good it
is helpfull to just re-run for the single file instead of running the
complete htmldocs target.

With this patch one can run
|	make drivers/mtd/ubi/wl.html
and create the output just for this file.

Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
 Makefile               |    2 ++
 scripts/Makefile.build |    6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/Makefile b/Makefile
index 3fdfde2..eccf5cf 100644
--- a/Makefile
+++ b/Makefile
@@ -1338,6 +1338,8 @@ endif
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.o: %.S prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.html: %.c FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.symtypes: %.c prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index ff1720d..75a1823 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -209,6 +209,12 @@ cmd_cc_i_c       = $(CPP) $(c_flags)   -o $@ $<
 $(obj)/%.i: $(src)/%.c FORCE
 	$(call if_changed_dep,cc_i_c)
 
+quiet_cmd_doc_html_c	= HTML $@
+cmd_doc_html_c		= $(srctree)/scripts/kernel-doc -html $< > $@
+
+$(obj)/%.html: $(src)/%.c FORCE
+	$(call if_changed,doc_html_c)
+
 cmd_gensymtypes =                                                           \
     $(CPP) -D__GENKSYMS__ $(c_flags) $< |                                   \
     $(GENKSYMS) $(if $(1), -T $(2)) -a $(ARCH)                              \
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-08 17:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26 17:40 [PATCH] kbuild: add a rule to just create one file for kernel doc Sebastian Andrzej Siewior
2012-06-26 18:07 ` Richard Weinberger
2012-06-28  9:06 ` Michal Marek
2012-07-08 17:34   ` [PATCH v2] " Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox