Rework building of documentation files
Instead of an ugly Makefile structure, we now use a single compile script that collects all the files in build/doc.
This commit is contained in:
parent
b587beb806
commit
6d8a131865
33 changed files with 37 additions and 100 deletions
35
Makefile
35
Makefile
|
@ -1,12 +1,30 @@
|
||||||
|
# Makefile for latex-packages
|
||||||
|
|
||||||
|
BUILD_DIR=build
|
||||||
|
DOC_SUBDIR=doc
|
||||||
|
PACKAGES_SUBDIR=packages
|
||||||
|
COMPILE_SUBDIR=.compile
|
||||||
BUILD_FLAGS=--recursive --git-version --pytex-version --license --author "Maximilian Keßler" --pytex-info-text --extra-header ".build/header_info.txt" --name "prepend-author" --clean-old-files
|
BUILD_FLAGS=--recursive --git-version --pytex-version --license --author "Maximilian Keßler" --pytex-info-text --extra-header ".build/header_info.txt" --name "prepend-author" --clean-old-files
|
||||||
BUILD_DIRS= --source-dir src --build-dir build
|
|
||||||
|
|
||||||
|
ROOT=$(shell pwd)
|
||||||
|
BUILD_ROOT=${ROOT}/${BUILD_DIR}
|
||||||
|
|
||||||
|
|
||||||
|
# Build packages
|
||||||
build: .initsubmodulelock
|
build: .initsubmodulelock
|
||||||
@python3 build.py ${BUILD_DIRS} ${BUILD_FLAGS}
|
python3 build.py --source-dir src --build-dir ${BUILD_ROOT}/${PACKAGES_SUBDIR} ${BUILD_FLAGS}
|
||||||
|
|
||||||
|
# Build packages and allow repo to be dirty (use with caution and only when developing)
|
||||||
dirty: .initsubmodulelock
|
dirty: .initsubmodulelock
|
||||||
@python3 build.py ${BUILD_DIRS} ${BUILD_FLAGS} --allow-dirty
|
python3 build.py --source-dir src --build-dir ${BUILD_ROOT}/${PACKAGES_SUBDIR} ${BUILD_FLAGS} --allow-dirty
|
||||||
|
|
||||||
|
# generate documentation files from /doc
|
||||||
|
doc:
|
||||||
|
@scripts/compile_doc.sh
|
||||||
|
@mkdir -p ${BUILD_ROOT}/${DOC_SUBDIR}
|
||||||
|
@cp .compile/*.pdf ${BUILD_ROOT}/${DOC_SUBDIR}
|
||||||
|
@echo Documentation files written to ${BUILD_ROOT}/${DOC_SUBDIR}
|
||||||
|
|
||||||
init: .initsubmodulelock .gitconfiglock
|
init: .initsubmodulelock .gitconfiglock
|
||||||
|
|
||||||
config: .gitconfiglock
|
config: .gitconfiglock
|
||||||
|
@ -27,12 +45,9 @@ all: clean build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@-rm -r build/
|
@-rm -r build/
|
||||||
|
@-rm -r .compile/
|
||||||
ci-build:
|
|
||||||
@python3 build.py --source-dir src --build-dir build/LatexPackagesBuild ${BUILD_FLAGS}
|
|
||||||
|
|
||||||
doc:
|
|
||||||
@-rm -r build/documentation
|
|
||||||
$(MAKE) -C doc central-doc
|
|
||||||
|
|
||||||
.PHONY: build doc
|
.PHONY: build doc
|
||||||
|
#!/bin/bash
|
||||||
|
# Compiles all correspondence letters in repository
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
TOPTARGETS := all clean doc full central-doc
|
|
||||||
|
|
||||||
SUBDIRS := $(wildcard */.)
|
|
||||||
|
|
||||||
$(TOPTARGETS): $(SUBDIRS)
|
|
||||||
$(SUBDIRS):
|
|
||||||
$(MAKE) -C $@ $(MAKECMDGOALS)
|
|
||||||
|
|
||||||
central-doc: $(SUBDIRS)
|
|
||||||
mv *.pdf ..
|
|
||||||
|
|
||||||
.PHONY: $(TOPTARGETS) $(SUBDIRS)
|
|
|
@ -1,11 +0,0 @@
|
||||||
doc:
|
|
||||||
latexmk
|
|
||||||
|
|
||||||
full:
|
|
||||||
latexmk -gg
|
|
||||||
|
|
||||||
clean:
|
|
||||||
latexmk -C
|
|
||||||
|
|
||||||
central-doc: full
|
|
||||||
mv *.pdf ..
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
# This is the .latexmkrc file that needs to be used for compiling the documentation
|
||||||
|
# Note that the makeindex command is non-standard and follows the LaTeX3 architecture
|
||||||
|
# Without this, generating the indexes properly will not work and leads to compiling
|
||||||
|
# errors.
|
||||||
|
# When adding new packages, this should be symlinked to in each new directory,
|
||||||
|
# so that a call to latexmk will automatically use these options
|
||||||
|
|
||||||
$makeindex = 'makeindex -s gind.ist %O -o %D %S';
|
$makeindex = 'makeindex -s gind.ist %O -o %D %S';
|
||||||
$clean_ext .= ' glo';
|
$clean_ext .= ' glo';
|
||||||
$clean_ext .= ' hd';
|
$clean_ext .= ' hd';
|
||||||
|
|
13
doc/Makefile
13
doc/Makefile
|
@ -1,13 +0,0 @@
|
||||||
TOPTARGETS := all clean doc full central-doc
|
|
||||||
|
|
||||||
SUBDIRS := $(wildcard */.)
|
|
||||||
|
|
||||||
$(TOPTARGETS): $(SUBDIRS)
|
|
||||||
$(SUBDIRS):
|
|
||||||
$(MAKE) -C $@ $(MAKECMDGOALS)
|
|
||||||
|
|
||||||
central-doc: $(SUBDIRS)
|
|
||||||
mkdir -p ../build/documentation
|
|
||||||
mv *.pdf ../build/documentation
|
|
||||||
|
|
||||||
.PHONY: $(TOPTARGETS) $(SUBDIRS)
|
|
|
@ -1 +0,0 @@
|
||||||
../DIR_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../DIR_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../DIR_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../DIR_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
|
@ -1 +0,0 @@
|
||||||
../../DOC_MAKEFILE
|
|
5
scripts/compile_doc.sh
Executable file
5
scripts/compile_doc.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#! /bin/bash
|
||||||
|
# Compiles all documentation files in repository
|
||||||
|
BUILD_COMMAND="latexmk -output-directory=$(pwd)/.compile $1"
|
||||||
|
|
||||||
|
find doc -type f -name "*.tex" -execdir sh -c "$BUILD_COMMAND" -- {} \;
|
|
@ -1,10 +0,0 @@
|
||||||
pdf:
|
|
||||||
latexmk
|
|
||||||
|
|
||||||
full:
|
|
||||||
latexmk -gg
|
|
||||||
|
|
||||||
clean:
|
|
||||||
latexmk -C
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
|
@ -1,10 +0,0 @@
|
||||||
pdf:
|
|
||||||
latexmk
|
|
||||||
|
|
||||||
full:
|
|
||||||
latexmk -gg
|
|
||||||
|
|
||||||
clean:
|
|
||||||
latexmk -C
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
|
@ -1,10 +0,0 @@
|
||||||
pdf:
|
|
||||||
latexmk
|
|
||||||
|
|
||||||
full:
|
|
||||||
latexmk -gg
|
|
||||||
|
|
||||||
clean:
|
|
||||||
latexmk -C
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
Loading…
Reference in a new issue