Commit e26f48c3 authored by Paweł Szostek's avatar Paweł Szostek Committed by Javier D. Garcia-Lasheras

Files can depend on other files that fall into two categories: included and…

Files can depend on other files that fall into two categories: included and compiled. The former don't need marker files(.name) and the dependency is directly on the included file. The latter need a marker file and the dependency is built on it. To check whether a file is compiled or included, we see if a file is in the manifests. If an included file will show up in one of the manifest, this rule will be broken and a buggy makefile will be produced.
parent 00758840
......@@ -217,8 +217,11 @@ isim.wdb isim_proj isim_proj.*
#if len(vhdl.depends_on) != 0:
self.write(os.path.join(lib, purename, "."+purename) + ":")
for dep_file in vhdl.depends_on:
name = dep_file.purename
self.write(" \\\n" + os.path.join(dep_file.library, name, "."+name + "_" + vhdl.extension()))
if dep_file in fileset:
name = dep_file.purename
self.write(" \\\n" + os.path.join(dep_file.library, name, "."+name + "_" + vhdl.extension()))
else:
self.write(" \\\n" + os.path.join(dep_file.rel_path()))
self.write('\n')
self.writeln("\t\t@mkdir -p $(dir $@) && touch $@\n")
......
......@@ -159,9 +159,13 @@ clean:
vl.rel_path())
)
for dep_file in [dfile for dfile in vl.depends_on if dfile is not vl]:
name = dep_file.purename
extension = dep_file.extension()
self.write(" \\\n" + os.path.join(dep_file.library, name, ".%s_%s" % (name, extension)))
if dep_file in fileset: # the dep_file is compiled -> we depend on marker file
name = dep_file.purename
extension = dep_file.extension()
self.write(" \\\n" + os.path.join(dep_file.library, name, ".%s_%s" % (name, extension)))
else: #the file is included -> we depend directly on the file
self.write(" \\\n" + dep_file.rel_path())
self.writeln()
###
......@@ -194,9 +198,12 @@ clean:
vhdl.rel_path())
)
for dep_file in vhdl.depends_on:
name = dep_file.purename
extension = dep_file.extension()
self.write(" \\\n" + os.path.join(dep_file.library, name, ".%s_%s" % (name, extension)))
if dep_file in fileset: # the dep_file is compiled -> we depend on marker file
name = dep_file.purename
extension = dep_file.extension()
self.write(" \\\n" + os.path.join(dep_file.library, name, ".%s_%s" % (name, extension)))
else: #the file is included -> we depend directly on the file
self.write(" \\\n" + dep_file.rel_path())
self.writeln()
self.writeln(' '.join(["\t\tvcom $(VCOM_FLAGS)", vhdl.vcom_opt, "-work", lib, "$< "]))
......
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