move BARE case

This commit is contained in:
2025-09-05 17:55:27 -04:00
parent 29d62d3893
commit 3c2c47d941

View File

@@ -30,15 +30,10 @@ int create_project(manifest_t manifest)
if (status) if (status)
return 1; return 1;
if (manifest.build == BARE) {
cfprintf("main.c", "");
cfprintf( cfprintf(
"Makefile", "README",
".POSIX:\nCC ::= gcc\nCFLAGS ::= -std=c23 -Wall -Wextra -Wpedantic\n\nall: %s\n\nclean\n\t$(RM) %s", "%s ( short description )\n\nThis cool project actions adverbly.\n",
manifest.project, manifest.project); manifest.project);
cfprintf("README", "%s", manifest.project);
goto bare_skip;
}
main_source = manifest.flat ? "main.c" : "src/main.c"; main_source = manifest.flat ? "main.c" : "src/main.c";
cfprintf(main_source, "#include <stdio.h>\n" cfprintf(main_source, "#include <stdio.h>\n"
@@ -111,9 +106,17 @@ int create_project(manifest_t manifest)
"\n" "\n"
"autoreconf --install --verbose --force\n"); "autoreconf --install --verbose --force\n");
break; break;
case BARE:
cfprintf("main.c", "");
cfprintf(
"Makefile",
".POSIX:\nCC ::= gcc\nCFLAGS ::= -std=c23 -Wall -Wextra -Wpedantic\n\nall: %s\n\nclean\n\t$(RM) %s",
manifest.project, manifest.project);
break;
default:
abort();
} }
bare_skip:
flast = true; flast = true;
switch (manifest.licence) { switch (manifest.licence) {
case MIT: case MIT: