more robust;
authorwenzelm
Thu, 10 Apr 2025 21:27:55 +0200
changeset 82482 781be4a1c2b8
parent 82481 041d65893a85
child 82483 c3833e342d5d
more robust;
src/Pure/Admin/component_polyml.scala
--- a/src/Pure/Admin/component_polyml.scala	Thu Apr 10 20:54:02 2025 +0200
+++ b/src/Pure/Admin/component_polyml.scala	Thu Apr 10 21:27:55 2025 +0200
@@ -63,7 +63,7 @@
 
   def make_polyml_gmp(
     platform_context: Platform_Context,
-    root: Path,
+    dir: Path,
     options: List[String] = Nil
   ): Path = {
     val progress = platform_context.progress
@@ -76,6 +76,7 @@
       else if (platform.is_macos) """apple-darwin"$(uname -r)""""
       else error("Bad platform " + platform)
 
+    val root = dir.absolute
     val target_dir = root + Path.explode("target")
 
     progress.echo("Building GMP library ...")
@@ -148,13 +149,14 @@
         case Some(dir) =>
           val v = Executable.library_path_variable(platform)
           val p = Isabelle_System.getenv(v)
-          val s = platform_context.standard_path(dir)
+          val s = platform_context.standard_path(dir.absolute) + "/lib"
           Bash.exports(v + "=" + s + if_proper(p, ":" + p))
         case None => ""
       }
 
     platform_context.execute(root,
-      info.setup + gmp_setup,
+      info.setup,
+      gmp_setup,
       "[ -f Makefile ] && make distclean",
       """./configure --prefix="$PWD/target" """ + Bash.strings(configure_options),
       "rm -rf target",