cross-platform I/Q Makefile#233
Conversation
hanno-becker
left a comment
There was a problem hiding this comment.
Thank you @edoput! I tested it on Mac and Linux and it works. One should error out early if the Isabelle binary is not found, but this can be follow-up.
|
The CI failures in |
hanno-becker
left a comment
There was a problem hiding this comment.
On second look, noted a probably unintentional change in the scala flags. Can you restore the original, and while at it also add a check if the Isabelle binary has been found, and otherwise nudge the user to set ISABELLE_HOME appropriately?
a73567b to
071d244
Compare
3926efc to
e9a9ad3
Compare
| ISABELLE_BIN ?= $(if $(wildcard $(ISABELLE_HOME)/bin/isabelle),$(ISABELLE_HOME)/bin/isabelle,isabelle) | ||
| ifeq ($(wildcard $(ISABELLE_BIN)),) | ||
| $(error Isabelle binary not found at $(ISABELLE_BIN). \ | ||
| Set ISABELLE_HOME correctly, e.g. make ISABELLE_HOME=/path/to/Isabelle/bin) |
There was a problem hiding this comment.
ISABELLE_HOME is assumed to be the root directory here, not bin
| ZSTD_JAR := $(firstword $(wildcard $(ISABELLE_HOME)/contrib/zstd-jni-*/lib/zstd-jni-*.jar)) | ||
| ISABELLE_JAR ?= $(ISABELLE_HOME)/lib/classes/isabelle.jar | ||
| JAVA_HOME ?= $(shell $(ISABELLE) getenv -b JAVA_HOME 2>/dev/null) | ||
| ISABELLE_BIN ?= $(if $(wildcard $(ISABELLE_HOME)/bin/isabelle),$(ISABELLE_HOME)/bin/isabelle,isabelle) |
There was a problem hiding this comment.
This renames $ISABELLE to $ISABELLE_BIN but does not adjust all usages, specifically make test below.
hanno-becker
left a comment
There was a problem hiding this comment.
Two minor issues still need fixing, see comments
This sources the correct environment variables for the build process in the makefile from isabelle itself.
also changes the error message to reflect the correct semantics of ISABELLE_HOME as the base directory, not the binaries directory
|
I should have addressed the last issues. The isabelle binary is only addressed using ISABELLE_BIN and I have introduced a check that it is a real command. In the test command ISABELLE was only used in one test. While the rest of the recipe uses a different pattern. Which one is appropriate and should be kept? |
Dear all,
I am building I/Q on Linux and found that the makefile assumes macos specific paths.
This commit sources the correct environment variables for the build process in the makefile from isabelle itself, making the makefile portable between macos and linux.
Description of changes:
Environment variables like JEDIT_DIR or JEDIT_JAR are documented in isabelle getenv itself and can be sourced from there. This commit changes the makefile to do so and, as a result, makes the makefile portable between linux and macos.
I have used AI to make these changes but I confirm that it works on my linux machine. This is the current output of the debug recipe. As you can see it sources correctly paths such as JAVA_HOME from
isabelle getenv -b JAVA_HOMEBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.