From 09bc48978d9e08e7b1c92f630efd043aafbbac7c Mon Sep 17 00:00:00 2001 From: Jonah Beckford <9566106-jonahbeckford@users.noreply.gitlab.com> Date: Sun, 26 Nov 2023 18:04:20 -0800 Subject: [PATCH] Only patch flexdll on Windows. + Rename Diskuv OCaml to DkML Part of https://github.com/diskuv/dkml-installer-ocaml/issues/80 --- README.md | 2 +- env/standard-compiler-env-to-ocaml-configure-env.sh | 2 +- src/r-c-ocaml-1-setup.sh | 8 ++++---- src/r-c-ocaml-2-build_host.sh | 2 +- src/r-c-ocaml-3-build_cross.sh | 4 ++-- src/r-c-ocaml-functions.sh | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b557188..16ea418 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ that can take the "mlcross" Opam directory structure and add it to ## Developing -First run `with-dkml make local-install` on Diskuv OCaml on Windows, or +First run `with-dkml make local-install` on DkML on Windows, or `make local-install` on other platforms, to install the compiler in a local opam switch using an in-place build. diff --git a/env/standard-compiler-env-to-ocaml-configure-env.sh b/env/standard-compiler-env-to-ocaml-configure-env.sh index ed34248..cff9e44 100644 --- a/env/standard-compiler-env-to-ocaml-configure-env.sh +++ b/env/standard-compiler-env-to-ocaml-configure-env.sh @@ -40,7 +40,7 @@ # Generally the variables conform to the description in # https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html. # The compiler will have been chosen from: -# a) find the compiler selected/validated in the Diskuv OCaml installation +# a) find the compiler selected/validated in the DkML installation # (Windows) or on first-use (Unix) # b) the specific architecture that has been given in DKML_TARGET_ABI # diff --git a/src/r-c-ocaml-1-setup.sh b/src/r-c-ocaml-1-setup.sh index b30c584..d9f8015 100755 --- a/src/r-c-ocaml-1-setup.sh +++ b/src/r-c-ocaml-1-setup.sh @@ -16,7 +16,7 @@ # ---------------------------- # # @jonahbeckford: 2021-10-26 -# - This file is licensed differently than the rest of the Diskuv OCaml distribution. +# - This file is licensed differently than the rest of the DkML distribution. # Keep the Apache License in this file since this file is part of the reproducible # build files. # @@ -158,7 +158,7 @@ usage() { printf "%s\n" " Defaults to '$OPT_MSVS_PREFERENCE' which, because it does not include '@'," printf "%s\n" " will not choose a compiler based on environment variables that would disrupt reproducibility." printf "%s\n" " Confer with https://github.com/metastack/msvs-tools#msvs-detect" - printf "%s\n" " -e DKMLHOSTABI: Optional. Use the Diskuv OCaml compiler detector find a host ABI compiler." + printf "%s\n" " -e DKMLHOSTABI: Optional. Use the DkML compiler detector find a host ABI compiler." printf "%s\n" " Especially useful to find a 32-bit Windows host compiler that can use 64-bits of memory for the compiler." printf "%s\n" " Values include: windows_x86, windows_x86_64, android_arm64v8a, darwin_x86_64, etc." printf "%s\n" " Others are/will be documented on https://diskuv.gitlab.io/diskuv-ocaml. Defaults to an" @@ -769,7 +769,7 @@ BUILD_CROSS_ARGS+=( -s "$_OCAMLVER" ) # Find and apply patches to the host ABI apply_patches "$OCAMLSRC_UNIX" ocaml "$_OCAMLVER" host -if [ -e "$OCAMLSRC_UNIX"/flexdll/Makefile ]; then +if [ -e "$OCAMLSRC_UNIX"/flexdll/Makefile ] && is_unixy_windows_build_machine; then apply_patches "$OCAMLSRC_UNIX/flexdll" flexdll "$_FLEXDLLVER" host fi @@ -794,7 +794,7 @@ else get_ocaml_source "$GIT_COMMITID_TAG_OR_DIR" "$_srcabidir_unix" "$TARGETDIR_MIXED/$CROSS_SUBDIR/$_targetabi/$HOSTSRC_SUBDIR" "$_targetabi" # Find and apply patches to the target ABI apply_patches "$_srcabidir_unix" ocaml "$_OCAMLVER" cross - if [ -e "$_srcabidir_unix"/flexdll/Makefile ]; then + if [ -e "$_srcabidir_unix"/flexdll/Makefile ] && is_unixy_windows_build_machine; then apply_patches "$_srcabidir_unix/flexdll" flexdll "$_FLEXDLLVER" cross fi done < "$WORK"/tabi diff --git a/src/r-c-ocaml-2-build_host.sh b/src/r-c-ocaml-2-build_host.sh index a0d1e09..c3c3b65 100755 --- a/src/r-c-ocaml-2-build_host.sh +++ b/src/r-c-ocaml-2-build_host.sh @@ -46,7 +46,7 @@ usage() { printf "%s\n" " -t DIR: Target directory for the reproducible directory tree" printf "%s\n" " -b PREF: Required and used only for the MSVC compiler. See r-c-ocaml-1-setup.sh" printf "%s\n" " -c OCAMLC_OPT_EXE: If a possibly older 'ocamlc.opt' is specified, it speeds up compilation of the new OCaml compiler" - printf "%s\n" " -e DKMLHOSTABI: Uses the Diskuv OCaml compiler detector find a host ABI compiler" + printf "%s\n" " -e DKMLHOSTABI: Uses the DkML compiler detector find a host ABI compiler" printf "%s\n" " -f HOSTSRC_SUBDIR: Use HOSTSRC_SUBDIR subdirectory of -t DIR to place the source code of the host ABI" printf "%s\n" " -p HOST_SUBDIR: Optional. Use HOST_SUBDIR subdirectory of -t DIR to place the host ABI" printf "%s\n" " -k HOSTABISCRIPT: Optional. See r-c-ocaml-1-setup.sh" diff --git a/src/r-c-ocaml-3-build_cross.sh b/src/r-c-ocaml-3-build_cross.sh index b69db5d..194acdf 100755 --- a/src/r-c-ocaml-3-build_cross.sh +++ b/src/r-c-ocaml-3-build_cross.sh @@ -22,7 +22,7 @@ # ---------------------------- # # @jonahbeckford: 2021-10-26 -# - This file is licensed differently than the rest of the Diskuv OCaml distribution. +# - This file is licensed differently than the rest of the DkML distribution. # Keep the Apache License in this file since this file is part of the reproducible # build files. # @@ -61,7 +61,7 @@ usage() { printf "%s\n" " -d DIR: DKML directory containing a .dkmlroot file" printf "%s\n" " -t DIR: Target directory for the reproducible directory tree" printf "%s\n" " -a TARGETABIS: Optional. See r-c-ocaml-1-setup.sh" - printf "%s\n" " -e DKMLHOSTABI: Uses the Diskuv OCaml compiler detector find a host ABI compiler" + printf "%s\n" " -e DKMLHOSTABI: Uses the DkML compiler detector find a host ABI compiler" printf "%s\n" " -f HOSTSRC_SUBDIR: Use HOSTSRC_SUBDIR subdirectory of -t DIR to place the source code of the host ABI" printf "%s\n" " -g CROSS_SUBDIR: Use CROSS_SUBDIR subdirectory of -t DIR to place target ABIs" printf "%s\n" " -l FLEXLINKFLAGS: Options added to flexlink while building ocaml, ocamlc, etc. native Windows executables" diff --git a/src/r-c-ocaml-functions.sh b/src/r-c-ocaml-functions.sh index c1b0759..bf27972 100755 --- a/src/r-c-ocaml-functions.sh +++ b/src/r-c-ocaml-functions.sh @@ -16,7 +16,7 @@ # ---------------------------- # # @jonahbeckford: 2021-10-26 -# - This file is licensed differently than the rest of the Diskuv OCaml distribution. +# - This file is licensed differently than the rest of the DkML distribution. # Keep the Apache License in this file since this file is part of the reproducible # build files. #