Module: Buildrake
- Defined in:
- lib/buildrake.rb,
lib/buildrake/rush.rb,
lib/buildrake/config.rb,
lib/buildrake/github.rb,
lib/buildrake/comment.rb,
lib/buildrake/version.rb
Defined Under Namespace
Modules: Comment, Rush
Classes: Config, Github
Constant Summary
collapse
- VERSION =
"0.0.8"
Class Method Summary
collapse
Class Method Details
.generate_gitignore ⇒ Object
75
76
77
78
79
80
81
82
83
84
|
# File 'lib/buildrake.rb', line 75
def self.generate_gitignore
return if Rush.file?( ".gitignore" )
open( ".gitignore", "wb" ){|f|
f.puts "/build\n/lib\n"
}
end
|
.generate_rakefile ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/buildrake.rb', line 13
def self.generate_rakefile
return if Rush.file?( "Rakefile" )
open( "Rakefile", "wb" ){|f|
f.puts "require \"buildrake\"\n\nclass Config < Buildrake::Config\nmethod_accessor :srcs\n\ndef initialize( *args )\n super( \"\", Buildrake::Rush.full_dir_path( Buildrake::Rush.dir_path( __FILE__ ) ) )\n \n inc_dirs [ \"\\\#{@root_path}/inc\" ]\n \n # Library\n @srcs = [ ]\n library( project_name, @srcs )\n \n @platforms.each{|platform|\n @configs.each{|config|\n case platform\n when :android\n lib_dirs = [ \"\\\#{@root_path}/lib/android/$(ANDROID_NDK_VERSION)_$(CONFIG)\" ]\n else\n lib_dirs = [ \"\\\#{@root_path}/lib/$(PLATFORM_PATH)\" ]\n end\n lib_dir( platform, config, lib_dirs )\n }\n }\n \n # Execute\n if Buildrake::Rush.windows?\n libs = [ ]\n else\n libs = [ ]\n end\n execute( \"\", [ ], libs )\nend\nend\n\ndesc \"Setup\"\ntask :setup do\nConfig.run( [ \"setup\" ] )\nexit( 0 )\nend\n\ndesc \"Show help message\"\ntask :help do\nConfig.run( [ \"help\" ] )\nexit( 0 )\nend\n\ndesc \"Build\"\ntask :build do\nConfig.run( [ \"build\" ] )\nexit( 0 )\nend\n"
}
end
|
.setup ⇒ Object
8
9
10
11
|
# File 'lib/buildrake.rb', line 8
def self.setup
generate_rakefile
generate_gitignore
end
|