Skip to content

Commit

Permalink
Update bootstrapping tarball
Browse files Browse the repository at this point in the history
Search for omc for bootstrapping
Added targets omc-rml and omc-bootstrapped. The bootstrapped target will now use the tarball automatically if the configured omc is missing


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17777 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 21, 2013
1 parent 1161177 commit 47380ae
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
4 changes: 1 addition & 3 deletions Compiler/runtime/Settings_omc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ extern void Settings_setEcho(int _echo)
echo = _echo;
}

static const std::string version = std::string(CONFIG_VERSION) + std::string(" (Bootstrapping version; only for development)");

extern const char* Settings_getVersionNr()
{
return version.c_str();
return CONFIG_VERSION " (Bootstrapping version)";
}

extern const char* Settings_getTempDirectoryPath()
Expand Down
2 changes: 1 addition & 1 deletion Compiler/runtime/Settings_rml.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void Settings_5finit(void)

RML_BEGIN_LABEL(Settings__getVersionNr)
{
rmlA0 = (void*) mk_scon(CONFIG_VERSION);
rmlA0 = (void*) mk_scon(CONFIG_VERSION " (RML version)");
RML_TAILCALLK(rmlSC);
}
RML_END_LABEL
Expand Down
11 changes: 7 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ include Makefile.common
.testvariables:
settings:

omc: omc-diff interactive docs fmi fmil opencl_rt lis
omc: @OMCTARGET@

omc-rml: omc-diff interactive docs fmi fmil opencl_rt lis
(cd Compiler && $(MAKE) -f Makefile release)
$(MAKE) omlibrary
omcd: omc-diff interactive docs fmi fmil opencl_rt lis
(cd Compiler && $(MAKE) -f Makefile debug)

boehm-gc-lib: @LIBGC@
build/lib/omc/libgc.so: 3rdParty/gc-7.2/.libs/libgc.so mkbuilddirs
Expand Down Expand Up @@ -98,6 +98,9 @@ qtclean: qtclean-common
$(MAKE) -C OMOptimBasis/build -f Makefile.unix clean
endif

omc-bootstrapped:
if test -f @OMC@; then $(MAKE) bootstrap-from-compiled; else $(MAKE) bootstrap-from-tarball; fi

# configure --without-rml works using this target
bootstrap-from-tarball:
$(MAKE) bootstrap-dependencies
Expand All @@ -107,7 +110,7 @@ bootstrap-from-tarball:

# configure --without-rml works using this target, but requires a compiled omc (either from bootstrap or regular one)
bootstrap-from-compiled:
test -f build/bin/omc
test -f @OMC@
$(MAKE) bootstrap-dependencies
$(MAKE) -C testsuite/openmodelica/bootstrapping -f LinkMain.makefile bootstrap-from-compiled
$(MAKE) omlibrary
Expand Down
19 changes: 17 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ AC_SUBST(AR_SH)
AC_SUBST(CPPFLAGS_F2C)
AC_SUBST(LDFLAGS_SOCKET)
AC_SUBST(APP)
AC_SUBST(OMC)
AC_SUBST(OMCTARGET)

FINAL_MESSAGES="\nConfigured OpenModelica successfully using the following options:"

Expand Down Expand Up @@ -152,7 +154,21 @@ fi # End x86-specific CFLAGS

dnl check for environment variables

AC_ARG_WITH(rml, [ --with-rml=[yes] (use =no if you are using experimental bootstrapping)],[WANT_RML="$withval"],[WANT_RML="yes"])
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_MSG_CHECKING([for omc])

if test "$WANT_OMC" = "no" ; then
AC_MSG_RESULT([building it through bootstrapping (not recommended since you might end up unable to recompile omc)])
OMC="$ac_pwd$ac_dir_suffix/build/bin/omc"
elif "$OMC" ++v >& /dev/null; then
AC_MSG_RESULT([$OMC])
else
AC_MSG_RESULT([failed (tried $OMC). Building it through bootstrapping (not recommended since you might end up unable to recompile omc).])
OMC="$ac_pwd$ac_dir_suffix/build/bin/omc"
fi

AC_ARG_WITH(rml, [ --with-rml=[no] (use =no if you are using experimental bootstrapping)],[WANT_RML="$withval";OMCTARGET=omc-rml],[WANT_RML="yes";OMCTARGET=omc-rml])

if test "$WANT_RML" != "no"; then
AC_MSG_CHECKING([for \$RMLHOME])
Expand Down Expand Up @@ -195,7 +211,6 @@ AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi

else
rmlhome=CONFIGUREDWITHOUTRMLDONTTRYTHISMAKEFILETARGETAGAIN
fi
Expand Down

0 comments on commit 47380ae

Please sign in to comment.