build.plat: dedent overrides.
authorAlain Péteut <alain.peteut@yahoo.com>
Sun, 16 Jun 2019 12:06:39 +0000 (14:06 +0200)
committerwhitequark <whitequark@whitequark.org>
Sun, 16 Jun 2019 12:40:52 +0000 (12:40 +0000)
nmigen/build/plat.py

index 368065c859fa3e49aaa8fe43a3dce1fd16eb37ec..2f198a8c1ee7219415d4a75c3d7486c0ee51e984 100644 (file)
@@ -236,7 +236,7 @@ class TemplatedPlatform(Platform):
                 # `export VAR=` is treated on Linux.
                 return re.sub(r'^\"\"$', "", os.environ[var_env])
             elif var in kwargs:
-                return kwargs[var]
+                return textwrap.dedent(kwargs[var]).strip()
             else:
                 return jinja2.Undefined(name=var)