fix bare
This commit is contained in:
@@ -35,6 +35,7 @@ int create_project(manifest_t manifest)
|
|||||||
"%s ( short description )\n\nThis cool project actions adverbly.\n",
|
"%s ( short description )\n\nThis cool project actions adverbly.\n",
|
||||||
manifest.project);
|
manifest.project);
|
||||||
|
|
||||||
|
if (manifest.build != BARE) {
|
||||||
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"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -43,6 +44,7 @@ int create_project(manifest_t manifest)
|
|||||||
"\tputs(\"Hello, World!\");\n"
|
"\tputs(\"Hello, World!\");\n"
|
||||||
"\treturn 0;\n"
|
"\treturn 0;\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
|
}
|
||||||
char *upr_name = tostrupr(manifest.project);
|
char *upr_name = tostrupr(manifest.project);
|
||||||
switch (manifest.build) {
|
switch (manifest.build) {
|
||||||
case MAKE:
|
case MAKE:
|
||||||
@@ -107,10 +109,18 @@ int create_project(manifest_t manifest)
|
|||||||
"autoreconf --install --verbose --force\n");
|
"autoreconf --install --verbose --force\n");
|
||||||
break;
|
break;
|
||||||
case BARE:
|
case BARE:
|
||||||
cfprintf("main.c", "");
|
snprintf(buffer, BUFSIZ, "%s.c", manifest.project);
|
||||||
cfprintf(
|
cfprintf(buffer, "");
|
||||||
"Makefile",
|
main_source = str_dup(buffer);
|
||||||
".POSIX:\nCC ::= gcc\nCFLAGS ::= -std=c23 -Wall -Wextra -Wpedantic\n\nall: %s\n\nclean\n\t$(RM) %s",
|
cfprintf("Makefile",
|
||||||
|
".POSIX:\n"
|
||||||
|
"CC ::= gcc\n"
|
||||||
|
"CFLAGS ::= -std=c23 -Wall -Wextra -Wpedantic\n"
|
||||||
|
"\n"
|
||||||
|
"all: %s\n"
|
||||||
|
"\n"
|
||||||
|
"clean:\n"
|
||||||
|
"\t$(RM) %s",
|
||||||
manifest.project, manifest.project);
|
manifest.project, manifest.project);
|
||||||
break;
|
break;
|
||||||
case BCOUNT:
|
case BCOUNT:
|
||||||
|
|||||||
Reference in New Issue
Block a user