From dffdff2423 to ~lattis/muon
Does the rename as discussed on the mailing list. --- include/args.h | 4 ++-- src/args.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/args.h b/include/args.h index e9b40ea..e9dea6b 100644 --- a/include/args.h +++ b/include/args.h @@ -22,7 +22,7 @@ uint32_t join_args_ninja(struct workspace *wk, uint32_t arr); uint32_t join_args_shell_ninja(struct workspace *wk, uint32_t arr); bool join_args_argv(struct workspace *wk, const char **argv, uint32_t len, uint32_t arr); [message trimmed]
From dffdff2423 to ~lattis/muon
* Added a object type 'obj_alias_type' * Implemented the meson function alias_target() * Added support for generating alias_targets * Copied and modified the relevant test from meson Currently because run targets are not implemented there are TODOs where they should be handled. --- bootstrap.sh | 1 + include/args.h | 2 + include/backend/ninja/alias_target.h | 13 ++++ include/lang/object.h | 5 ++ src/args.c | 26 ++++--- src/backend/ninja.c | 3 + [message trimmed]
From dffdff2423 to ~lattis/muon
I am re-sending this because I forget to send it to the mailing list again, sorry I am new to mailing-lists. > I'm not sure, but maybe you misunderstood the function of the mode > argument (an easy thing to do since there is no documentation). The > mode argument is supposed to determine which types of objects are > allowed to become arguments. For example, the call arr_to_args(wk, > arr_to_args_build_target | arr_to_args_custom_target, arr, &res) would > cause arr_to_args to convert obj_build_target and obj_custom_target to > strings, but would error on obj_external_program. Yes that is the case, thanks for pointing this out. > > diff --git a/src/args.c b/src/args.c > > index 4216c82..edf8a1c 100644
From dffdff2423 to ~lattis/muon
* Added a object type 'obj_alias_type' * Implemented the meson function alias_target() * Added support for generating alias_targets * Copied and modified the relevant test from meson Currently because run targets are not implemented there are TODOs where they should be handled. --- I did not end up using the function I added to custom_target.c in the original patchset so I did not include it in this patch. In addition when I tried to move it to args.c, a bunch of tests stopped passing. I have no idea why, I literally copied it verbatim from custom_taget.c. I will look into this later. bootstrap.sh | 1 + [message trimmed]
From dffdff2423 to ~lattis/muon
--- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 178cea2..fc02bcb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,5 +6,5 @@ end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true [{*.c,*.h}] [{*.c,*.h,*.sh}][message trimmed]
From dffdff2423 to ~lattis/muon
> This patch looks good except for one small formatting issue, however, I > think this function would probably fit better into args.c. Thanks, I can move it to args.c but do you still want the patch if I use arr_to_args() instead? > > --- a/include/backend/ninja/custom_target.h > > +++ b/include/backend/ninja/custom_target.h > > @@ -2,5 +2,7 @@ > > #define MUON_BACKEND_NINJA_CUSTOM_TARGET_H > > #include "lang/workspace.h" > > > > + >
From dffdff2423 to ~lattis/muon
> > diff --git a/include/lang/object.h b/include/lang/object.h > > index 3f9997e..899087c 100644 > > --- a/include/lang/object.h > > +++ b/include/lang/object.h > > @@ -10,6 +10,7 @@ > > > > enum obj_type { > > obj_any, // used for argument type checking > > + obj_alias_target, > > You should add this at the end of the object list, but before > obj_type_count to avoid shifting the values of all other object types. >
From dffdff2423 to ~lattis/muon
* Added a object type 'obj_alias_type' * Implemented the meson function alias_target() * Added support for generating alias_targets * Copied the relevant test from meson Currently because run targets are not implemented there are TODOs where they should be handled. --- bootstrap.sh | 1 + include/backend/ninja/alias_target.h | 14 ++++ include/lang/object.h | 5 ++ src/backend/ninja.c | 3 + src/backend/ninja/alias_target.c | 83 +++++++++++++++++++ src/functions/default.c | 73 +++++++++++++++- [message trimmed]
From dffdff2423 to ~lattis/muon
Factored out relativizeing and joining inputs and outputs for custom target in to a new function called `ninja_join_and_relativize_paths`. --- This is factored out so it can be called from `write_alias_tgt_iter` in the next patch. include/backend/ninja/custom_target.h | 2 ++ src/backend/ninja/custom_target.c | 35 +++++++++++++++++---------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/include/backend/ninja/custom_target.h b/include/backend/ninja/custom_target.h index b46cf21..e4ac05c 100644 --- a/include/backend/ninja/custom_target.h +++ b/include/backend/ninja/custom_target.h [message trimmed]
From dffdff2423 to ~lattis/muon
Adds basic support for alias targets. This patch leaves FIXMEs where support for depending on run targets should be added in the future. In addition I am not entirely certain that I correctly implanted the alias_target object, some feedback on that would be appreciated. Finaly my solution for writing the dependencies for alias targets is somewhat "hacky" and I am wondering if there is some obvious way to do that I am missing. meson documentation: https://mesonbuild.com/Reference-manual_functions.html#alias_target dffdff2423 (2): Factor out relativizeing custom target paths Add support for alias targets