Skip to content

Commit 5584f5f

Browse files
authored
updated build system script commands (#490)
updated build system script commands
1 parent 7531a22 commit 5584f5f

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

build_system/src/build.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ struct BuildArg {
1414
}
1515

1616
impl BuildArg {
17+
/// Creates a new `BuildArg` instance by parsing command-line arguments.
1718
fn new() -> Result<Option<Self>, String> {
1819
let mut build_arg = Self::default();
19-
// We skip binary name and the `build` command.
20+
// Skip binary name and the `build` command.
2021
let mut args = std::env::args().skip(2);
2122

2223
while let Some(arg) = args.next() {
@@ -211,6 +212,7 @@ fn build_codegen(args: &mut BuildArg) -> Result<(), String> {
211212
Ok(())
212213
}
213214

215+
/// Executes the build process.
214216
pub fn run() -> Result<(), String> {
215217
let mut args = match BuildArg::new()? {
216218
Some(args) => args,

build_system/src/main.rs

+15-10
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,22 @@ macro_rules! arg_error {
2626
fn usage() {
2727
println!(
2828
"\
29-
Available commands for build_system:
29+
rustc_codegen_gcc build system
3030
31-
cargo : Run cargo command
32-
rustc : Run rustc command
33-
clean : Run clean command
34-
prepare : Run prepare command
35-
build : Run build command
36-
test : Run test command
37-
info : Run info command
38-
clone-gcc : Run clone-gcc command
39-
--help : Show this message"
31+
Usage: build_system [command] [options]
32+
33+
Options:
34+
--help : Displays this help message.
35+
36+
Commands:
37+
cargo : Executes a cargo command.
38+
rustc : Compiles the program using the GCC compiler.
39+
clean : Cleans the build directory, removing all compiled files and artifacts.
40+
prepare : Prepares the environment for building, including fetching dependencies and setting up configurations.
41+
build : Compiles the project.
42+
test : Runs tests for the project.
43+
info : Displays information about the build environment and project configuration.
44+
clone-gcc : Clones the GCC compiler from a specified source."
4045
);
4146
}
4247

0 commit comments

Comments
 (0)