| # Makefile for building CORD docs site, guide.opencord.org |
| # Building docs requires the following tools: |
| # - Gitbook toolchain: https://toolchain.gitbook.com/setup.html |
| # - NPM (for Gitbook and Swagger) |
| # - Python (for build glossary script) |
| # - linkchecker (for test target) http://wummel.github.io/linkchecker/ |
| # use bash for pushd/popd, and to fail if commands within a pipe fail |
| LINT_STYLE ?= mdl_relaxed.rb |
| gitbook serve --port 4040 |
| setup: automation-tools cord-tester xos xos-gui xos-tosca swagger $(GENERATED_DOCS) |
| linkchecker --check-extern -a _book/ |
| @echo "markdownlint(mdl) version: `mdl --version`" |
| mdl -s $(LINT_STYLE) `find -L . ! -path "./partials/*" ! -path "./_book/*" ! -path "./node_modules/*" ! -path "./cord-tester/modules/*" -name "*.md"` |
| # link directories that contain other documentation |
| ln -s ../automation-tools automation-tools |
| ln -s ../test/cord-tester/docs cord-tester |
| ln -s ../orchestration/xos/docs xos |
| ln -s ../orchestration/xos-gui/docs xos-gui |
| ln -s ../orchestration/xos-tosca/docs xos-tosca |
| pushd ../orchestration/xos/docs/; make swagger_docs; popd; |
| rm -rf automation-tools cord-tester test xos xos-gui xos-tosca |