diff --git a/cime_config/buildlib b/cime_config/buildlib index b00231fe9a..86f1e479fa 100755 --- a/cime_config/buildlib +++ b/cime_config/buildlib @@ -14,6 +14,7 @@ sys.path.append(_LIBDIR) from standard_script_setup import * from CIME.buildlib import parse_input +from CIME.build import get_standard_makefile_args from CIME.case import Case from CIME.utils import run_cmd, expect @@ -31,7 +32,6 @@ def _main_func(): lnd_root = case.get_value("COMP_ROOT_DIR_LND") gmake_j = case.get_value("GMAKE_J") gmake = case.get_value("GMAKE") - mach = case.get_value("MACH") #------------------------------------------------------- # create Filepath file @@ -63,10 +63,9 @@ def _main_func(): complib = os.path.join(libroot,"libclm.a") makefile = os.path.join(casetools, "Makefile") - macfile = os.path.join(caseroot, "Macros.%s" % mach) - cmd = "%s complib -j %d MODEL=clm COMPLIB=%s -f %s MACFILE=%s " \ - % (gmake, gmake_j, complib, makefile, macfile ) + cmd = "{} complib -j {} MODEL=clm COMPLIB={} -f {} {}" \ + .format(gmake, gmake_j, complib, makefile, get_standard_makefile_args(case)) rc, out, err = run_cmd(cmd) logger.info("%s: \n\n output:\n %s \n\n err:\n\n%s\n"%(cmd,out,err)) @@ -76,4 +75,3 @@ def _main_func(): if __name__ == "__main__": _main_func() -