mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
mibuild: force shell script generation to unix format (will be executed with cygwin's bash on windows)
This commit is contained in:
parent
d1a96bc49f
commit
8c03cb0491
3 changed files with 7 additions and 4 deletions
|
@ -73,7 +73,7 @@ quartus_sta {build_name}.qpf
|
|||
|
||||
""".format(build_name=build_name)
|
||||
build_script_file = "build_" + build_name + ".sh"
|
||||
tools.write_to_file(build_script_file, build_script_contents)
|
||||
tools.write_to_file(build_script_file, build_script_contents, force_unix=True)
|
||||
|
||||
r = subprocess.call(["bash", build_script_file])
|
||||
if r != 0:
|
||||
|
|
|
@ -14,7 +14,10 @@ def language_by_filename(name):
|
|||
return "vhdl"
|
||||
return None
|
||||
|
||||
def write_to_file(filename, contents):
|
||||
f = open(filename, "w")
|
||||
def write_to_file(filename, contents, force_unix=False):
|
||||
newline = None
|
||||
if force_unix:
|
||||
newline = "\n"
|
||||
f = open(filename, "w", newline=newline)
|
||||
f.write(contents)
|
||||
f.close()
|
||||
|
|
|
@ -157,7 +157,7 @@ bitgen {bitgen_opt} {build_name}.ncd {build_name}.bit
|
|||
par_opt=par_opt, map_opt=map_opt)
|
||||
build_script_contents += ise_commands.format(build_name=build_name)
|
||||
build_script_file = "build_" + build_name + ".sh"
|
||||
tools.write_to_file(build_script_file, build_script_contents)
|
||||
tools.write_to_file(build_script_file, build_script_contents, force_unix=True)
|
||||
|
||||
r = subprocess.call(["bash", build_script_file])
|
||||
if r != 0:
|
||||
|
|
Loading…
Reference in a new issue