]> git.cworth.org Git - lmno.games/blobdiff - Makefile
tictactoe: Integrate the standard LMNO styling
[lmno.games] / Makefile
index 4b0b4c462e75a1ef55d432d9a9f2297180abf50b..265297388947d7976315e044a4cb8df13f68915f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,7 @@ react-dom.js: deps/react-dom.production.min.js
 export BABEL_ENV=production
 %.js: %.jsx
        $(call quiet,BABEL) $^ --out-file $@
+       @chmod a-w $@
 else
 react.js: deps/react.development.js
        $(call quiet,CP) $^ $@
@@ -51,6 +52,7 @@ react-dom.js: deps/react-dom.development.js
 export BABEL_ENV=development
 %.js: %.jsx
        $(call quiet,BABEL) $^ --out-file $@
+       @chmod a-w $@
 endif
 
 # The user has not set any verbosity, default to quiet mode and inform the
@@ -69,25 +71,21 @@ endif
 quiet ?= $($(word 1, $(1)))
 WGET_VERBOSE_FLAGS ?= --no-verbose
 
-checksums: $(REACT_DOWNLOADS)
-       sha512sum --strict -c checksums.sha512
+SHA512=sha512sum --strict -c
+.PHONY: deps
+deps: $(REACT_DOWNLOADS)
+       $(call quiet,SHA512) deps/*.sha512
 
 DOWNLOAD=wget $(WGET_VERBOSE_FLAGS) -nc -P deps
-deps/react.development.js:
-       $(call quiet,DOWNLOAD) https://unpkg.com/react@16/umd/react.development.js
-
-deps/react-dom.development.js:
-       $(call quiet,DOWNLOAD) https://unpkg.com/react-dom@16/umd/react-dom.development.js
-
-deps/react.production.min.js:
-       $(call quiet,DOWNLOAD) https://unpkg.com/react@16/umd/react.production.min.js
-
-deps/react-dom.production.min.js:
-       $(call quiet,DOWNLOAD) https://unpkg.com/react-dom@16/umd/react-dom.production.min.js
+deps/%.js:
+       $(call quiet,DOWNLOAD) https://unpkg.com/react@16/umd/$@
+       $(call quiet,SHA512) $(patsubst %,%.sha512,$@)
 
 deploy:
        rm -rf .deploy-source
        git clone . .deploy-source
+       cp deps/*.js .deploy-source/deps
+       make -C .deploy-source deps
        make -C .deploy-source LMNO_BUILD=production
        rm -rf .deploy-source/.git
        (cd .deploy-source; rsync -avz \