Skip to content

Commit

Permalink
Add Movement to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallwork23 committed Jan 12, 2024
1 parent 9fdbb06 commit 7fca5b4
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BUILDDIR = build
PYTHON = ${VIRTUAL_ENV}/bin/python3

ANIMATE = ${VIRTUAL_ENV}/src/animate
MOVEMENT = ${VIRTUAL_ENV}/src/movement
GOALIE = ${VIRTUAL_ENV}/src/goalie

# Put it first so that "make" without argument is like "make help".
Expand All @@ -28,18 +29,23 @@ copy_demos:
install -d source/demos
cp ${ANIMATE}/demos/*.py source/demos
cp ${ANIMATE}/demos/*.jpg source/demos
cp ${MOVEMENT}/demos/*.py source/demos
cp ${MOVEMENT}/demos/*.jpg source/demos
cp ${MOVEMENT}/demos/demo_references.bib source/demos
cp ${GOALIE}/demos/*.py source/demos
cp ${GOALIE}/demos/*.jpg source/demos
cp ${GOALIE}/demos/demo_references.bib source/demos
cat ${GOALIE}/demos/demo_references.bib >> source/demos/demo_references.bib
for file in source/demos/*.py; do pylit -c $$file; mv $$file.txt $$file.rst; done
install -d $(BUILDDIR)/html/demos
cp source/demos/*.py $(BUILDDIR)/html/demos
cp source/demos/*.jpg $(BUILDDIR)/html/demos
cp source/demos/*.bib $(BUILDDIR)/html/demos
install -d $(BUILDDIR)/html/animate
install -d $(BUILDDIR)/html/movement
install -d $(BUILDDIR)/html/goalie
mkdir -p $(BUILDDIR)/html/_images
cp source/animate/images/*.jpg $(BUILDDIR)/html/_images
# cp source/movement/images/*.jpg $(BUILDDIR)/html/_images
cp source/goalie/images/*.jpg $(BUILDDIR)/html/_images

SPHINX_TARGETS = dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub \
Expand All @@ -56,7 +62,7 @@ html: apidoc $(GENERATED_FILES)
cp -r $(BUILDDIR)/html/* ..

.PHONY: apidoc
apidoc: apidoc-animate apidoc-goalie
apidoc: apidoc-animate apidoc-movement apidoc-goalie

apidoc-animate:
$(SPHINXAPIDOC) $$($(PYTHON) -c 'import animate; import os; print(os.path.dirname(animate.__file__))') -o source -f -T
Expand All @@ -70,6 +76,18 @@ apidoc-animate:
echo ".. bibliography:: references.bib" >> source/animate.rst
echo " :all:" >> source/animate.rst

apidoc-movement:
$(SPHINXAPIDOC) $$($(PYTHON) -c 'import movement; import os; print(os.path.dirname(movement.__file__))') -o source -f -T
# TODO: Do this in a less hacky way
echo "" >> source/movement.rst
echo "References" >> source/movement.rst
echo "----------" >> source/movement.rst
echo "" >> source/movement.rst
echo ".. rubric:: References" >> source/movement.rst
echo "" >> source/movement.rst
echo ".. bibliography:: references.bib" >> source/movement.rst
echo " :all:" >> source/movement.rst

apidoc-goalie:
$(SPHINXAPIDOC) $$($(PYTHON) -c 'import goalie; import os; print(os.path.dirname(goalie.__file__))') -o source -f -T
# TODO: Do this in a less hacky way
Expand Down

0 comments on commit 7fca5b4

Please sign in to comment.