Commit bf6c6032 authored by Tristan Gingold's avatar Tristan Gingold

tools: use class attribute CLEAN_TARGETS.

parent 80301196
......@@ -47,7 +47,6 @@ class ToolActiveHDL(MakefileSim):
def __init__(self):
super(ToolActiveHDL, self).__init__()
self._clean_targets.update(ToolActiveHDL.CLEAN_TARGETS)
def _makefile_sim_compilation(self):
"""Print Makefile compilation target for Aldec Active-HDL simulator"""
......
......@@ -80,7 +80,6 @@ class ToolDiamond(MakefileSyn):
def __init__(self):
super(ToolDiamond, self).__init__()
self._supported_files.update(ToolDiamond.SUPPORTED_FILES)
self._clean_targets.update(ToolDiamond.CLEAN_TARGETS)
self._tcl_controls.update(ToolDiamond.TCL_CONTROLS)
def _makefile_syn_tcl(self):
......
......@@ -53,7 +53,6 @@ class ToolGHDL(MakefileSim):
def __init__(self):
super(ToolGHDL, self).__init__()
self._clean_targets.update(ToolGHDL.CLEAN_TARGETS)
self._simulator_controls.update(ToolGHDL.SIMULATOR_CONTROLS)
def _makefile_sim_options(self):
......
......@@ -65,7 +65,6 @@ class ToolIcestorm(MakefileSyn):
def __init__(self):
super(ToolIcestorm, self).__init__()
self._supported_files.update(ToolIcestorm.SUPPORTED_FILES)
self._clean_targets.update(ToolIcestorm.CLEAN_TARGETS)
self._tcl_controls.update(ToolIcestorm.TCL_CONTROLS)
def _makefile_syn_top(self):
......
......@@ -126,7 +126,6 @@ $(TCL_CLOSE)'''
def __init__(self):
super(ToolISE, self).__init__()
self._supported_files.update(ToolISE.SUPPORTED_FILES)
self._clean_targets.update(ToolISE.CLEAN_TARGETS)
self._tcl_controls.update(ToolISE.TCL_CONTROLS)
def _makefile_syn_top(self):
......
......@@ -61,7 +61,6 @@ class ToolISim(MakefileSim):
def __init__(self):
super(ToolISim, self).__init__()
self._clean_targets.update(ToolISim.CLEAN_TARGETS)
def _makefile_sim_top(self):
"""Print the top section of the Makefile for Xilinx ISim"""
......
......@@ -56,7 +56,6 @@ class ToolIVerilog(MakefileSim):
def __init__(self):
super(ToolIVerilog, self).__init__()
self._clean_targets.update(ToolIVerilog.CLEAN_TARGETS)
self._simulator_controls.update(ToolIVerilog.SIMULATOR_CONTROLS)
def _makefile_sim_compilation(self):
......
......@@ -77,7 +77,6 @@ class ToolLibero(MakefileSyn):
def __init__(self):
super(ToolLibero, self).__init__()
self._supported_files.update(ToolLibero.SUPPORTED_FILES)
self._clean_targets.update(ToolLibero.CLEAN_TARGETS)
self._tcl_controls.update(ToolLibero.TCL_CONTROLS)
def _makefile_syn_tcl(self):
......
......@@ -38,12 +38,12 @@ class ToolMakefile(object):
HDL_FILES = {}
TOOL_INFO = {}
STANDARD_LIBS = []
CLEAN_TARGETS = {}
def __init__(self):
super(ToolMakefile, self).__init__()
self._file = None
self._initialized = False
self._clean_targets = {}
self._tcl_controls = {}
self._supported_files = {}
self.fileset = None
......@@ -132,7 +132,7 @@ class ToolMakefile(object):
def makefile_clean(self):
"""Print the Makefile target for cleaning intermediate files"""
self.writeln("CLEAN_TARGETS := $(LIBS) " +
' '.join(self._clean_targets["clean"]) + "\n")
' '.join(self.CLEAN_TARGETS["clean"]) + "\n")
self.writeln("clean:")
tmp = "\t\t" + shell.del_command() + " $(CLEAN_TARGETS)"
self.writeln(tmp)
......@@ -145,7 +145,7 @@ class ToolMakefile(object):
"""Print the Makefile target for cleaning final files"""
self.writeln("mrproper: clean")
tmp = "\t\t" + shell.del_command() + \
" " + ' '.join(self._clean_targets["mrproper"]) + "\n"
" " + ' '.join(self.CLEAN_TARGETS["mrproper"]) + "\n"
self.writeln(tmp)
def initialize(self):
......
......@@ -49,7 +49,6 @@ class ToolModelsim(MakefileVsim):
self.copy_rules["modelsim.ini"] = os.path.join(
"$(MODELSIM_INI_PATH)", "modelsim.ini")
self.additional_deps.append("modelsim.ini")
self._clean_targets.update(ToolModelsim.CLEAN_TARGETS)
def _makefile_sim_options(self):
"""Print the Modelsim options to the Makefile"""
......
......@@ -52,6 +52,7 @@ class ToolPlanAhead(ToolXilinx):
CLEAN_TARGETS = {'clean': ["planAhead_*", "planAhead.*",
".Xil", "$(PROJECT).cache", "$(PROJECT).data",
" $(PROJECT).runs", "$(PROJECT).ppr"]}
CLEAN_TARGETS.update(ToolXilinx.CLEAN_TARGETS)
TCL_CONTROLS = {'bitstream': '$(TCL_OPEN)\n'
'launch_runs impl_1 -to_step Bitgen\n'
......@@ -61,5 +62,4 @@ class ToolPlanAhead(ToolXilinx):
def __init__(self):
super(ToolPlanAhead, self).__init__()
self._supported_files.update(ToolPlanAhead.SUPPORTED_FILES)
self._clean_targets.update(ToolPlanAhead.CLEAN_TARGETS)
self._tcl_controls.update(ToolPlanAhead.TCL_CONTROLS)
......@@ -104,7 +104,6 @@ class ToolQuartus(MakefileSyn):
def __init__(self):
super(ToolQuartus, self).__init__()
self._supported_files.update(ToolQuartus.SUPPORTED_FILES)
self._clean_targets.update(ToolQuartus.CLEAN_TARGETS)
self._tcl_controls.update(ToolQuartus.TCL_CONTROLS)
def _makefile_syn_top(self):
......
......@@ -79,7 +79,6 @@ class ToolRiviera(MakefileVsim):
def __init__(self):
super(ToolRiviera, self).__init__()
self._clean_targets.update(ToolRiviera.CLEAN_TARGETS)
def _makefile_sim_options(self):
"""Print the Riviera options to the Makefile"""
......
......@@ -71,6 +71,7 @@ class ToolVivado(ToolXilinx):
"$(PROJECT).cache", "$(PROJECT).data", "work",
"$(PROJECT).runs", "$(PROJECT).hw",
"$(PROJECT).ip_user_files", "$(PROJECT_FILE)"]}
CLEAN_TARGETS.update(ToolXilinx.CLEAN_TARGETS)
TCL_CONTROLS = {'bitstream': '$(TCL_OPEN)\n'
'launch_runs impl_1 -to_step write_bitstream'
......@@ -81,5 +82,4 @@ class ToolVivado(ToolXilinx):
def __init__(self):
super(ToolVivado, self).__init__()
self._supported_files.update(ToolVivado.SUPPORTED_FILES)
self._clean_targets.update(ToolVivado.CLEAN_TARGETS)
self._tcl_controls.update(ToolVivado.TCL_CONTROLS)
......@@ -54,7 +54,6 @@ class ToolVivadoSim(MakefileSim):
def __init__(self):
super(ToolVivadoSim, self).__init__()
self._clean_targets.update(ToolVivadoSim.CLEAN_TARGETS)
self._simulator_controls.update(ToolVivadoSim.SIMULATOR_CONTROLS)
def _makefile_sim_compilation(self):
......
......@@ -76,7 +76,6 @@ $(TCL_CLOSE)'''
def __init__(self):
super(ToolXilinx, self).__init__()
self._supported_files.update(ToolXilinx.SUPPORTED_FILES)
self._clean_targets.update(ToolXilinx.CLEAN_TARGETS)
self._tcl_controls.update(ToolXilinx.TCL_CONTROLS)
def _get_properties(self):
......
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