TARGET=specification MODULE_NAME := $(shell basename `dirname \`pwd\``) .ONESHELL: SHELL = /usr/bin/bash .SILENT: localhelp: echo -e "Possible requirement options are:" echo -e "\033[1;33m - tex - Create a local requirement specification tex file\e[0m" echo -e "\033[1;33m - pdf - Create a local requirement specification pdf file\e[0m" echo -e "\033[1;33m - view - Create a local requirement specification and view the document\e[0m" echo -e "\033[1;33m - release - Create a local requirement specification and copy it to the release folder\e[0m $(MODULE_NAME)/_requirements_" $(TARGET).tex: $(MODULE_NAME)/_requirements_/$(TARGET).py venv/bin/python rspec/__init__.py $(MODULE_NAME)/_requirements_/$(TARGET).py > $(TARGET).tex tex: $(TARGET).tex $(TARGET).pdf: $(TARGET).tex latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $(TARGET).tex pdf: $(TARGET).pdf lightclean release: $(TARGET).pdf lightclean mkdir -p $(MODULE_NAME)/_requirements_ cp specification.pdf $(MODULE_NAME)/_requirements_ view: $(TARGET).pdf lightclean xdg-open $(TARGET).pdf lightclean: echo -e "\033[1;33mCleaning up requirements...\033[00m" echo -e "\e[1m * Generated latex files...\e[0m" latexmk -c -f $(TARGET).tex 1> /dev/null 2> /dev/null localclean: lightclean echo -e "\e[1m * Generated TeX-File...\e[0m" rm -f *.tex echo -e "\e[1m * Generated pdf-File...\e[0m" rm -vf $(TARGET).pdf