summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-01-19 13:12:17 +0100
committerYorhel <git@yorhel.nl>2021-01-20 09:06:12 +0100
commit9d1727c77d4b00d2a861c2c31f93d3aebff2f2d9 (patch)
tree61d77e79edb2590c06cca80c8d029d8630a5aabc /Makefile
parentb35af5ba52f3bceb603e8c7dda10d4abb84c6bd9 (diff)
v2rw: Rewrite done, time to clean up old v2 code
Yay! There are no more request handlers in the VNDB::* namespace and no more Javascript in data/js/. This cleans up a lot of old legacy code that wasn't fun to maintain.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 4 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 816f8d20..dbba4695 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,6 @@ ALL_KEEP=\
www/robots.txt static/robots.txt
ALL_CLEAN=\
- static/g/vndb.js \
static/g/plain.js \
static/g/elm.js \
data/icons/icons.css \
@@ -36,7 +35,6 @@ ALL_CLEAN=\
$(shell ls css/skins/*.sass | sed -e 's/css\/skins\/\(.\+\)\.sass/static\/g\/\1.css/g')
PROD=\
- static/g/vndb.min.js static/g/vndb.min.js.gz \
static/g/plain.min.js static/g/plain.min.js.gz \
static/g/elm.min.js static/g/elm.min.js.gz \
static/g/icons.opt.png \
@@ -49,6 +47,7 @@ clean:
rm -f ${ALL_CLEAN} ${PROD}
rm -f static/g/icons.png
rm -f static/f/{vndb,elm,plain}{,.min}.js{,.gz} static/f/icons{,.opt}.png static/s/*/style{,.min}.css{,.gz} static/s/*/boxbg.png
+ rm -f static/g/vndb{,.min}.js{,.gz}
rm -rf elm/Gen/
rm -rf elm/elm-stuff/build-artifacts
$(MAKE) -C sql/c clean
@@ -81,8 +80,6 @@ chmod: all
-# v2 & v2-rw
-
data/icons/icons.css: data/icons/*.png data/icons/*/*.png util/spritegen.pl | static/g
util/spritegen.pl
@@ -97,24 +94,12 @@ static/g/%.css: css/skins/%.sass css/v2.css data/icons/icons.css | static/g
-# v2
-
-static/g/vndb.js: data/js/*.js lib/VNDB/Types.pm util/jsgen.pl data/conf.pl | static/g
- util/jsgen.pl
-
-static/g/vndb.min.js: static/g/vndb.js
- uglifyjs $< --compress --mangle --comments '/(@license|@source|SPDX-)/' -o $@
-
-
-
-# v2-rw
-
# Order of JS files matters, so we read an '//order:x' comment from the files and sort by that.
# Files without that comment are assumed to have '//order:4'.
# (This trick will not work if we ever add JS files generated by this Makefile)
JS_FILES=$(shell find elm \! -path 'elm/elm-stuff/*' -name '*.js' -exec sh -c "echo \`grep -Eo '^// *order: *[0-9]+' \"{}\" || echo 4\` \"{}\"" \; | sed -E 's/\/\/ *order: *//' | sort | sed 's/..//')
-static/g/plain.js: ${JS_FILES} | static/f
+static/g/plain.js: ${JS_FILES} | static/g
echo '// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-only' > $@~
echo '// @source: https://code.blicky.net/yorhel/vndb/src/branch/master/elm' >>$@~
echo '// SPDX-License-Identifier: AGPL-3.0-only' >>$@~
@@ -157,11 +142,11 @@ endef
elm/Gen/.generated: lib/VNWeb/*.pm lib/VNWeb/*/*.pm lib/VNDB/Types.pm lib/VNDB/ExtLinks.pm lib/VNDB/Config.pm data/conf.pl
util/vndb.pl elmgen
-static/g/elm.js: ${ELM_FILES} elm/Gen/.generated | static/f
+static/g/elm.js: ${ELM_FILES} elm/Gen/.generated | static/g
cd elm && ELM_HOME=elm-stuff elm make ${ELM_MODULES} --output ../$@
${fix-elm}
-static/g/elm.min.js: ${ELM_FILES} elm/Gen/.generated | static/f
+static/g/elm.min.js: ${ELM_FILES} elm/Gen/.generated | static/g
cd elm && ELM_HOME=elm-stuff elm make --optimize ${ELM_MODULES} --output ../$@
${fix-elm}
uglifyjs $@ --comments '/(@license|@source|SPDX-)/' --compress \