30 lines
837 B
C
30 lines
837 B
C
#define GEBS_NO_PREFIX
|
|
#define GEBS_IMPLEMENTATION
|
|
#include "gebs.h"
|
|
|
|
int main(int argc, char ** argv)
|
|
{
|
|
rebuild_self(argc, argv, "cc", "-o", "gebs", __FILE__);
|
|
|
|
if (!exists1("build")) {
|
|
mkdir1("build");
|
|
}
|
|
|
|
if (needs_rebuild_many("build/self_rebuild", "example/self_rebuild.c", "gebs.h")) {
|
|
if (CMD("gcc", "-ggdb", "-o", "build/self_rebuild", "example/self_rebuild.c") != 0)
|
|
return 1;
|
|
}
|
|
if (needs_rebuild_many("build/arena", "example/arena.c", "gebs.h")) {
|
|
if (CMD("gcc", "-ggdb", "-o", "build/arena", "example/arena.c") != 0)
|
|
return 1;
|
|
}
|
|
|
|
if (needs_rebuild_many("build/commands", "example/commands.c", "gebs.h")) {
|
|
if (CMD("gcc", "-ggdb", "-o", "build/commands", "example/commands.c") != 0) {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|