targets/toolchain_makefile.py
branchpython3
changeset 3750 f62625418bff
parent 2463 8742337a9fe3
equal deleted inserted replaced
3749:fda6c1a37662 3750:f62625418bff
    21 # You should have received a copy of the GNU General Public License
    21 # You should have received a copy of the GNU General Public License
    22 # along with this program; if not, write to the Free Software
    22 # along with this program; if not, write to the Free Software
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    24 
    24 
    25 
    25 
    26 from __future__ import absolute_import
    26 
    27 import os
    27 import os
    28 import re
    28 import re
    29 import operator
    29 import operator
    30 import hashlib
    30 import hashlib
    31 from functools import reduce
    31 from functools import reduce
    81                 if os.path.exists(os.path.join(self.buildpath, depfn)):
    81                 if os.path.exists(os.path.join(self.buildpath, depfn)):
    82                     # print bn + " depends on "+depfn
    82                     # print bn + " depends on "+depfn
    83                     deps.append(depfn)
    83                     deps.append(depfn)
    84         # recurse through deps
    84         # recurse through deps
    85         # TODO detect cicular deps.
    85         # TODO detect cicular deps.
    86         return reduce(operator.concat, map(self.concat_deps, deps), src)
    86         return reduce(operator.concat, list(map(self.concat_deps, deps)), src)
    87 
    87 
    88     def build(self):
    88     def build(self):
    89         srcfiles = []
    89         srcfiles = []
    90         cflags = []
    90         cflags = []
    91         wholesrcdata = ""
    91         wholesrcdata = ""