2020-12-25 21:49:59 +01:00
|
|
|
.PHONY=static all clean
|
2020-12-12 16:20:41 +01:00
|
|
|
|
2020-12-25 21:49:59 +01:00
|
|
|
ALL_STATIC := $(patsubst res/static/%,public/%,$(wildcard res/static/*))
|
2020-12-26 10:07:01 +01:00
|
|
|
ALL_LESS := public/main.css public/index.css public/song.css
|
2020-12-25 21:49:59 +01:00
|
|
|
ALL_TEMPLATES := $(wildcard res/templates/*.html)
|
|
|
|
PY_SRC := $(wildcard src/**.py)
|
2020-12-12 16:20:41 +01:00
|
|
|
|
|
|
|
|
2020-12-25 21:49:59 +01:00
|
|
|
all: public public/audios public/index.html static
|
2020-12-12 16:20:41 +01:00
|
|
|
|
2020-12-25 21:49:59 +01:00
|
|
|
static: $(ALL_LESS) $(ALL_STATIC)
|
2020-12-12 16:20:41 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
mkdir public
|
|
|
|
|
2020-12-25 21:49:59 +01:00
|
|
|
public/index.html: $(ALL_TEMPLATES) $(PY_SRC)
|
2023-09-08 00:37:10 +02:00
|
|
|
python3 src/latex_scanner.py --latex latex/cancionero.tex --audios audios --other-latex latex/canciones/
|
2020-10-14 00:54:52 +02:00
|
|
|
|
2020-12-12 16:20:41 +01:00
|
|
|
public/audios: audios public
|
|
|
|
rm -f public/audios
|
2023-09-08 00:37:10 +02:00
|
|
|
#ln -s ../audios/Canciones public/audios
|
2020-12-12 16:20:41 +01:00
|
|
|
|
2020-12-26 10:07:01 +01:00
|
|
|
public/main.css: res/less/main.less res/less/colors.less
|
|
|
|
lessc $< $@
|
|
|
|
|
|
|
|
public/index.css: res/less/index.less res/less/colors.less
|
|
|
|
lessc $< $@
|
|
|
|
|
|
|
|
public/song.css: res/less/song.less res/less/colors.less
|
2020-12-12 16:20:41 +01:00
|
|
|
lessc $< $@
|
|
|
|
|
2020-12-25 21:49:59 +01:00
|
|
|
public/%: res/static/%
|
2021-05-22 18:22:44 +02:00
|
|
|
cp -ra $< $@
|
2020-12-12 16:20:41 +01:00
|
|
|
|
2020-10-14 00:54:52 +02:00
|
|
|
clean:
|
|
|
|
rm -rf public
|