rscons 0.0.14 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +0,0 @@
1
- Rscons::Environment.new do |env|
2
- env.append('CPPPATH' => Dir['src/**/*/'])
3
- env.build_dir(%r{^src/([^/]+)/}, 'build_\\1/')
4
- env.Program('build_dir', Dir['src/**/*.c'])
5
- end
@@ -1,12 +0,0 @@
1
- Rscons::Environment.new do |env|
2
- env.append('CPPPATH' => Dir['src/**/*/'])
3
- env.build_dir(%r{^src/([^/]+)/}, 'build_\\1/')
4
- env.add_tweaker do |build_op|
5
- if build_op[:target] =~ %r{build_one/.*\.o}
6
- build_op[:vars]["CFLAGS"] << "-O1"
7
- elsif build_op[:target] =~ %r{build_two/.*\.o}
8
- build_op[:vars]["CFLAGS"] << "-O2"
9
- end
10
- end
11
- env.Program('tweaker', Dir['src/**/*.c'])
12
- end
@@ -1,11 +0,0 @@
1
- debug = Rscons::Environment.new do |env|
2
- env.build_dir('src', 'debug')
3
- env['CFLAGS'] = '-O2'
4
- env['CPPFLAGS'] = '-DSTRING="Debug Version"'
5
- env.Program('program-debug', Dir['src/*.c'])
6
- end
7
-
8
- release = debug.clone('CPPFLAGS' => '-DSTRING="Release Version"') do |env|
9
- env.build_dir('src', 'release')
10
- env.Program('program-release', Dir['src/*.c'])
11
- end
@@ -1,15 +0,0 @@
1
- class MySource < Rscons::Builder
2
- def run(target, sources, cache, env, vars = {})
3
- File.open(target, 'w') do |fh|
4
- fh.puts <<EOF
5
- #define THE_VALUE 5678
6
- EOF
7
- end
8
- target
9
- end
10
- end
11
-
12
- Rscons::Environment.new(echo: :short, builders: [MySource.new]) do |env|
13
- env.MySource('inc.h', [])
14
- env.Program('program', Dir['*.c'])
15
- end
@@ -1,3 +0,0 @@
1
- Rscons::Environment.new(echo: :short) do |env|
2
- env.Program('header', Dir['*.c'])
3
- end
@@ -1,4 +0,0 @@
1
- Rscons::Environment.new(echo: :command) do |env|
2
- env.Program('library', ['lib.a', 'three.c'])
3
- env.Library("lib.a", ['one.c', 'two.c'], 'CPPFLAGS' => ['-Dmake_lib'])
4
- end
@@ -1,4 +0,0 @@
1
- Rscons::Environment.new do |env|
2
- # CHANGE FLAGS
3
- env.Program('simple', Dir['*.c'])
4
- end
@@ -1,4 +0,0 @@
1
- Rscons::Environment.new do |env|
2
- # CHANGE FLAGS
3
- env.Program('simple', Dir['*.cc'])
4
- end
@@ -1,4 +0,0 @@
1
- Rscons::Environment.new(echo: :command) do |env|
2
- env.Object("one.o", "one.c", 'CPPFLAGS' => ['-DONE'])
3
- env.Program('two_sources', ['one.o', 'two.c'])
4
- end