also strip the first -D

Change-Id: Ifc95720b47e1adaadbca879d5b8f22ada658fd3a
Reviewed-on: https://gerrit.libreoffice.org/31275
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
This commit is contained in:
Markus Mohrhard
2016-11-27 22:55:36 +01:00
parent 86524159c6
commit f567ee1995

View File

@@ -95,7 +95,7 @@ class GbuildParser:
@staticmethod
def __split_defs(defsline):
defs = {}
alldefs = [defswitch.strip() for defswitch in defsline.strip().split(' -D') if len(defswitch) > 2]
alldefs = [defswitch.strip() for defswitch in defsline.strip().lstrip('-D').split(' -D') if len(defswitch) > 2]
for d in alldefs:
defparts = d.split('=')
if len(defparts) == 1: