This commit is contained in:
2026-03-23 20:42:28 -05:00
parent b14662a666
commit 4213e3d814

View File

@@ -482,7 +482,7 @@ fn gen_compile_commands(mode: &Option<String>) -> std::io::Result<()> {
let cwd = std::env::current_dir()?;
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}")))?
.filter_map(|e| e.ok())
.collect();
@@ -665,7 +665,7 @@ fn build(mode: &Option<String>, force_recompile: bool) -> std::io::Result<()> {
.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}")))?
.filter_map(|e| e.ok())
.collect();
@@ -814,7 +814,7 @@ fn clean() -> 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}")))?
.chain(
glob("src/*.h")
@@ -846,7 +846,7 @@ fn fmt() -> std::io::Result<()> {
fn lint() -> std::io::Result<()> {
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}")))?
.filter_map(|e| e.ok())
.collect();