mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2024-12-22 08:43:33 +01:00
3eaed2eaa8
* Reorganize resource directories (templates, less, static) * Show categories on index * Add favicon
30 lines
677 B
Makefile
30 lines
677 B
Makefile
.PHONY=static all clean
|
|
|
|
ALL_STATIC := $(patsubst res/static/%,public/%,$(wildcard res/static/*))
|
|
ALL_LESS := $(patsubst res/less/%.less,public/%.css,$(wildcard res/less/*.less))
|
|
ALL_TEMPLATES := $(wildcard res/templates/*.html)
|
|
PY_SRC := $(wildcard src/**.py)
|
|
|
|
|
|
all: public public/audios public/index.html static
|
|
|
|
static: $(ALL_LESS) $(ALL_STATIC)
|
|
|
|
public:
|
|
mkdir public
|
|
|
|
public/index.html: $(ALL_TEMPLATES) $(PY_SRC)
|
|
python3 src/latex_scanner.py --latex latex/cancionero.tex --audios audios
|
|
|
|
public/audios: audios public
|
|
rm -f public/audios
|
|
ln -s ../audios public/audios
|
|
|
|
public/%.css: res/less/%.less
|
|
lessc $< $@
|
|
|
|
public/%: res/static/%
|
|
cp $< $@
|
|
|
|
clean:
|
|
rm -rf public
|