3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 09:34:08 +00:00

Fix some problems in mk_echo.

This commit is contained in:
Mathias Soeken 2018-11-14 11:25:18 -08:00
parent d4567a1255
commit e39907c481

View file

@ -2397,13 +2397,14 @@ class DotNetExampleComponent(ExampleComponent):
out.write(' ')
out.write(os.path.join(self.to_ex_dir, csfile))
def mk_echo(msg):
def mk_echo(msg, first = False):
echo_ex_qu = '' if IS_WINDOWS else '"'
echo_in_qu = '"' if IS_WINDOWS else '\\"'
echo_esc = '^' if IS_WINDOWS else ''
echo_dir = '>' if first else '>>'
msg = msg.replace('"', echo_in_qu).replace('<', echo_esc + '<').replace('>', echo_esc + '>')
out.write('\t@echo %s%s%s > %s\n' % (echo_ex_qu, msg, echo_ex_qu, proj_name))
out.write('\t@echo %s%s%s %s %s\n' % (echo_ex_qu, msg, echo_ex_qu, echo_dir, proj_name))
out.write('\n')
mk_echo('<Project Sdk="Microsoft.NET.Sdk">')
@ -2421,7 +2422,7 @@ class DotNetExampleComponent(ExampleComponent):
mk_echo(' <ItemGroup>')
mk_echo(' <Compile Include="%s/*.cs" />' % self.to_ex_dir)
mk_echo(' <Reference Include="Microsoft.Z3">')
mk_echo(' <HintPath>Microsoft.Z3.dll</HintPath')
mk_echo(' <HintPath>Microsoft.Z3.dll</HintPath>')
mk_echo(' </Reference>')
mk_echo(' </ItemGroup>')
mk_echo('</Project>')