Compare commits

..
16 Commits
13 changed files with 45 additions and 8 deletions

No files matched your search

+1
View File
@@ -32,6 +32,7 @@
- various performance improvements
- wrote a new user guide
- added new website ([https://holtrop.github.io/rscons/](https://holtrop.github.io/rscons/))
- added new logo
## v1.17.0
+2
View File
@@ -1,5 +1,7 @@
# Rscons
![rscons logo](img/rscons_logo_1000.png)
Rscons (https://github.com/holtrop/rscons) is an open-source build system
for developers.
+8 -1
View File
@@ -11,7 +11,7 @@ require "rake/clean"
require "fileutils"
CLEAN.include %w[build_test_run .yardoc yard coverage test]
CLOBBER.include %w[dist pkg]
CLOBBER.include %w[dist gen large_project pkg]
task :build_dist do
sh "ruby rb/build_dist.rb"
@@ -93,3 +93,10 @@ task :user_guide do
end
task :default => :spec
task :all => [
:build_dist,
:spec,
:yard,
:user_guide,
]
@@ -17,6 +17,10 @@ configure do
end
op.complete(status, success_message: "good!", fail_message: fail_message, fail: should_fail)
end
custom_check("Checking sed -E flag") do |op|
stdout, stderr, status = op.log_and_test_command(%w[sed -E -e s/ab+/rep/], stdin: "abbbc")
op.complete(stdout =~ /repc/ ? 0 : 1, success_message: "good", fail_message: "fail")
end
end
build do
+3 -2
View File
@@ -8,7 +8,7 @@ It supports the following features:
* built-in builders for several common operations
* out-of-the-box support for C, C++, and D languages
* extensibility for other languages or custom builders
* compatible with Windows, Linux, and OS X
* compatible with Windows, Linux, OS X, and FreeBSD
* colorized output with build progress
* build hooks
@@ -98,7 +98,8 @@ The only dependency required to run Rscons is to have a Ruby interpreter
installed.
The latest release can be downloaded from [https://github.com/holtrop/rscons/releases](https://github.com/holtrop/rscons/releases).
Simply copy the `rscons` executable script into the desired location within
the project to be built (typically the root of the repository).
the project to be built (typically the root of the repository) and mark it
executable.
## Version Control Setup
Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

+9 -2
View File
@@ -280,12 +280,19 @@ module Rscons
# Execute a test command and log the result.
#
# @param command [Array<String>]
# Command to execute.
# @param options [Hash]
# Optional arguments.
# @option options [String] :stdin
# Data to send to standard input stream of the executed command.
#
# @return [String, String, Process::Status]
# stdout, stderr, status
def log_and_test_command(command)
def log_and_test_command(command, options = {})
begin
@log_fh.puts("Command: #{command.join(" ")}")
stdout, stderr, status = Open3.capture3(*command)
stdout, stderr, status = Open3.capture3(*command, stdin_data: options[:stdin])
@log_fh.puts("Exit status: #{status.to_i}")
@log_fh.write(stdout)
@log_fh.write(stderr)
+1 -1
View File
@@ -1,4 +1,4 @@
module Rscons
# Project version.
VERSION = "2.0.0beta2"
VERSION = "2.0.0"
end
+6 -1
View File
@@ -1,6 +1,6 @@
<html>
<head>
<title>RScons User Guide<%= subpage_title %> - Version <%= Rscons::VERSION %></title>
<title>Rscons User Guide<%= subpage_title %> - Version <%= Rscons::VERSION %></title>
<style>
body {
background-color: #CCC;
@@ -31,6 +31,11 @@
.separator {
height: 2em;
}
.img_block_center {
display: block;
margin-left: auto;
margin-right: auto;
}
.page_nav {
width: 100%;
table-layout: fixed;
+3 -1
View File
@@ -154,7 +154,8 @@ class Generator
end
def render_toc
toc_content = %[<h1>Table of Contents</h1>\n]
toc_content = %[<img class="img_block_center" src="rscons_logo_1000.png" />]
toc_content += %[<h1>Table of Contents</h1>\n]
@sections.each do |section|
indent = section.number.split(".").size - 1
toc_content += %[<span style="padding-left: #{4 * indent}ex;">]
@@ -223,5 +224,6 @@ end
input = load_file("doc/user_guide.md")
FileUtils.rm_rf("gen/user_guide")
FileUtils.mkdir_p("gen/user_guide")
FileUtils.cp("img/rscons_logo_1000.png", "gen/user_guide")
Generator.new(input, "gen/user_guide/user_guide.html", false)
Generator.new(input, "gen/user_guide", true)
+8
View File
@@ -2189,6 +2189,14 @@ EOF
expect(result.status).to eq 0
end
end
it "allows passing standard input data to the executed command" do
test_dir "configure"
result = run_rscons(rsconscript: "custom_config_check.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.stdout).to match /Checking sed -E flag\.\.\. good/
expect(result.status).to eq 0
end
end
end