Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/
buildsrc/
.venv/
25 changes: 23 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,34 @@
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
SPECDIR = spec
BUILDDIR = build
BUILDSRCDIR = buildsrc

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M help "$(BUILDSRCDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile
.PHONY: help Makefile rfcs with_spec clone_spec clean_spec

with_spec: Makefile $(BUILDSRCDIR) rfcs
@$(SPHINXBUILD) -M html "$(BUILDSRCDIR)/$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

$(BUILDSRCDIR): spec
@cp "secop_sphinx.py" "$(BUILDSRCDIR)"
@cp -r "$(SOURCEDIR)" "$(BUILDSRCDIR)"
@cp -r $(BUILDSRCDIR)/spec/protocol/specification/* "$(BUILDSRCDIR)/$(SOURCEDIR)/specification"

rfcs:
python process_rfcs.py "$(BUILDSRCDIR)/spec/rfcs" "$(BUILDSRCDIR)/$(SOURCEDIR)/rfcs"

spec:
@if [ ! -d "$(BUILDSRCDIR)/spec" ]; then \
git clone "https://github.com/SampleEnvironment/SECoP.git" "$(BUILDSRCDIR)/spec"; \
fi

clean_spec:
rm -rf $(BUILDSRCDIR)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down