enforce shared libpoly on all platforms, with File.copy before File.move;
authorwenzelm
Sun Feb 11 12:40:05 2018 +0100 (17 months ago)
changeset 6759266253039d5ca
parent 67591 6fd9902057f5
child 67593 5efb88c90051
enforce shared libpoly on all platforms, with File.copy before File.move;
src/Pure/Admin/build_polyml.scala
     1.1 --- a/src/Pure/Admin/build_polyml.scala	Sat Feb 10 12:33:45 2018 +0100
     1.2 +++ b/src/Pure/Admin/build_polyml.scala	Sun Feb 11 12:40:05 2018 +0100
     1.3 @@ -112,7 +112,7 @@
     1.4      val configure_options =
     1.5        (if (!arch_64 && Isabelle_System.getenv("ISABELLE_PLATFORM64") == "x86_64-linux")
     1.6          info.options_multilib
     1.7 -       else info.options) ::: List("--enable-intinf-as-int") ::: options
     1.8 +       else info.options) ::: List("--enable-shared", "--enable-intinf-as-int") ::: options
     1.9  
    1.10      bash(root,
    1.11        info.setup + "\n" +
    1.12 @@ -129,7 +129,7 @@
    1.13      {
    1.14        val ldd_pattern =
    1.15          if (Platform.is_linux) Some(("ldd", """\s*libgmp.*=>\s*(\S+).*""".r))
    1.16 -        else if (Platform.is_macos) Some(("otool -L", """\s*(\S+libgmp.*dylib).*""".r))
    1.17 +        else if (Platform.is_macos) Some(("otool -L", """\s*(\S+lib(?:polyml|gmp).*dylib).*""".r))
    1.18          else None
    1.19        ldd_pattern match {
    1.20          case Some((ldd, pattern)) =>
    1.21 @@ -159,15 +159,15 @@
    1.22      Isabelle_System.rm_tree(target)
    1.23      Isabelle_System.mkdirs(target)
    1.24  
    1.25 +    for (file <- info.copy_files ::: ldd_files ::: sha1_files)
    1.26 +      File.copy(Path.explode(file).expand_env(settings), target)
    1.27 +
    1.28      for {
    1.29        d <- List("target/bin", "target/lib")
    1.30        dir = root + Path.explode(d)
    1.31        entry <- File.read_dir(dir)
    1.32      } File.move(dir + Path.explode(entry), target)
    1.33  
    1.34 -    for (file <- info.copy_files ::: ldd_files ::: sha1_files)
    1.35 -      File.copy(Path.explode(file).expand_env(settings), target)
    1.36 -
    1.37  
    1.38      /* poly: library path */
    1.39