Skip to content

Commit

Permalink
Use the configured omc to build the templates
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17982 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 3, 2013
1 parent f6837ce commit d5b507d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Compiler/Makefile.in
Expand Up @@ -111,15 +111,15 @@ reallyclean:
report:
@(cd report ; $(MAKE))

ifeq ($(wildcard ../build/bin/omc),)
ifeq ($(wildcard @OMC@),)
simcode:
@echo OpenModelica has not been compiled yet. Using previously generated SimCode files.
else
simcode: OpenModelicaBootstrappingHeader.h
$(MAKE) -C susan_codegen/
$(MAKE) -C Template/
OpenModelicaBootstrappingHeader.h: FrontEnd/Absyn.mo Script/Interactive.mo FrontEnd/Values.mo Util/Error.mo Util/Util.mo Util/FMI.mo GenerateOMCHeader.mos Template/Unparsing.mo
OPENMODELICAHOME=../build ../build/bin/omc +g=MetaModelica GenerateOMCHeader.mos > $@.log || (cat $@.log && false)
@OMC@ +g=MetaModelica GenerateOMCHeader.mos > $@.log || (cat $@.log && false)
@mv $@.new $@
endif
$(SUSANMO): simcode
Expand Down
@@ -1,7 +1,5 @@
.PHONY : all

OMC = OPENMODELICAHOME=`pwd`/../../build/ ../../build/bin/omc +d=failtrace

all : AbsynDumpTpl.mo CodegenUtil.mo CodegenC.mo CodegenFMU.mo CodegenCSharp.mo CodegenQSS.mo CodegenCpp.mo CodegenFMUCpp.mo DAEDumpTpl.mo ExpressionDumpTpl.mo NFInstDumpTpl.mo SimCodeDump.mo Unparsing.mo SCodeDumpTpl.mo CodegenAdevs.mo CodegenXML.mo CodegenJava.mo CodegenJS.mo

AbsynDumpTpl.mo : AbsynDumpTpl.tpl AbsynDumpTV.mo
Expand Down
3 changes: 3 additions & 0 deletions Compiler/Template/Makefile.in
@@ -0,0 +1,3 @@
OMC=@OMC@ +d=failtrace

include Makefile.common
6 changes: 5 additions & 1 deletion configure.in
Expand Up @@ -155,7 +155,10 @@ fi # End x86-specific CFLAGS

dnl check for environment variables

AC_ARG_WITH(omc, [ --with-omc=[omc] (the installed omc path which we will use to compile omc)],[OMC=`readlink "$withval"`],[OMC=`which omc`;OMC=`readlink "$OMC"`])
AC_ARG_WITH(omc, [ --with-omc=[omc] (the installed omc path which we will use to compile omc)],[OMC="$withval"],[OMC=`which omc`])
while test -h "$OMC"; do
OMC=`readlink "$OMC"`
done

AC_MSG_CHECKING([for omc])

Expand Down Expand Up @@ -829,6 +832,7 @@ date=`date "+%Y-%m-%d %H:%M:%S"`

GENERATED_AUTOCONF_FILES="Makefile \
Compiler/Makefile \
Compiler/Template/Makefile \
Compiler/omc_release/Makefile \
Compiler/runtime/Makefile \
Compiler/modpar/Makefile \
Expand Down

0 comments on commit d5b507d

Please sign in to comment.