nob.h icon indicating copy to clipboard operation
nob.h copied to clipboard

[Suggestion] Make nob_needs_rebuild accept input paths as __VA_ARGS__

Open bennyyip opened this issue 4 months ago • 1 comments

nob_needs_rebuild is not very convenient to use. I suggest this macro(copied from nob_cmd_append):

#define foo(output_path, ...)                                                  \
    nob_needs_rebuild(                                                         \
        output_path, ((const char *[]){__VA_ARGS__}),                          \
        (sizeof((const char *[]){__VA_ARGS__}) / sizeof(const char *)))

if (foo("yyjson.o", "yyjson.c", "yyjson.h")) {
    // ...
}

We cannot use the name nob_nees_rebuild and I have no idea how to name it.

bennyyip avatar Aug 23 '25 13:08 bennyyip

I have no idea how to call it either. But if you come up with a good name feel free to submit a PR. :)

rexim avatar Aug 24 '25 12:08 rexim