Add RULE() macro for conviniently defining build rules

This commit is contained in:
kamkow1
2025-05-31 23:20:41 +02:00
parent 214b2d8a67
commit a191abc2b7
2 changed files with 11 additions and 11 deletions

3
gebs.h
View File

@ -291,6 +291,8 @@ void gebs_rebuild_self1_alloc(Gebs_Allocator *alloc, int argc, char ** argv,
} \
} while(0)
#define GEBS_RULE(target, ...) if (needs_rebuild_many(target, __VA_ARGS__))
// ----------------------------------------------------------------------------
// Scratch arena
// ----------------------------------------------------------------------------
@ -754,6 +756,7 @@ void gebs_rebuild_self1_alloc(Gebs_Allocator *alloc, int argc, char ** argv,
#define needs_rebuild_many gebs_needs_rebuild_many
#define rebuild_self gebs_rebuild_self
#define make_compile_flags gebs_make_compile_flags
#define RULE GEBS_RULE
#define scratch_arena gebs_scratch_arena
#define fmt gebs_fmt