void _link(string program) { exec(COMPILER, "-o", g_install + BIN + "/" + program, g_wip + "/" + program + "/*.o", "-L" + g_wip, "-lyodl", g_lopt); } void _buildProgram(string program) { std_cpp(g_wip + "/" + program, 0, program, ""); _link(program); } void _programYodl() { buildBuiltins(); _buildProgram("yodl"); } void _programYodlpost() { _buildProgram("yodlpost"); } void _programYodlverbinsert() { string strip; if (strfind(g_lopt, "-s") != -1) strip = "-s"; chdir("verbinsert"); system("icmbuild"); chdir(".."); system("install " + strip + " verbinsert/tmp/bin/binary " + g_install + BIN + "/yodlverbinsert"); } void program(string target) { md(g_install + BIN); if (target == "programs" || target == "yodlstriproff") run("cp scripts/yodlstriproff " + g_install + BIN); if (target == "programs" || target == "yodl2whatever") run("scripts/configreplacements " + "scripts/yodl2whatever.in " + g_install + BIN + "/yodl2whatever " + g_install); if (target == "programs" || target == "yodlverbinsert") _programYodlverbinsert(); if ( target == "yodlstriproff" || target == "yodl2whatever" || target == "yodlverbinsert" ) return; compileRSS(); // ./compilerss if (target == "programs" || target == "yodl") _programYodl(); if (target == "programs" || target == "yodlpost") _programYodlpost(); } void programExit(string target, string strip) // build one program, { // called from main #ifndef PROFILING if (strip == "strip") g_lopt = "-s"; #endif program(target); exit(0); } void programsExit(string strip) // build all programs, { // called from main #ifndef PROFILING if (strip == "strip") g_lopt = "-s"; #endif program("programs"); exit(0); }