68 |
68 |
69 /* build */ |
69 /* build */ |
70 |
70 |
71 progress.echo("Building veriT for " + platform_name + " ...") |
71 progress.echo("Building veriT for " + platform_name + " ...") |
72 |
72 |
|
73 val configure_options = |
|
74 if (Platform.is_linux) "LDFLAGS=-Wl,-rpath,_DUMMY_" else "" |
|
75 |
73 val build_dir = tmp_dir + Path.basic(source_name) |
76 val build_dir = tmp_dir + Path.basic(source_name) |
74 val build_script = |
77 progress.bash("set -e\n./configure " + configure_options + "\nmake", |
75 """ |
78 cwd = build_dir.file, echo = verbose).check |
76 ./configure |
|
77 make |
|
78 """ |
|
79 progress.bash("set -e\n" + build_script, cwd = build_dir.file, echo = verbose).check |
|
80 |
79 |
81 |
80 |
82 /* install */ |
81 /* install */ |
83 |
82 |
84 File.copy(build_dir + Path.explode("LICENSE"), component_dir) |
83 File.copy(build_dir + Path.explode("LICENSE"), component_dir) |
85 val install_files = List("veriT") |
84 |
86 for (name <- install_files ::: install_files.map(_ + ".exe")) { |
85 val exe_path = Path.basic("veriT").platform_exe |
87 val path = build_dir + Path.basic(name) |
86 File.copy(build_dir + exe_path, platform_dir) |
88 if (path.is_file) File.copy(path, platform_dir) |
87 Executable.libraries_closure(platform_dir + exe_path, filter = Set("libgmp")) |
89 } |
88 |
90 |
89 |
91 /* settings */ |
90 /* settings */ |
92 |
91 |
93 val etc_dir = Isabelle_System.make_directory(component_dir + Path.basic("etc")) |
92 val etc_dir = Isabelle_System.make_directory(component_dir + Path.basic("etc")) |
94 File.write(etc_dir + Path.basic("settings"), |
93 File.write(etc_dir + Path.basic("settings"), |
111 File.write(component_dir + Path.basic("README"), |
110 File.write(component_dir + Path.basic("README"), |
112 """This is veriT """ + version + """ from |
111 """This is veriT """ + version + """ from |
113 """ + download_url + """ |
112 """ + download_url + """ |
114 |
113 |
115 It has been built from sources like this: |
114 It has been built from sources like this: |
116 """ + build_script + """ |
115 |
|
116 cd src |
|
117 ./configure |
|
118 make |
|
119 |
117 |
120 |
118 Makarius |
121 Makarius |
119 """ + Date.Format.date(Date.now()) + "\n") |
122 """ + Date.Format.date(Date.now()) + "\n") |
120 }) |
123 }) |
121 } |
124 } |