1# -*- mode:python -*- 2 3# Copyright (c) 2013, 2015, 2016 ARM Limited 4# All rights reserved. 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 1317 unchanged lines hidden (view full) --- 1326# 1327# This builder and wrapper method are used to set up a directory with 1328# switching headers. Those are headers which are in a generic location and 1329# that include more specific headers from a directory chosen at build time 1330# based on the current build settings. 1331# 1332################################################### 1333 |
1334def build_switching_header(target, source, env): 1335 path = str(target[0]) 1336 subdir = str(source[0]) 1337 dp, fp = os.path.split(path) 1338 dp = os.path.relpath(os.path.realpath(dp), 1339 os.path.realpath(env['BUILDDIR'])) 1340 with open(path, 'w') as hdr: 1341 print >>hdr, '#include "%s/%s/%s"' % (dp, subdir, fp) --- 8 unchanged lines hidden (view full) --- 1350main.Append(BUILDERS = { 'SwitchingHeader': switching_header_builder }) 1351 1352def switching_headers(self, headers, source): 1353 for header in headers: 1354 self.SwitchingHeader(header, source) 1355 1356main.AddMethod(switching_headers, 'SwitchingHeaders') 1357 |
1358# all-isas -> all-deps -> all-environs -> all_targets 1359main.Alias('#all-isas', []) 1360main.Alias('#all-deps', '#all-isas') 1361 1362# Dummy target to ensure all environments are created before telling 1363# SCons what to actually make (the command line arguments). We attach 1364# them to the dependence graph after the environments are complete. 1365ORIG_BUILD_TARGETS = list(BUILD_TARGETS) # force a copy; gets closure to work. --- 162 unchanged lines hidden --- |