Self rebuilding
This commit is contained in:
2
example/.gitignore
vendored
Normal file
2
example/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
gebs
|
||||
a.out
|
18
example/gebs.c
Normal file
18
example/gebs.c
Normal 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;
|
||||
}
|
7
example/main.c
Normal file
7
example/main.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello world\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user