SConscript (4494:b7c909b5a5e9) | SConscript (4496:7fe59ed05a61) |
---|---|
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 --- 78 unchanged lines hidden (view full) --- 87ElfFile('libelf_fsize.c') 88ElfFile('libelf_msize.c') 89 90m4env = Environment(ENV=os.environ) 91if env.get('CC'): 92 m4env['CC'] = env['CC'] 93if env.get('CXX'): 94 m4env['CXX'] = env['CXX'] | 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 --- 78 unchanged lines hidden (view full) --- 87ElfFile('libelf_fsize.c') 88ElfFile('libelf_msize.c') 89 90m4env = Environment(ENV=os.environ) 91if env.get('CC'): 92 m4env['CC'] = env['CC'] 93if env.get('CXX'): 94 m4env['CXX'] = env['CXX'] |
95 |
|
95# If we have gm4 use it 96if subprocess.Popen("gm4 --version", shell=True, stdout=subprocess.PIPE, 97 stderr=subprocess.STDOUT, close_fds=True).communicate()[0].find('GNU') >= 0: 98 m4env['M4'] = 'gm4' 99 | 96# If we have gm4 use it 97if subprocess.Popen("gm4 --version", shell=True, stdout=subprocess.PIPE, 98 stderr=subprocess.STDOUT, close_fds=True).communicate()[0].find('GNU') >= 0: 99 m4env['M4'] = 'gm4' 100 |
101# Check that m4 is available 102if not m4env.get('M4'): 103 print "Error: Can't find version of M4 macro processor. Please install M4 and try again." 104 Exit(1) 105 |
|
100m4env.Append(M4FLAGS='-DSRCDIR=%s' % Dir('.').path) 101m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' 102m4env.M4(target=File('libelf_convert.c'), 103 source=[File('elf_types.m4'), File('libelf_convert.m4')]) 104m4env.M4(target=File('libelf_fsize.c'), 105 source=[File('elf_types.m4'), File('libelf_fsize.m4')]) 106m4env.M4(target=File('libelf_msize.c'), 107 source=[File('elf_types.m4'), File('libelf_msize.m4')]) 108m4env.Library('elf', elf_files) 109 110env.Append(CPPPATH=Dir('.')) 111env.Append(LIBS=['elf']) 112env.Append(LIBPATH=[Dir('.')]) 113 | 106m4env.Append(M4FLAGS='-DSRCDIR=%s' % Dir('.').path) 107m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' 108m4env.M4(target=File('libelf_convert.c'), 109 source=[File('elf_types.m4'), File('libelf_convert.m4')]) 110m4env.M4(target=File('libelf_fsize.c'), 111 source=[File('elf_types.m4'), File('libelf_fsize.m4')]) 112m4env.M4(target=File('libelf_msize.c'), 113 source=[File('elf_types.m4'), File('libelf_msize.m4')]) 114m4env.Library('elf', elf_files) 115 116env.Append(CPPPATH=Dir('.')) 117env.Append(LIBS=['elf']) 118env.Append(LIBPATH=[Dir('.')]) 119 |