Added zip files.
This commit is contained in:
10
esp32/BUILD
10
esp32/BUILD
@ -13,9 +13,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
ESP32_FILES = []
|
ESP32_FILES = []
|
||||||
|
ESP32_ZIP_FILES = []
|
||||||
|
|
||||||
# Main .ino file.
|
# Main .ino file.
|
||||||
ESP32_FILES += [
|
ESP32_ZIP_FILES += [
|
||||||
Importation('esp32/ESP32forth/README.txt',
|
Importation('esp32/ESP32forth/README.txt',
|
||||||
'$src/esp32/README.txt'),
|
'$src/esp32/README.txt'),
|
||||||
Importation('esp32/ESP32forth/ESP32forth.ino',
|
Importation('esp32/ESP32forth/ESP32forth.ino',
|
||||||
@ -25,7 +26,7 @@ ESP32_FILES += [
|
|||||||
Importation('gen/esp32_boot.h', '$src/esp32/esp32_boot.fs', name='boot')
|
Importation('gen/esp32_boot.h', '$src/esp32/esp32_boot.fs', name='boot')
|
||||||
|
|
||||||
# Optional Compontents.
|
# Optional Compontents.
|
||||||
ESP32_FILES += [
|
ESP32_ZIP_FILES += [
|
||||||
Importation('esp32/ESP32forth/optional/README-optional.txt',
|
Importation('esp32/ESP32forth/optional/README-optional.txt',
|
||||||
'$src/esp32/optional/README-optional.txt'),
|
'$src/esp32/optional/README-optional.txt'),
|
||||||
Esp32Optional('rmt', '$src/esp32/optional/rmt.h', []),
|
Esp32Optional('rmt', '$src/esp32/optional/rmt.h', []),
|
||||||
@ -45,6 +46,11 @@ ESP32_FILES += [
|
|||||||
[('serial-bluetooth', '$src/esp32/optional/serial-bluetooth/serial-bluetooth.fs')]),
|
[('serial-bluetooth', '$src/esp32/optional/serial-bluetooth/serial-bluetooth.fs')]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Zip it.
|
||||||
|
ESP32_FILES += [
|
||||||
|
Zip('esp32/ESP32forth.zip', ESP32_ZIP_FILES, base='esp32/ESP32forth'),
|
||||||
|
]
|
||||||
|
|
||||||
# Simulator.
|
# Simulator.
|
||||||
ESP32_FILES += [
|
ESP32_FILES += [
|
||||||
Compile('esp32-sim/esp32-sim', '$src/esp32/sim_main.cpp',
|
Compile('esp32-sim/esp32-sim', '$src/esp32/sim_main.cpp',
|
||||||
|
|||||||
@ -200,6 +200,10 @@ rule convert_image
|
|||||||
description = IMAGE_CONVERT
|
description = IMAGE_CONVERT
|
||||||
command = convert $in $out
|
command = convert $in $out
|
||||||
|
|
||||||
|
rule zip
|
||||||
|
description = ZIP
|
||||||
|
command = rm -f $out && cd $base && zip $relout $relin >/dev/null
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@ -281,6 +285,17 @@ def Run(target, source, implicit=[]):
|
|||||||
return Simple('run', target, source, implicit)
|
return Simple('run', target, source, implicit)
|
||||||
|
|
||||||
|
|
||||||
|
def Zip(target, sources, base):
|
||||||
|
global output
|
||||||
|
ret = Simple('zip', target, ' '.join(sources))
|
||||||
|
relin = ' '.join([os.path.relpath(i, base) for i in sources])
|
||||||
|
relout = os.path.relpath(target, base)
|
||||||
|
output += f' base = {base}\n'
|
||||||
|
output += f' relout = {relout}\n'
|
||||||
|
output += f' relin = {relin}\n'
|
||||||
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def Alias(target, source):
|
def Alias(target, source):
|
||||||
global output
|
global output
|
||||||
output += f'build {target}: phony {source}\n'
|
output += f'build {target}: phony {source}\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user