Added testlib, root Makefile and shared.mk with a special view towards laboratories 04, 05, 06. Renamed Stash's Sphinx build files. To be cleared out with @stsh. Altered Makefiles which include the shared.mk for the new repository name, snp-lab-code.
This commit is contained in:
@@ -1,20 +1,32 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
EMPTY :=
|
||||
SPACE := $(EMPTY) $(EMPTY)
|
||||
NL := $(EMPTY)\\n$(EMPTY)
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = build
|
||||
LABS := $(sort $(wildcard P[0-9][0-9]*))
|
||||
EXAMPLE := $(if $(firstword $(LABS)),$(firstword $(LABS)),"Pxx")
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
default:
|
||||
@echo "**** SNP Labs ****"
|
||||
@echo "$(subst $(SPACE),$(NL),$(LABS))"
|
||||
@echo ""
|
||||
@echo "**** Prerequisites ****"
|
||||
@echo "1. Change into the testlib directory"
|
||||
@echo " cd testlib"
|
||||
@echo "2. Build and install the library, e.g."
|
||||
@echo " make clean"
|
||||
@echo " make default"
|
||||
@echo " make test"
|
||||
@echo " make install"
|
||||
@echo " Caution: make sure the tests and installation does not produce any error."
|
||||
@echo ""
|
||||
@echo "**** How to build and run a lab? ****"
|
||||
@echo "1. Change into the respective directory, e.g."
|
||||
@echo " cd $(EXAMPLE)"
|
||||
@echo "2. Build the lab, e.g."
|
||||
@echo " make"
|
||||
@echo " The resulting executable is located in the bin folder."
|
||||
@echo "3. Build and run the tests, e.g."
|
||||
@echo " make test"
|
||||
@echo "Notes:"
|
||||
@echo "- You may cleanup the builds, e.g."
|
||||
@echo " make clean"
|
||||
|
||||
Reference in New Issue
Block a user