diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-01-14 09:55:01 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-01-16 08:55:25 +0300 |
commit | c2e0b0291475a49f6c923ee7fda864fb2c3c2c6d (patch) | |
tree | f8ab986ebf295c92c099fd9f9e3dc8770c253d90 /Makefile | |
parent | 2e5ede82796960435fff80b27b21dfb399d2e2fb (diff) | |
download | opensbi-c2e0b0291475a49f6c923ee7fda864fb2c3c2c6d.tar.xz |
Makefile: Add make targets to build and install documentation
This patch extends top-level makefile to build and install
documentation. The 'docs' make target is for building the
documentation PDF whereas 'install_docs' make target is for
installing the documentation PDF.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -264,6 +264,19 @@ $(build_dir)/$(platform_subdir)/%.dep: $(src_dir)/%.S $(build_dir)/$(platform_subdir)/%.o: $(src_dir)/%.S $(call compile_as,$@,$<) +# Rule for "make docs" +$(build_dir)/docs/latex/refman.pdf: $(build_dir)/docs/latex/refman.tex + $(CMD_PREFIX)mkdir -p $(build_dir)/docs + $(CMD_PREFIX)$(MAKE) -C $(build_dir)/docs/latex +$(build_dir)/docs/latex/refman.tex: $(build_dir)/docs/doxygen.cfg + $(CMD_PREFIX)mkdir -p $(build_dir)/docs + $(CMD_PREFIX)doxygen $(build_dir)/docs/doxygen.cfg +$(build_dir)/docs/doxygen.cfg: $(src_dir)/docs/doxygen.cfg + $(CMD_PREFIX)mkdir -p $(build_dir)/docs + $(CMD_PREFIX)cat docs/doxygen.cfg | sed -e "s#@@SRC_DIR@@#$(src_dir)#" -e "s#@@BUILD_DIR@@#$(build_dir)#" > $(build_dir)/docs/doxygen.cfg +.PHONY: docs +docs: $(build_dir)/docs/latex/refman.pdf + # Dependency files should only be included after default Makefile rules # They should not be included for any "xxxconfig" or "xxxclean" rule all-deps-1 = $(if $(findstring config,$(MAKECMDGOALS)),,$(deps-y)) @@ -298,6 +311,10 @@ install_firmwares: $(build_dir)/$(platform_subdir)/lib/libplatsbi.a $(build_dir) $(call inst_file_list,$(install_dir),$(build_dir),$(platform_subdir)/firmware,$(firmware-elfs-path-y)) $(call inst_file_list,$(install_dir),$(build_dir),$(platform_subdir)/firmware,$(firmware-bins-path-y)) +.PHONY: install_docs +install_docs: $(build_dir)/docs/latex/refman.pdf + $(call inst_file,$(install_dir)/docs/refman.pdf,$(build_dir)/docs/latex/refman.pdf) + # Rule for "make clean" .PHONY: clean clean: |