Allow RULE()s with 0 dependencies

This commit is contained in:
kamkow1
2025-06-18 01:50:36 +02:00
parent d8e1d54f3d
commit c3be4ce8ee

3
gebs.h
View File

@ -387,6 +387,9 @@ void gebs_rebuild_self1_alloc(Gebs_Allocator *alloc, int argc, char ** argv,
({ \
const char *__deps[] = { __VA_ARGS__ }; \
bool __ok = false; \
if (sizeof(__deps)/sizeof(__deps[0]) == 0) { \
__ok = true; \
} \
for (size_t __i = 0; __i < sizeof(__deps)/sizeof(__deps[0]); __i++) { \
if (gebs_needs_rebuild((out), __deps[__i])) { \
__ok = true; \