Compare commits
6
Commits
v3.0.0
..
07e7f214f1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07e7f214f1 | ||
|
|
3ad741514d | ||
|
|
b932380b3b | ||
|
|
e3ea429253 | ||
|
|
dca4c49770 | ||
|
|
b068fe7574 |
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
## v3.0.1
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- #156 - Avoid running configure operation twice
|
||||||
|
|
||||||
## v3.0.0
|
## v3.0.0
|
||||||
|
|
||||||
- #136 - Move rsconscache into build directory
|
- #136 - Move rsconscache into build directory
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ task :dspec, [:example_string] => :build_dist do |task, args|
|
|||||||
FileUtils.mkdir_p("test")
|
FileUtils.mkdir_p("test")
|
||||||
FileUtils.cp("dist/rscons", "test/rscons.rb")
|
FileUtils.cp("dist/rscons", "test/rscons.rb")
|
||||||
ENV["dist_specs"] = "1"
|
ENV["dist_specs"] = "1"
|
||||||
Rake::Task["spec"].execute(args.example_string)
|
Rake::Task["spec"].execute(args)
|
||||||
ENV.delete("dist_specs")
|
ENV.delete("dist_specs")
|
||||||
FileUtils.rm_f(Dir.glob(".rscons-*"))
|
FileUtils.rm_f(Dir.glob(".rscons-*"))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
configure do
|
||||||
|
check_c_compiler
|
||||||
|
end
|
||||||
|
env do |env|
|
||||||
|
end
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
env do |env|
|
||||||
|
env.Program('simple.exe', Dir['*.c'])
|
||||||
|
end
|
||||||
|
|
||||||
|
clean do
|
||||||
|
puts "custom clean action"
|
||||||
|
end
|
||||||
@@ -207,15 +207,18 @@ module Rscons
|
|||||||
#
|
#
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def configure
|
def configure
|
||||||
co = ConfigureOp.new(@script)
|
unless @_configured
|
||||||
begin
|
@_configured = true
|
||||||
@script.configure(co)
|
co = ConfigureOp.new(@script)
|
||||||
rescue RsconsError => e
|
begin
|
||||||
co.close(false)
|
@script.configure(co)
|
||||||
raise e
|
rescue RsconsError => e
|
||||||
|
co.close(false)
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
Cache.instance["configuration_data"]["enabled_variants"] = @enabled_variants
|
||||||
|
co.close(true)
|
||||||
end
|
end
|
||||||
Cache.instance["configuration_data"]["enabled_variants"] = @enabled_variants
|
|
||||||
co.close(true)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Remove installed files.
|
# Remove installed files.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module Rscons
|
module Rscons
|
||||||
# Project version.
|
# Project version.
|
||||||
VERSION = "3.0.0"
|
VERSION = "3.0.1"
|
||||||
end
|
end
|
||||||
+7
-1
@@ -60,7 +60,13 @@ combined_file.each do |line|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
license = File.read("LICENSE.txt").gsub(/^/, "# ")
|
license = File.read("LICENSE.txt").gsub(/^(.*?)$/) do |line|
|
||||||
|
if line.size > 0
|
||||||
|
"# #{line}"
|
||||||
|
else
|
||||||
|
"#"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
require "zlib"
|
require "zlib"
|
||||||
require "base64"
|
require "base64"
|
||||||
|
|||||||
@@ -372,6 +372,17 @@ EOF
|
|||||||
expect(File.exists?('simple.c')).to be_truthy
|
expect(File.exists?('simple.c')).to be_truthy
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "executes custom clean action blocks" do
|
||||||
|
test_dir("simple")
|
||||||
|
result = run_rscons(args: %w[-f clean.rb])
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(File.exists?("build/e.1/simple.c.o")).to be_truthy
|
||||||
|
result = run_rscons(args: %w[-f clean.rb clean])
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(result.stdout).to match %r{custom clean action}
|
||||||
|
expect(File.exists?("build/e.1/simple.c.o")).to be_falsey
|
||||||
|
end
|
||||||
|
|
||||||
it "does not process environments" do
|
it "does not process environments" do
|
||||||
test_dir("simple")
|
test_dir("simple")
|
||||||
result = run_rscons(args: %w[clean])
|
result = run_rscons(args: %w[clean])
|
||||||
@@ -1825,6 +1836,15 @@ EOF
|
|||||||
expect(result.status).to_not eq 0
|
expect(result.status).to_not eq 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "only runs the configure operation once" do
|
||||||
|
test_dir "configure"
|
||||||
|
|
||||||
|
result = run_rscons(args: %w[-f configure_with_top_level_env.rb configure])
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(result.status).to eq 0
|
||||||
|
expect(result.stdout).to_not match %r{Configuring project.*Configuring project}m
|
||||||
|
end
|
||||||
|
|
||||||
it "automatically runs the configure task if the project is not yet configured in the given build directory" do
|
it "automatically runs the configure task if the project is not yet configured in the given build directory" do
|
||||||
test_dir "configure"
|
test_dir "configure"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user