Self rebuilding

This commit is contained in:
kamkow1
2025-05-19 00:48:18 +02:00
commit 6cbfd5ca91
4 changed files with 383 additions and 0 deletions

18
example/gebs.c Normal file
View File

@ -0,0 +1,18 @@
#define GEBS_IMPLEMENTATION
#include "../gebs.h"
int main(int argc, char ** argv)
{
gebs_rebuild_self(argc, argv, "cc", "-o", "gebs", __FILE__);
Gebs_Cmd cmd = {0};
gebs_cmd_append(&cmd, "cc");
gebs_cmd_append(&cmd, "main.c");
int ec = gebs_cmd_run(&cmd);
printf("%d\n", ec);
gebs_cmd_free(&cmd);
return 0;
}