]> git.pld-linux.org Git - packages/csstidy.git/blob - scons-optflags.patch
- adapter
[packages/csstidy.git] / scons-optflags.patch
1 --- csstidy-1.4/SConstruct~     2009-12-10 16:46:51.000000000 +0200
2 +++ csstidy-1.4/SConstruct      2009-12-10 16:46:55.184590309 +0200
3 @@ -12,13 +12,24 @@
4  #tell the user what we're doing
5  print '**** Compiling in ' + mymode + ' mode...'
6  
7 -debugcflags = ['-Wall', '-g', '-pedantic']   #extra compile flags for debug
8 -releasecflags = ['-O2']         #extra compile flags for release
9 +CXX = ARGUMENTS.get('CXX')
10 +CXXFLAGS = ARGUMENTS.get('CXXFLAGS')
11 +
12 +if CXXFLAGS:
13 +       debugcxxflags = releasecxxflags = CXXFLAGS.split(' ');
14 +else:
15 +       debugcxxflags = ['-Wall', '-g', '-pedantic']   #extra compile flags for debug
16 +       releasecxxflags = ['-O2']         #extra compile flags for release
17 +
18 +if CXX:
19 +       debugcxx = releasecxx = CXX
20 +else:
21 +       debugcxx = releasecxx = 'g++'
22  
23  env = Environment()
24  
25  #make sure the sconscripts can get to the variables
26 -Export('env', 'mymode', 'debugcflags', 'releasecflags')
27 +Export('env', 'mymode', 'debugcxx', 'debugcxxflags', 'releasecxx', 'releasecxxflags')
28  
29  #put all .sconsign files in one place
30  env.SConsignFile()
31 --- csstidy-1.4/csstidy/SConscript~     2009-12-10 16:46:42.000000000 +0200
32 +++ csstidy-1.4/csstidy/SConscript      2009-12-10 16:46:46.397716113 +0200
33 @@ -3,8 +3,8 @@
34  import glob
35  
36  #get all the build variables we need
37 -Import('env', 'project', 'mymode', 'debugcflags', 'releasecflags')
38 -localenv = env.Copy()
39 +Import('env', 'project', 'mymode', 'debugcxx', 'debugcxxflags', 'releasecxx', 'releasecxxflags')
40 +localenv = env.Clone()
41  
42  buildroot = '../' + mymode  #holds the root of the build directory tree
43  builddir = buildroot + '/' + project   #holds the build directory for this project
44 @@ -13,9 +13,11 @@
45  #append the user's additional compile flags
46  #assume debugcflags and releasecflags are defined
47  if mymode == 'debug':
48 -    localenv.Append(CCFLAGS=debugcflags)
49 +    localenv['CXX']=debugcxx
50 +    localenv.Append(CXXFLAGS=debugcxxflags)
51  else:
52 -    localenv.Append(CCFLAGS=releasecflags)
53 +    localenv['CXX']=releasecxx
54 +    localenv.Append(CXXFLAGS=releasecxxflags)
55  
56  #specify the build directory
57  localenv.BuildDir(builddir, ".", duplicate=0)
This page took 0.048402 seconds and 3 git commands to generate.