SConscript (12246:9ffa51416f39) SConscript (12563:8d59ed22ae79)
1# -*- mode:python -*-
2
3# Copyright (c) 2009 The Hewlett-Packard Development Company
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29# Authors: Nathan Binkert
30
1# -*- mode:python -*-
2
3# Copyright (c) 2009 The Hewlett-Packard Development Company
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29# Authors: Nathan Binkert
30
31from __future__ import print_function
32
31import os
32import sys
33
34from os.path import basename, isdir, join as joinpath
35
36import SCons
37
38from gem5_scons import Transform

--- 57 unchanged lines hidden (view full) ---

96#
97# Link includes
98#
99generated_dir = Dir('../protocol')
100
101def MakeIncludeAction(target, source, env):
102 f = file(str(target[0]), 'w')
103 for s in source:
33import os
34import sys
35
36from os.path import basename, isdir, join as joinpath
37
38import SCons
39
40from gem5_scons import Transform

--- 57 unchanged lines hidden (view full) ---

98#
99# Link includes
100#
101generated_dir = Dir('../protocol')
102
103def MakeIncludeAction(target, source, env):
104 f = file(str(target[0]), 'w')
105 for s in source:
104 print >>f, '#include "%s"' % str(s.abspath)
106 print('#include "%s"' % str(s.abspath), file=f)
105 f.close()
106
107def MakeInclude(source):
108 target = generated_dir.File(basename(source))
109 include_action = MakeAction(MakeIncludeAction, Transform("MAKE INC", 1))
110 env.Command(target, source, include_action)
111
112MakeInclude('slicc_interface/AbstractEntry.hh')

--- 32 unchanged lines hidden ---
107 f.close()
108
109def MakeInclude(source):
110 target = generated_dir.File(basename(source))
111 include_action = MakeAction(MakeIncludeAction, Transform("MAKE INC", 1))
112 env.Command(target, source, include_action)
113
114MakeInclude('slicc_interface/AbstractEntry.hh')

--- 32 unchanged lines hidden ---