use Rsconscript instead of Rsconsfile - close #62
This commit is contained in:
1 parent
9975eec165
commit
1eb07e9a22
15 files changed
+164
-164
No files matched your search
@@ -0,0 +1,16 @@
|
||||
class MySource < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
File.open(target, 'w') do |fh|
|
||||
fh.puts <<EOF
|
||||
#define THE_VALUE 5678
|
||||
EOF
|
||||
end
|
||||
target
|
||||
end
|
||||
end
|
||||
|
||||
Rscons::Environment.new do |env|
|
||||
env.add_builder(MySource.new)
|
||||
env.MySource('inc.h', [])
|
||||
env.Program('program.exe', Dir['*.c'])
|
||||
end
|
||||
Reference in new issue
Block a user