This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
scratchblocks/Makefile

43 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

version := $(shell git describe --tags)
2016-04-16 17:41:58 +01:00
all : css commands translations js
2016-04-03 14:52:14 +01:00
clean :
rm -r build
rm src/translations.js
rm src/translations-all.js
js-name := build/scratchblocks-$(version)-min.js
2016-04-03 13:54:39 +01:00
translations := build/translations-$(version)-min.js
translations_all := build/translations-all-$(version)-min.js
js : $(js-name) $(translations) $(translations_all)
$(js-name) : \
2016-04-10 14:12:29 +01:00
src/scratchblocks.js
mkdir -p build/
uglifyjs $^ > $@ --comments --mangle
2016-04-03 13:54:39 +01:00
$(translations) : src/translations.js
uglifyjs $^ > $@ --comments
$(translations_all) : src/translations-all.js
uglifyjs $^ > $@ --comments
zopfli :
zopfli build/*.js
2016-04-03 14:53:38 +01:00
css : src/defs.css
sed -i '' 's/var cssContent =.*/var cssContent = "$(shell cleancss $^)";/' \
2016-04-03 14:48:51 +01:00
src/scratchblocks.js
2016-04-09 21:18:45 +01:00
commands : src/commands.js
sh -c 'cd src ; python package_commands.py'
2016-04-03 13:54:39 +01:00
translations : \
src/translations.js \
src/translations-all.js
2016-04-16 00:03:19 +01:00
src/translations.js : src/extra_strings.py src/_cache src/commands.js src/build_translations.py
2016-04-03 13:54:39 +01:00
sh -c 'cd src ; python build_translations.py'
2016-04-16 00:03:19 +01:00
src/translations-all.js : src/extra_strings.py src/_cache src/commands.js src/build_translations.py
2016-04-03 13:54:39 +01:00
sh -c 'cd src ; python build_translations.py all'