Compare commits

..
7 Commits
Author SHA1 Message Date
josh 3af6b6be1b v1.9.2 2016-01-12 10:16:00 -05:00
josh 0442b876a5 allow phony targets in conjunction with a build root 2016-01-12 10:14:10 -05:00
josh bab4641b6e v1.9.1 2015-12-10 15:25:29 -05:00
josh 4698fc41b9 add v1.9.1 release notes 2015-12-10 15:25:16 -05:00
josh 952f423860 use ${INCPREFIX} instead of hard-coded "-I" in Preprocess builder 2015-12-10 15:19:41 -05:00
josh d2da5f7b0d bundle update 2015-12-10 15:18:59 -05:00
josh ab14dc16ed change *SUFFIX defaults to arrays; add various C++ file suffixes 2015-06-15 21:58:37 -04:00
7 changed files with 50 additions and 30 deletions

No files matched your search

+25 -22
View File
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rscons (1.9.0)
rscons (1.9.2)
json (~> 1.0)
GEM
@@ -9,30 +9,30 @@ GEM
specs:
diff-lcs (1.2.5)
docile (1.1.5)
json (1.8.1)
multi_json (1.10.1)
rake (10.3.2)
rdoc (4.1.2)
json (1.8.3)
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
redcarpet (3.1.2)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.1)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.1)
redcarpet (3.3.3)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.1)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.1)
rspec-support (~> 3.0.0)
rspec-support (3.0.0)
simplecov (0.8.2)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
simplecov (0.11.1)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
yard (0.8.7.4)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
yard (0.8.7.6)
PLATFORMS
ruby
@@ -46,3 +46,6 @@ DEPENDENCIES
rspec
simplecov
yard
BUNDLED WITH
1.10.6
+10
View File
@@ -406,6 +406,16 @@ http://rubydoc.info/github/holtrop/rscons/frames.
## Release Notes
### v1.9.2
- allow phony targets in conjunction with build roots
### v1.9.1
- change *SUFFIX defaults to arrays
- add various C++ file suffixes
- use ${INCPREFIX} instead of hard-coded "-I" in Preprocess builder
### v1.9.0
#### New Features
+5 -5
View File
@@ -18,7 +18,7 @@ module Rscons
# @return [Hash] Default construction variables for the builder.
def default_variables(env)
{
'OBJSUFFIX' => '.o',
'OBJSUFFIX' => ['.o'],
'DEPFILESUFFIX' => '.mf',
'CPPDEFPREFIX' => '-D',
@@ -26,7 +26,7 @@ module Rscons
'AS' => '${CC}',
'ASFLAGS' => [],
'ASSUFFIX' => '.S',
'ASSUFFIX' => ['.S'],
'ASPPPATH' => '${CPPPATH}',
'ASPPFLAGS' => '${CPPFLAGS}',
'ASDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}'],
@@ -40,19 +40,19 @@ module Rscons
'CC' => 'gcc',
'CFLAGS' => [],
'CSUFFIX' => '.c',
'CSUFFIX' => ['.c'],
'CCDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}'],
'CCCMD' => ['${CC}', '-c', '-o', '${_TARGET}', '${CCDEPGEN}', '${INCPREFIX}${CPPPATH}', '${CPPFLAGS}', '${CFLAGS}', '${CCFLAGS}', '${_SOURCES}'],
'CXX' => 'g++',
'CXXFLAGS' => [],
'CXXSUFFIX' => '.cc',
'CXXSUFFIX' => ['.cc', '.cpp', '.cxx', '.C'],
'CXXDEPGEN' => ['-MMD', '-MF', '${_DEPFILE}'],
'CXXCMD' =>['${CXX}', '-c', '-o', '${_TARGET}', '${CXXDEPGEN}', '${INCPREFIX}${CPPPATH}', '${CPPFLAGS}', '${CXXFLAGS}', '${CCFLAGS}', '${_SOURCES}'],
'DC' => 'gdc',
'DFLAGS' => [],
'DSUFFIX' => '.d',
'DSUFFIX' => ['.d'],
'D_IMPORT_PATH' => [],
'DCCMD' => ['${DC}', '-c', '-o', '${_TARGET}', '${INCPREFIX}${D_IMPORT_PATH}', '${DFLAGS}', '${_SOURCES}'],
}
+1 -1
View File
@@ -14,7 +14,7 @@ module Rscons
{
"CPP_CMD" => %w[
${_PREPROCESS_CC} -E ${_PREPROCESS_DEPGEN}
-o ${_TARGET} -I${CPPPATH} ${CPPFLAGS} ${_SOURCES}],
-o ${_TARGET} ${INCPREFIX}${CPPPATH} ${CPPFLAGS} ${_SOURCES}],
}
end
+4
View File
@@ -509,8 +509,12 @@ module Rscons
#
# @return [String] The expanded path.
def expand_path(path)
if Rscons.phony_target?(path)
path
else
path.sub(%r{^\^(?=[\\/])}, @build_root)
end
end
# Execute a command using the system shell.
#
+1 -1
View File
@@ -1,4 +1,4 @@
module Rscons
# gem version
VERSION = "1.9.0"
VERSION = "1.9.2"
end
+4 -1
View File
@@ -933,9 +933,11 @@ EOF
end
context "phony targets" do
[false, true].each do |with_build_root|
it "allows specifying a Symbol as a target name and reruns the builder if the sources or command have changed" do
test_dir("simple")
env = Rscons::Environment.new do |env|
env.build_root = "bld" if with_build_root
env.add_builder(:Checker) do |target, sources, cache, env, vars|
unless cache.up_to_date?(target, :Checker, sources, env)
puts "Checker #{sources.first}" if env.echo != :off
@@ -946,7 +948,7 @@ EOF
env.Program("simple.exe", "simple.c")
env.Checker(:checker, "simple.exe")
end
expect(lines).to eq(["CC simple.o", "LD simple.exe", "Checker simple.exe"])
expect(lines).to eq(["CC #{with_build_root ? 'bld/' : ''}simple.o", "LD simple.exe", "Checker simple.exe"])
env.clone do |env|
env.Checker(:checker, "simple.exe")
@@ -962,5 +964,6 @@ EOF
expect(lines).to eq(["Checker simple.exe"])
end
end
end
end