49 lines
1.1 KiB
Makefile
49 lines
1.1 KiB
Makefile
set export
|
|
builddir := `pwd` / "_build"
|
|
|
|
all: gerby_db
|
|
|
|
serve: gerby_db
|
|
#!/usr/bin/env bash
|
|
cd $builddir/gerby-website/gerby
|
|
cp tools/*.sqlite .
|
|
flask --app . run --host 0.0.0.0
|
|
|
|
pdf: book_tex
|
|
tectonic $builddir/book.tex
|
|
|
|
gerby_src:
|
|
#!/usr/bin/env bash
|
|
mkdir -p $builddir
|
|
if [ ! -d "$builddir/gerby-website" ]; then
|
|
git clone https://github.com/gerby-project/gerby-website $builddir/gerby-website
|
|
fi
|
|
|
|
gerby_db: plastex_files gerby_src
|
|
#!/usr/bin/env bash
|
|
cd $builddir/gerby-website/gerby/tools
|
|
rm -rf stacks stacks.paux stacks.tags
|
|
cp -r $builddir/web/book stacks
|
|
cp $builddir/web/book.paux stacks.paux
|
|
cp $builddir/web/tags stacks.tags
|
|
python3 update.py
|
|
|
|
plastex_files: book_tex tags bib
|
|
#!/usr/bin/env bash
|
|
mkdir -p $builddir/web
|
|
cd $builddir/web
|
|
rm -r book
|
|
cp tags $builddir/web/tags
|
|
cp $builddir/my.bib $builddir/web/my.bib
|
|
plastex --renderer=Gerby $builddir/book.tex
|
|
|
|
tags:
|
|
mkdir -p $builddir
|
|
python3 scripts/update_tags.py tags
|
|
|
|
bib:
|
|
touch $builddir/my.bib
|
|
|
|
book_tex:
|
|
mkdir -p $builddir
|
|
python3 scripts/build_book.py > $builddir/book.tex
|