Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #223 from hasheddan/gen-pub
Browse files Browse the repository at this point in the history
Separate docs generation from running locally
  • Loading branch information
hasheddan authored Dec 5, 2022
2 parents 673f682 + 8bb2218 commit 7da2fde
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions makelib/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,25 @@ DOCS_VERSION_DIR := $(DOCS_WORK_DIR)/$(DEST_DOCS_DIR)/$(DOCS_VERSION)
# ====================================================================================
# Targets

docs.generate:
docs.init:
rm -rf $(DOCS_WORK_DIR)
mkdir -p $(DOCS_WORK_DIR)
git clone --depth=1 -b master $(DOCS_GIT_REPO) $(DOCS_WORK_DIR)

docs.generate: docs.init
rm -rf $(DOCS_VERSION_DIR)
@if [ "$(DOCS_VERSION_ACTIVE)" == "true" ]; then \
$(INFO) Including version in documentation ; \
ln -s $(ROOT_DIR)/$(SOURCE_DOCS_DIR) $(DOCS_VERSION_DIR); \
cp -r $(SOURCE_DOCS_DIR)/ $(DOCS_VERSION_DIR); \
$(OK) Version included in documentation ; \
fi

docs.run: docs.generate
docs.run: docs.init
@if [ "$(DOCS_VERSION_ACTIVE)" == "true" ]; then \
$(INFO) Including version in documentation ; \
ln -s $(ROOT_DIR)/$(SOURCE_DOCS_DIR) $(DOCS_VERSION_DIR); \
$(OK) Version included in documentation ; \
fi
cd $(DOCS_WORK_DIR) && DOCS_VERSION=$(DOCS_VERSION) $(MAKE) run

docs.validate: docs.generate
Expand Down

0 comments on commit 7da2fde

Please sign in to comment.