Commit 4e94a10e authored by Tristan Gingold's avatar Tristan Gingold

make_syn: refactoring (remove string dependency).

parent 191f4d88
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
from __future__ import absolute_import from __future__ import absolute_import
import os, sys import os, sys
import logging import logging
import string
from .makefile import ToolMakefile from .makefile import ToolMakefile
from hdlmake.util import shell from hdlmake.util import shell
...@@ -53,23 +52,23 @@ class ToolSyn(ToolMakefile): ...@@ -53,23 +52,23 @@ class ToolSyn(ToolMakefile):
tcl_interpreter = self._tool_info["windows_bin"] tcl_interpreter = self._tool_info["windows_bin"]
else: else:
tcl_interpreter = self._tool_info["linux_bin"] tcl_interpreter = self._tool_info["linux_bin"]
top_parameter = string.Template("""\ top_parameter = """\
TOP_MODULE := ${top_module} TOP_MODULE := {top_module}
PWD := $$(shell pwd) PWD := $(shell pwd)
PROJECT := ${project_name} PROJECT := {project_name}
PROJECT_FILE := $$(PROJECT).${project_ext} PROJECT_FILE := $(PROJECT).{project_ext}
TOOL_PATH := ${tool_path} TOOL_PATH := {tool_path}
TCL_INTERPRETER := ${tcl_interpreter} TCL_INTERPRETER := {tcl_interpreter}
ifneq ($$(strip $$(TOOL_PATH)),) ifneq ($(strip $(TOOL_PATH)),)
TCL_INTERPRETER := $$(TOOL_PATH)/$$(TCL_INTERPRETER) TCL_INTERPRETER := $(TOOL_PATH)/$(TCL_INTERPRETER)
endif endif
SYN_FAMILY := ${syn_family} SYN_FAMILY := {syn_family}
SYN_DEVICE := ${syn_device} SYN_DEVICE := {syn_device}
SYN_PACKAGE := ${syn_package} SYN_PACKAGE := {syn_package}
SYN_GRADE := ${syn_grade} SYN_GRADE := {syn_grade}
""") """
self.writeln(top_parameter.substitute( self.writeln(top_parameter.format(
tcl_interpreter=tcl_interpreter, tcl_interpreter=tcl_interpreter,
project_name=os.path.splitext( project_name=os.path.splitext(
self.manifest_dict["syn_project"])[0], self.manifest_dict["syn_project"])[0],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment