From 8d276c3f5a7e3d4b9a43a08fa22a40d63ea08d54 Mon Sep 17 00:00:00 2001 From: Penguin Date: Sat, 1 Jan 2022 11:07:13 -0600 Subject: [PATCH] small fixes, DEPS --- .dir-locals.el | 8 ++++++++ igloo_core/src/igloo_target.rs | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 0000000..c0d1e48 --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,8 @@ +((c-mode . ((helm-make-build-dir . "build") + (lsp-clients-clangd-args . ("--query-driver=arm-unknown-eabi-gcc" + "--compile-commands-dir=projecttest/igloo/target/samd21j18a" + "--pch-storage=memory" + "--background-index" + "-j=4" + )) + ))) diff --git a/igloo_core/src/igloo_target.rs b/igloo_core/src/igloo_target.rs index a333bcd..5a44698 100644 --- a/igloo_core/src/igloo_target.rs +++ b/igloo_core/src/igloo_target.rs @@ -434,9 +434,9 @@ impl IglooTarget // Write our DEPS and DEPS_AS_ARGS vars writeln!(app_file, "\n").unwrap(); - writeln!(app_file, "DEPS=$(OBJS_AS_ARGS:%.o=%.d)").unwrap(); - writeln!(app_file, "DEPS_AS_ARGS=$(OBJS:%.o=%.d)").unwrap(); - + writeln!(app_file, "DEPS=$(OBJS:%.o=%.d)").unwrap(); + writeln!(app_file, "DEPS_AS_ARGS=$(OBJS_AS_ARGS:%.o=%.d)").unwrap(); + writeln!(app_file, "").unwrap(); ret = self.makefile_write_var( "DIR_INCLUDES", @@ -1131,9 +1131,15 @@ endif\n").unwrap(); let mut sub_dir_as_string = String::from(&obj.into_str().unwrap()); sub_dir_as_string = String::from( &sub_dir_as_string[0..sub_dir_as_string.rfind('/').unwrap()]); - objs_as_args.push(obj_as_arg_string); - // println!("{}", &sub_dir_as_string); - sub_dirs.push(sub_dir_as_string); + if !objs_as_args.contains(&obj_as_arg_string) + { + objs_as_args.push(obj_as_arg_string); + } + + if !sub_dirs.contains(&sub_dir_as_string) + { + sub_dirs.push(sub_dir_as_string); + } } self.makeopts.insert("OBJS_AS_ARGS".to_owned(), config::Value::from(objs_as_args)); self.makeopts.insert("SUB_DIRS".to_owned(), config::Value::from(sub_dirs));