diff --git a/cime_config/buildlib b/cime_config/buildlib index 07447be..6cb8214 100755 --- a/cime_config/buildlib +++ b/cime_config/buildlib @@ -11,6 +11,7 @@ from standard_script_setup import * from CIME.case import Case from CIME.utils import expect, run_cmd from CIME.buildlib import parse_input +from CIME.build import get_standard_makefile_args logger = logging.getLogger(__name__) @@ -31,7 +32,7 @@ def _build_rtm(): if not os.path.isfile(filepath_file): srcroot = case.get_value("SRCROOT") caseroot = case.get_value("CASEROOT") - paths = [ os.path.join(caseroot,"SourceMods","src.rtm"), + paths = [ os.path.join(caseroot,"SourceMods","src.rtm"), os.path.join(srcroot,"components","rtm","src","riverroute"), os.path.join(srcroot,"components","rtm","src","cpl")] @@ -43,8 +44,8 @@ def _build_rtm(): complib = os.path.join(libroot,"librof.a") makefile = os.path.join(casetools, "Makefile") - cmd = "%s complib -j %d MODEL=rtm COMPLIB=%s -f %s" \ - % (gmake, gmake_j, complib, makefile) + cmd = "{} complib -j {} MODEL=rtm COMPLIB={} -f {} {}" \ + .format(gmake, gmake_j, complib, makefile, get_standard_makefile_args(case)) rc, out, err = run_cmd(cmd, from_dir=bldroot) expect(rc == 0, "Command %s failed rc=%d\nout=%s\nerr=%s" % (cmd, rc, out, err)) @@ -55,7 +56,3 @@ def _build_rtm(): if __name__ == "__main__": _build_rtm() - - - -