# SPDX-License-Identifier: CC0-1.0 # # Copyright (C) 2024 Wojtek Kosior # Make sure you have Pandoc, a LaTeX distribution, Python as well as Python # packages `BeautifulSoup4', `pyyaml' (YAML parser library) and `requests' # installed. PYTHON=python3 PANDOC=pandoc LATEXMK=latexmk DEFAULT_TARGETS = \ profiles_with_scraped_info.yaml \ tables.pdf \ techniques_table_doc.pdf all: $(DEFAULT_TARGETS) .PHONY: all .SUFFIXES: .pdf .md .md.pdf: $(PANDOC) \ -V geometry:margin=1.10in \ -r markdown-auto_identifiers \ --number-sections \ --shift-heading-level-by=-1 \ --columns=1 \ -o $@ $< tables.md: threats_by_sector_table.py profiles.yaml $(PYTHON) $^ > $@ profiles_with_scraped_info.yaml: scrape_groups_info.py profiles.yaml $(PYTHON) $^ > $@ techniques_table.tex: techniques_table.py profiles_with_scraped_info.yaml $(PYTHON) $^ > $@ techniques_table_doc.pdf: techniques_table_doc.tex tlp.tex techniques_table.tex $(LATEXMK) -pdf $< th-proj-archive.tar.gz: Makefile profiles.yaml scrape_groups_info.py \ tables.md techniques_table.py threats_by_sector_table.py \ tlp.tex $(DEFAULT_TARGETS) tar --transform='s|^|th-proj-archive/|' \ --mtime=1970-01-01T00:00:00-00:00 --group=0 --owner=0 \ -czf $@ $^ clean: rm -rf tables.md techniques_table.tex th-proj-archive.tar.gz \ $(DEFAULT_TARGETS) $(LATEXMK) -C .PHONY: clean magisterclean: clean rm -rf scraping/ .PHONY: magisterclean