Skip to content

Commit

Permalink
- Removed the Compile script on Unix platforms (call make directly)
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10062 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 9, 2011
1 parent 160e542 commit 6a526fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Compiler/Makefile.in
Expand Up @@ -34,7 +34,7 @@ PROG = omc
PROGD = omcd
PROGP = omcp

SCRIPT_FILES = Compile doPlot openmodelica.lefty convert_lines.pl default_profiling.xsl
SCRIPT_FILES = doPlot openmodelica.lefty convert_lines.pl default_profiling.xsl

#SUBDIRS= ast runtime
SUBDIRS = runtime modpar
Expand Down
13 changes: 7 additions & 6 deletions Compiler/Script/CevalScript.mo
Expand Up @@ -2528,7 +2528,7 @@ protected function compileModel "function: compileModel
algorithm
_ := matchcontinue (inFilePrefix,inLibsList,inFileDir,noClean,solverMethod)
local
String pd,omhome,omhome_1,cd_path,libsfilename,libs_str,s_call,fileprefix,file_dir,command,filename,str,extra_command,
String pd,omhome,omhome_1,cd_path,libsfilename,libs_str,win_call,make_call,s_call,fileprefix,file_dir,command,filename,str,extra_command,
fileDLL, fileEXE, fileLOG;
list<String> libs;
Boolean isWindows;
Expand All @@ -2552,10 +2552,11 @@ algorithm
// set OPENMODELICAHOME=DIR && actually adds the space between the DIR and &&
// to the environment variable! Don't ask me why, ask Microsoft.
isWindows = System.os() ==& "Windows_NT";
omhome = Util.if_(System.os() ==& "Windows_NT", "set OPENMODELICAHOME=\"" +& omhome_1 +& "\"&& ", "");
s_call =
stringAppendList({omhome,
omhome = Util.if_(isWindows, "set OPENMODELICAHOME=\"" +& omhome_1 +& "\"&& ", "");
win_call = stringAppendList({omhome,
omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,"Compile"," ",fileprefix," ",noClean});
make_call = stringAppendList({"make -f ",fileprefix,".makefile >",fileprefix,".log 2>&1"});
s_call = Util.if_(isWindows, win_call, make_call);

Debug.fprintln("dynload", "compileModel: running " +& s_call);

Expand Down Expand Up @@ -2586,11 +2587,11 @@ algorithm

case (fileprefix,libs,file_dir,_,_) /* compilation failed\\n */
equation
"Windows_NT" = System.os();
omhome = Settings.getInstallationDirectoryPath();
omhome_1 = System.stringReplace(omhome, "\"", "");
pd = System.pathDelimiter();
command = Util.if_(System.os() ==& "Windows_NT", "Compile.bat", "Compile");
s_call = stringAppendList({omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,command});
s_call = stringAppendList({omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,"Compile.bat"});
false = System.regularFileExists(s_call);
str=stringAppendList({"command ",s_call," not found. Check $OPENMODELICAHOME"});
Error.addMessage(Error.SIMULATOR_BUILD_ERROR, {str});
Expand Down
2 changes: 0 additions & 2 deletions Compiler/scripts/Compile

This file was deleted.

0 comments on commit 6a526fc

Please sign in to comment.