integration/builder: simplify default output_dir to "build/platform".
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 19 May 2020 11:59:56 +0000 (13:59 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 19 May 2020 11:59:56 +0000 (13:59 +0200)
All SoC are now based on the same base class and naming was too complicated.

litex/soc/integration/builder.py

index 496903eb754e4b29a34b3e723e28ea7c85811f88..469f21108eadfa1c47c1bb0be29eacf626d47588 100644 (file)
@@ -55,9 +55,8 @@ class Builder:
         bios_options     = None):
         self.soc = soc
 
-        # From Python doc: makedirs() will become confused if the path
-        # elements to create include '..'
-        self.output_dir    = os.path.abspath(output_dir    or "soc_{}_{}".format(soc.__class__.__name__.lower(), soc.platform.name))
+        # From Python doc: makedirs() will become confused if the path elements to create include '..'
+        self.output_dir    = os.path.abspath(output_dir    or os.path.join("build", soc.platform.name))
         self.gateware_dir  = os.path.abspath(gateware_dir  or os.path.join(self.output_dir,   "gateware"))
         self.software_dir  = os.path.abspath(software_dir  or os.path.join(self.output_dir,   "software"))
         self.include_dir   = os.path.abspath(include_dir   or os.path.join(self.software_dir, "include"))