Fix bug with nested / moduled c files not compiling #30
@@ -482,7 +482,7 @@ fn gen_compile_commands(mode: &Option<String>) -> std::io::Result<()> {
|
|||||||
let cwd = std::env::current_dir()?;
|
let cwd = std::env::current_dir()?;
|
||||||
let obj_dir = format!("target/{}/obj", build_config.name);
|
let obj_dir = format!("target/{}/obj", build_config.name);
|
||||||
|
|
||||||
let source_files: Vec<PathBuf> = glob("src/*.c")
|
let source_files: Vec<PathBuf> = glob("src/**/*.c")
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
||||||
.filter_map(|e| e.ok())
|
.filter_map(|e| e.ok())
|
||||||
.collect();
|
.collect();
|
||||||
@@ -665,7 +665,7 @@ fn build(mode: &Option<String>, force_recompile: bool) -> std::io::Result<()> {
|
|||||||
.collect();
|
.collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
let source_files: Vec<PathBuf> = glob("src/*.c")
|
let source_files: Vec<PathBuf> = glob("src/**/*.c")
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
||||||
.filter_map(|e| e.ok())
|
.filter_map(|e| e.ok())
|
||||||
.collect();
|
.collect();
|
||||||
@@ -814,7 +814,7 @@ fn clean() -> std::io::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn fmt() -> std::io::Result<()> {
|
fn fmt() -> std::io::Result<()> {
|
||||||
let source_files: Vec<PathBuf> = glob("src/*.c")
|
let source_files: Vec<PathBuf> = glob("src/**/*.c")
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
||||||
.chain(
|
.chain(
|
||||||
glob("src/*.h")
|
glob("src/*.h")
|
||||||
@@ -846,7 +846,7 @@ fn fmt() -> std::io::Result<()> {
|
|||||||
fn lint() -> std::io::Result<()> {
|
fn lint() -> std::io::Result<()> {
|
||||||
gen_compile_commands(&None)?;
|
gen_compile_commands(&None)?;
|
||||||
|
|
||||||
let source_files: Vec<PathBuf> = glob("src/*.c")
|
let source_files: Vec<PathBuf> = glob("src/**/*.c")
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
.map_err(|e| std::io::Error::new(std::io::ErrorKind::NotFound, format!("{e}")))?
|
||||||
.filter_map(|e| e.ok())
|
.filter_map(|e| e.ok())
|
||||||
.collect();
|
.collect();
|
||||||
|
|||||||
Reference in New Issue
Block a user