Added install step.
This commit is contained in:
@ -16,3 +16,5 @@ Alias('posix', 'posix/ueforth')
|
||||
Importation('gen/posix_boot.h', '$src/posix/posix_boot.fs', name='boot')
|
||||
Compile('posix/ueforth', '$src/posix/main.c',
|
||||
implicit=['gen/posix_boot.h'])
|
||||
|
||||
OneShot('install', 'sudo cp posix/ueforth /usr/bin/ueforth', 'posix/ueforth')
|
||||
|
||||
@ -212,6 +212,11 @@ rule gen_run
|
||||
description = GEN_RUN
|
||||
command = $script $options $infiles >$out
|
||||
|
||||
rule oneshot
|
||||
description = ONESHOT
|
||||
command = $command
|
||||
pool = console
|
||||
|
||||
rule clean
|
||||
description = CLEAN
|
||||
command = ninja -t clean
|
||||
@ -332,6 +337,13 @@ def GenRun(target, script, options, sources):
|
||||
return target
|
||||
|
||||
|
||||
def OneShot(target, command, source):
|
||||
global output
|
||||
output += f'build {target}: oneshot {source}\n'
|
||||
output += f' command = {command}\n'
|
||||
return target
|
||||
|
||||
|
||||
def Default(target):
|
||||
global output
|
||||
output += f'default {target}\n'
|
||||
|
||||
Reference in New Issue
Block a user