Spdk/doc/Makefile
Tomasz Zawadzki 67d8b8d505 deprecation: add the md to documentation Makefile
Originally deprecation.md was pulled verbatim to
the built documentation. This resulted in very
weird paths on the spdk.io:
https://spdk.io/doc/md__home_sys_sgsw_oss_spdk_github_io_spdk_deprecation.html#deprecation

Use the way that changelog does it, by copying
the file and adding appropriate section links.

Now only the Doxygen version will contain the
section links. Meanwhile deprecation.md in
project root will not. This improves readability.

Change-Id: Ic5c1caf7603b847b3c7445bde76e277ba1ccb740
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16574
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-05-09 17:58:11 +08:00

33 lines
757 B
Makefile

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (C) 2015 Intel Corporation
# All rights reserved.
#
SPDK_ROOT_DIR := $(abspath $(CURDIR)/..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
all: doc
@:
.PHONY: all doc clean
doc: output
deprecation.md: ../deprecation.md
$(Q)sed -e 's/^# Deprecation/# Deprecation {#deprecation}/' \
< $< > $@
changelog.md: ../CHANGELOG.md
$(Q)sed -e 's/^# Changelog/# Changelog {#changelog}/' \
-e 's/^##/#/' \
-e 's/^# \(\(v..\...\):.*\)/# \1 {#changelog-\2}/' \
-e '/# v..\...:/s/\./-/2' \
< $< > $@
output: Doxyfile changelog.md deprecation.md $(wildcard *.md) $(wildcard ../include/spdk/*.h)
$(Q)rm -rf $@
$(Q)doxygen Doxyfile
clean:
$(Q)rm -rf output changelog.md deprecation.md