This commit is contained in:
Brad Nelson
2021-02-12 14:11:29 -08:00
parent a4075830c0
commit 591799053d
6 changed files with 42 additions and 40 deletions

View File

@ -1,4 +1,5 @@
VERSION=7.0.1
VERSION=7.0
REVISION=$(shell git rev-parse HEAD)
OUT = out
GEN = $(OUT)/gen
@ -53,7 +54,7 @@ WIN_LFLAGS64 = /LIBPATH:"c:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Lib
TARGETS = $(WEB)/terminal.html \
$(WEB)/ueforth.js \
$(POSIX)/ueforth \
$(ARDUINO)/ESP32forth-$(VERSION)/ESP32forth-$(VERSION).ino
$(ARDUINO)/ESP32forth/ESP32forth.ino
FINDQ = find 2>/dev/null
@ -241,48 +242,40 @@ $(WINDOWS)/uEf64.exe: \
# ---- ARDUINO ----
$(ARDUINO)/ESP32forth-$(VERSION):
$(ARDUINO)/ESP32forth:
mkdir -p $@
$(ARDUINO)/ESP32forth-$(VERSION)/ESP32forth-$(VERSION).ino: \
arduino/fuse_ino.js \
arduino/arduino.template.ino \
common/opcodes.h \
common/calling.h \
common/core.h \
common/interp.h \
$(GEN)/arduino_boot.h | $(ARDUINO)/ESP32forth-$(VERSION)
$^ >$@
ARDUINO_PARTS = arduino/arduino.template.ino \
common/opcodes.h \
common/calling.h \
common/core.h \
common/interp.h \
$(GEN)/arduino_boot.h
$(ARDUINO)/ESP32forth/ESP32forth.ino: \
arduino/fuse_ino.js $(ARDUINO_PARTS) | $(ARDUINO)/ESP32forth
$< "$(VERSION)" "$(REVISION)" $(ARDUINO_PARTS) >$@
# ---- PACKAGE ----
$(ARDUINO)/ESP32forth-$(VERSION).zip: $(ARDUINO)/ESP32forth-$(VERSION)/ESP32forth-$(VERSION).ino
cd $(ARDUINO) && zip -r ESP32forth-$(VERSION).zip ESP32forth-$(VERSION)
$(ARDUINO)/ESP32forth.zip: $(ARDUINO)/ESP32forth/ESP32forth.ino
cd $(ARDUINO) && zip -r ESP32forth.zip ESP32forth
# ---- DEPLOY ----
$(DEPLOY):
mkdir -p $@
$(DEPLOY)/app.yaml: $(ARDUINO)/ESP32forth-$(VERSION).zip \
$(DEPLOY)/app.yaml: $(ARDUINO)/ESP32forth.zip \
$(wildcard site/*.html) \
site/app.yaml \
site/eforth.go \
$(TARGETS) | $(DEPLOY)
mkdir -p $(DEPLOY)/static
cp -r $(ARDUINO)/ESP32forth-$(VERSION).zip $(DEPLOY)/static
cp -r $(POSIX)/ueforth $(DEPLOY)/static/ueforth-$(VERSION).linux
cp -r $(WINDOWS)/uEf32.exe $(DEPLOY)/static/uEf32-$(VERSION).exe
cp -r $(WINDOWS)/uEf64.exe $(DEPLOY)/static/uEf64-$(VERSION).exe
cp -r $(ARDUINO)/ESP32forth.zip $(DEPLOY)/static
cp -r $(POSIX)/ueforth $(DEPLOY)/static/ueforth.linux
cp -r $(WINDOWS)/uEf32.exe $(DEPLOY)/static/uEf32.exe
cp -r $(WINDOWS)/uEf64.exe $(DEPLOY)/static/uEf64.exe
cp -r $(RES)/eforth.ico $(DEPLOY)/static/favicon.ico
cp -r site/static/* $(DEPLOY)/static/
cp -r site/*.sh $(DEPLOY)
cp -r site/*.go $(DEPLOY)
cp -r site/*.yaml $(DEPLOY)
sed 's/{{VERSION}}/$(VERSION)/g' site/index.html >$(DEPLOY)/index.html
sed 's/{{VERSION}}/$(VERSION)/g' site/ESP32forth.html >$(DEPLOY)/ESP32forth.html
sed 's/{{VERSION}}/$(VERSION)/g' site/windows.html >$(DEPLOY)/windows.html
sed 's/{{VERSION}}/$(VERSION)/g' site/linux.html >$(DEPLOY)/linux.html
cp site/internals.html $(DEPLOY)/
cp site/classic.html $(DEPLOY)/
cp -r site/.gcloudignore $(DEPLOY)
cp -r site/* $(DEPLOY)/
cp site/.gcloudignore $(DEPLOY)

View File

@ -1,3 +1,8 @@
/*
* ESP32forth v{{VERSION}}
* Revision: {{REVISON}}
*/
{{opcodes}}
{{calling}}

View File

@ -2,13 +2,17 @@
var fs = require('fs');
var code = fs.readFileSync(process.argv[2]).toString();
var opcodes = fs.readFileSync(process.argv[3]).toString();
var calling = fs.readFileSync(process.argv[4]).toString();
var core = fs.readFileSync(process.argv[5]).toString();
var interp = fs.readFileSync(process.argv[6]).toString();
var boot = fs.readFileSync(process.argv[7]).toString();
var version = process.argv[2];
var revision = process.argv[3];
var code = fs.readFileSync(process.argv[4]).toString();
var opcodes = fs.readFileSync(process.argv[5]).toString();
var calling = fs.readFileSync(process.argv[6]).toString();
var core = fs.readFileSync(process.argv[7]).toString();
var interp = fs.readFileSync(process.argv[8]).toString();
var boot = fs.readFileSync(process.argv[9]).toString();
code = code.replace('{{version}}', function() { return version; });
code = code.replace('{{revision}}', function() { return revision; });
code = code.replace('{{opcodes}}', function() { return opcodes; });
code = code.replace('{{calling}}', function() { return calling; });
code = code.replace('{{boot}}', function() { return boot; });

View File

@ -19,7 +19,7 @@
<h2>Download</h2>
<p>
<a href="static/ESP32forth-{{VERSION}}.zip">ESP32forth-{{VERSION}}.zip</a>
<a href="static/ESP32forth.zip">ESP32forth.zip</a>
- Single .ino file ready for installation
</p>

View File

@ -18,7 +18,7 @@
<h2>Download</h2>
<p>
<a href="static/ueforth-{{VERSION}}.linux">ueforth-{{VERSION}}.linux</a>
<a href="static/ueforth.linux">ueforth.linux</a>
- Linux 64-bit Executable µEforth
</p>

View File

@ -18,12 +18,12 @@
<h2>Download</h2>
<p>
<a href="static/uEf32-{{VERSION}}.exe">uEf32-{{VERSION}}.exe</a>
<a href="static/uEf32.exe">uEf32.exe</a>
- Window 32-bit EXE µEforth
</p>
<p>
<a href="static/uEf64-{{VERSION}}.exe">uEf64-{{VERSION}}.exe</a>
<a href="static/uEf64.exe">uEf64.exe</a>
- Window 64-bit EXE µEforth
</p>