SConscript (11294:a368064a2ab5) | SConscript (12563:8d59ed22ae79) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 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) 2004-2005 The Regents of The University of Michigan 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, subprocess 32 33Import('main') 34 35from m5.util import compareVersions 36 37elf_files = [] 38def ElfFile(filename): --- 70 unchanged lines hidden (view full) --- 109 110# If we have gm4 use it 111if m4env.Detect('gm4'): 112 m4env['M4'] = 'gm4' 113 114# Check that m4 is available 115import SCons.Tool.m4 116if not SCons.Tool.m4.exists(m4env): | 33import os, subprocess 34 35Import('main') 36 37from m5.util import compareVersions 38 39elf_files = [] 40def ElfFile(filename): --- 70 unchanged lines hidden (view full) --- 111 112# If we have gm4 use it 113if m4env.Detect('gm4'): 114 m4env['M4'] = 'gm4' 115 116# Check that m4 is available 117import SCons.Tool.m4 118if not SCons.Tool.m4.exists(m4env): |
117 print "Error: Can't find version of M4 macro processor. " + \ 118 "Please install M4 and try again." | 119 print("Error: Can't find version of M4 macro processor. " + 120 "Please install M4 and try again.") |
119 Exit(1) 120 121m4env.Append(M4FLAGS=['-DSRCDIR=%s' % Dir('.').path]) 122m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' 123m4env.M4(target=File('libelf_convert.c'), 124 source=[File('elf_types.m4'), File('libelf_convert.m4')]) 125m4env.M4(target=File('libelf_fsize.c'), 126 source=[File('elf_types.m4'), File('libelf_fsize.m4')]) 127m4env.M4(target=File('libelf_msize.c'), 128 source=[File('elf_types.m4'), File('libelf_msize.m4')]) 129 130# Build libelf as a static library with PIC code so it can be linked 131# into either m5 or the library 132m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files]) 133 134main.Prepend(CPPPATH=Dir('.')) 135main.Append(LIBS=['elf']) 136main.Prepend(LIBPATH=[Dir('.')]) 137 | 121 Exit(1) 122 123m4env.Append(M4FLAGS=['-DSRCDIR=%s' % Dir('.').path]) 124m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' 125m4env.M4(target=File('libelf_convert.c'), 126 source=[File('elf_types.m4'), File('libelf_convert.m4')]) 127m4env.M4(target=File('libelf_fsize.c'), 128 source=[File('elf_types.m4'), File('libelf_fsize.m4')]) 129m4env.M4(target=File('libelf_msize.c'), 130 source=[File('elf_types.m4'), File('libelf_msize.m4')]) 131 132# Build libelf as a static library with PIC code so it can be linked 133# into either m5 or the library 134m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files]) 135 136main.Prepend(CPPPATH=Dir('.')) 137main.Append(LIBS=['elf']) 138main.Prepend(LIBPATH=[Dir('.')]) 139 |