/**************************MAIN*******************************/ int main(int argc, char **argv) { char *sys="solaris"; if (argc>1) sys=argv[1]; printf( "Makemake reads master_program_list, and the make \n" "fragment in this directory (makestart) to generate\n" "the top-level Makefile. It's working its magic now...\n\n"); if (NULL==(master=fopen("master_program_list","r"))) {printf("Can't open './master_program_list'.\n");exit(1);} parseMasterList(); findLibraries(); printf("\nA total of %i libraries and %i programs\n",numLibs,numProgs); makeMakefile(sys); if (0==system("test -x ../../release/autotar")) {/*Autotar directory exists-- so fill it.*/ printf("\n\nCreating autotar directory (slowly...)\n"); updateAutotar(); printf("Autotar directory updated!\n\n"); } printf("Makemake Complete\n"); return 0; }
void newProg(char *module, char *description) /* newProg - make a new C source skeleton. */ { char fileName[512]; char dirName[512]; char fileOnly[128]; safef(dirName, sizeof(dirName), "%s", module); makeDir(dirName); splitPath(dirName, NULL, fileOnly, NULL); safef(fileName, sizeof(fileName), "%s/%s.c", dirName, fileOnly); makeC(fileOnly, description, fileName); /* makefile is now constructed properly with ../.. paths */ setCurrentDir(dirName); makeMakefile(fileOnly, "makefile"); }