umk: CCJ support

git-svn-id: svn://ultimatepp.org/upp/trunk@15987 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2021-06-08 21:58:26 +00:00
parent 1f2cefbb78
commit 2e0a930119
8 changed files with 341 additions and 27 deletions

View file

@ -81,13 +81,14 @@ CONSOLE_APP_MAIN
ide.makefile_svn_revision = false;
bool clean = false;
bool makefile = false;
bool ccfile = false;
bool deletedir = true;
int exporting = 0;
bool run = false;
String mkf;
Vector<String> param, runargs;
const Vector<String>& args = CommandLine();
for(int i = 0; i < args.GetCount(); i++) {
String a = args[i];
@ -107,6 +108,7 @@ CONSOLE_APP_MAIN
case 'X': exporting = 2; break;
case 'k': deletedir = false; break;
case 'u': ide.use_target = true; break;
case 'j': ccfile = true; break;
case 'M': {
makefile = true;
if(s[1] == '=') {
@ -154,7 +156,7 @@ CONSOLE_APP_MAIN
else
param.Add(a);
}
if(param.GetCount() >= 2) {
String v = GetUmkFile(param[0] + ".var");
if(IsNull(v)) {
@ -232,6 +234,12 @@ CONSOLE_APP_MAIN
ide.method = m;
if(ccfile) {
ide.SaveCCJ(GetFileDirectory(PackagePath(ide.main)) + "compile_commands.json", false);
SetExitCode(0);
return;
}
if(clean)
ide.Clean();
if(exporting) {
@ -277,4 +285,4 @@ CONSOLE_APP_MAIN
"See https://www.ultimatepp.org/app$ide$umk$en-us.html for details\n");
}
#endif
#endif