Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3af6b6be1b | ||
|
|
0442b876a5 | ||
|
|
bab4641b6e | ||
|
|
4698fc41b9 | ||
|
|
952f423860 | ||
|
|
d2da5f7b0d | ||
|
|
ab14dc16ed |
No files matched your search
+25
-22
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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}'],
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
module Rscons
|
||||
# gem version
|
||||
VERSION = "1.9.0"
|
||||
VERSION = "1.9.2"
|
||||
end
|
||||
@@ -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
|
||||
Reference in new issue
Block a user