Fix bug with nested / moduled c files not compiling (#30)
closes #29 Reviewed-on: http://192.168.1.227:3000/sfrembling/pallet/pulls/30 Co-authored-by: Shea Frembling <sfrembling@gmail.com> Co-committed-by: Shea Frembling <sfrembling@gmail.com>
This commit was merged in pull request #30.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user