Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: sdch/SConscript

Issue 40101: Check in a generated config.h file for SDCH on Linux (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdch/linux/config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import re 5 import re
6 6
7 Import('env') 7 Import('env')
8 8
9 env = env.Clone(OPEN_VCDIFF_DIR='open-vcdiff') 9 env = env.Clone(OPEN_VCDIFF_DIR='open-vcdiff')
10 10
11 cpppath = [ 11 cpppath = [
12 '$OPEN_VCDIFF_DIR/src', 12 '$OPEN_VCDIFF_DIR/src',
13 ] 13 ]
14 14
15 if env.Bit('windows'): 15 if env.Bit('windows'):
16 cpppath.append('$OPEN_VCDIFF_DIR/vsprojects') 16 cpppath.append('$OPEN_VCDIFF_DIR/vsprojects')
17 17
18 if env.Bit('linux'):
19 cpppath.append('linux')
20
18 env.Prepend(CPPPATH = cpppath) 21 env.Prepend(CPPPATH = cpppath)
19 22
20 input_files = ChromeFileList([ 23 input_files = ChromeFileList([
21 # TODO(sgk): violate standard indentation so we don't have to 24 # TODO(sgk): violate standard indentation so we don't have to
22 # reindent too much when we remove the explicit MSVSFilter() calls 25 # reindent too much when we remove the explicit MSVSFilter() calls
23 # in favor of generating the hierarchy to reflect the file system. 26 # in favor of generating the hierarchy to reflect the file system.
24 MSVSFilter('Header Files', [ 27 MSVSFilter('Header Files', [
25 'open-vcdiff/src/blockhash.h', 28 'open-vcdiff/src/blockhash.h',
26 'open-vcdiff/src/checksum.h', 29 'open-vcdiff/src/checksum.h',
27 'open-vcdiff/src/codetable.h', 30 'open-vcdiff/src/codetable.h',
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 contents = re.sub(undef, definition, contents) 140 contents = re.sub(undef, definition, contents)
138 141
139 undef_re = re.compile(r'^(#undef .*)$', re.M) 142 undef_re = re.compile(r'^(#undef .*)$', re.M)
140 contents = undef_re.sub(r'/* \1 */', contents) 143 contents = undef_re.sub(r'/* \1 */', contents)
141 144
142 header = '/* src/config.h. Generated by SCons. */\n' 145 header = '/* src/config.h. Generated by SCons. */\n'
143 open(str(target[0]), 'w').write(header + contents) 146 open(str(target[0]), 'w').write(header + contents)
144 147
145 # varlist['DEFINES'] below makes the target config.h file depend 148 # varlist['DEFINES'] below makes the target config.h file depend
146 # on the list of definitions in the passed-in $DEFINES variable. 149 # on the list of definitions in the passed-in $DEFINES variable.
147 env.Command('$OPEN_VCDIFF_DIR/src/config.h', 150 #
148 '$OPEN_VCDIFF_DIR/src/config.h.in', 151 # Comment this out so we use the checked-in config.h in the
149 Action(AutoConfig, varlist=['DEFINES']), 152 # linux subdirectory, but leave it here in case we need
150 DEFINES=defines) 153 # to ressurect this.
154 #env.Command('$OPEN_VCDIFF_DIR/src/config.h',
155 # '$OPEN_VCDIFF_DIR/src/config.h.in',
156 # Action(AutoConfig, varlist=['DEFINES']),
157 # DEFINES=defines)
151 158
152 159
153 p = env.ChromeMSVSProject('sdch.vcproj', 160 p = env.ChromeMSVSProject('sdch.vcproj',
154 dest='$CHROME_SRC_DIR/sdch/sdch.vcproj', 161 dest='$CHROME_SRC_DIR/sdch/sdch.vcproj',
155 guid='{F54ABC59-5C00-414A-A9BA-BAF26D1699F0}', 162 guid='{F54ABC59-5C00-414A-A9BA-BAF26D1699F0}',
156 keyword='Win32Proj', 163 keyword='Win32Proj',
157 # TODO(sgk): when we can intuit the hierarchy 164 # TODO(sgk): when we can intuit the hierarchy
158 # from the built targets. 165 # from the built targets.
159 #buildtargets=TODO, 166 #buildtargets=TODO,
160 files=input_files, 167 files=input_files,
(...skipping 27 matching lines...) Expand all
188 InheritedPropertySheets=[ 195 InheritedPropertySheets=[
189 '$(SolutionDir)../build/debug.vsprops', 196 '$(SolutionDir)../build/debug.vsprops',
190 '$(SolutionDir)../sdch/using_sdch.vsprops', 197 '$(SolutionDir)../sdch/using_sdch.vsprops',
191 ]) 198 ])
192 199
193 p.AddConfig('Release|Win32', 200 p.AddConfig('Release|Win32',
194 InheritedPropertySheets=[ 201 InheritedPropertySheets=[
195 '$(SolutionDir)../build/release.vsprops', 202 '$(SolutionDir)../build/release.vsprops',
196 '$(SolutionDir)../sdch/using_sdch.vsprops', 203 '$(SolutionDir)../sdch/using_sdch.vsprops',
197 ]) 204 ])
OLDNEW
« no previous file with comments | « no previous file | sdch/linux/config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698