Compare commits

...
6 Commits
Author SHA1 Message Date
josh 07e7f214f1 v3.0.1 2022-03-13 14:46:50 -04:00
josh 3ad741514d Update CHANGELOG for v3.0.1 2022-03-13 14:46:32 -04:00
josh b932380b3b Avoid running configure operation twice - close #156 2022-03-11 21:17:07 -05:00
josh e3ea429253 Fix running dspec task with argument 2022-03-11 21:13:52 -05:00
josh dca4c49770 Avoid trailing spaces in distributable script 2022-03-07 21:08:17 -05:00
josh b068fe7574 Test that custom clean task action blocks are execution 2022-02-28 11:59:52 -05:00
8 changed files with 50 additions and 3 deletions

No files matched your search

+6
View File
@@ -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
View File
@@ -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
+7
View File
@@ -0,0 +1,7 @@
env do |env|
env.Program('simple.exe', Dir['*.c'])
end
clean do
puts "custom clean action"
end
+3
View File
@@ -207,6 +207,8 @@ module Rscons
# #
# @return [void] # @return [void]
def configure def configure
unless @_configured
@_configured = true
co = ConfigureOp.new(@script) co = ConfigureOp.new(@script)
begin begin
@script.configure(co) @script.configure(co)
@@ -217,6 +219,7 @@ module Rscons
Cache.instance["configuration_data"]["enabled_variants"] = @enabled_variants Cache.instance["configuration_data"]["enabled_variants"] = @enabled_variants
co.close(true) co.close(true)
end end
end
# Remove installed files. # Remove installed files.
# #
+1 -1
View File
@@ -1,4 +1,4 @@
module Rscons module Rscons
# Project version. # Project version.
VERSION = "3.0.0" VERSION = "3.0.1"
end end
+7 -1
View File
@@ -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"
+20
View File
@@ -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"