Fix up web.
This commit is contained in:
@ -27,7 +27,7 @@ DEPLOY_ITEMS = []
|
||||
|
||||
DEPLOY_ITEMS += [
|
||||
Copy('deploy/.gcloudignore', '$src/site/.gcloudignore'),
|
||||
#Copy('deploy/ueforth.js', 'web/ueforth.js'),
|
||||
Copy('deploy/ueforth.js', 'web/ueforth.js'),
|
||||
Importation('deploy/index.html', '$src/site/index.html'),
|
||||
Importation('deploy/linux.html', '$src/site/linux.html'),
|
||||
Importation('deploy/windows.html', '$src/site/windows.html'),
|
||||
|
||||
@ -208,6 +208,10 @@ rule copy
|
||||
description = COPY
|
||||
command = cp $in $out
|
||||
|
||||
rule gen_run
|
||||
description = GEN_RUN
|
||||
command = $script $options $infiles >$out
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@ -312,6 +316,16 @@ def Copy(target, source):
|
||||
return target
|
||||
|
||||
|
||||
def GenRun(target, script, options, sources):
|
||||
sources = ' '.join(sources)
|
||||
global output
|
||||
output += f'build {target}: gen_run {script} {sources}\n'
|
||||
output += f' options = {options}\n'
|
||||
output += f' script = {script}\n'
|
||||
output += f' infiles = {sources}\n'
|
||||
return target
|
||||
|
||||
|
||||
def Default(target):
|
||||
global output
|
||||
output += f'default {target}\n'
|
||||
|
||||
21
web/BUILD
21
web/BUILD
@ -12,5 +12,24 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
Alias('web', 'gen/web_boot.js')
|
||||
Importation('gen/web_boot.js', '$src/web/web_boot.fs', header_mode='web', name='boot')
|
||||
Compile('gen/dump_web_opcodes', '$src/web/dump_web_opcodes.c')
|
||||
GenRun('gen/web_cases.js', 'gen/dump_web_opcodes', 'cases', [])
|
||||
GenRun('gen/web_dict.js', 'gen/dump_web_opcodes', 'dict', [])
|
||||
GenRun('gen/web_sys.js', 'gen/dump_web_opcodes', 'sys', [])
|
||||
|
||||
WEB_ITEMS = [
|
||||
GenRun('web/ueforth.js', '$src/web/fuse_web.js', '', [
|
||||
'$src/web/web.template.js',
|
||||
'gen/web_boot.js',
|
||||
'gen/web_dict.js',
|
||||
'gen/web_cases.js',
|
||||
'gen/web_sys.js',
|
||||
]),
|
||||
Copy('web/terminal.html', '$src/web/terminal.html'),
|
||||
Copy('web/lazy_terminal.html', '$src/web/lazy_terminal.html'),
|
||||
Copy('web/script_lite_test.html', '$src/web/script_lite_test.html'),
|
||||
Copy('web/script_test.fs', '$src/web/script_test.fs'),
|
||||
]
|
||||
|
||||
Alias('web', ' '.join(WEB_ITEMS))
|
||||
|
||||
Reference in New Issue
Block a user