File: 0001-Fix-detection-of-native-architectures.patch

package info (click to toggle)
ocaml-num 1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 568 kB
  • sloc: ml: 4,481; ansic: 1,415; makefile: 173; sh: 13
file content (44 lines) | stat: -rw-r--r-- 1,171 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Stephane Glondu <steph@glondu.net>
Date: Thu, 20 Jan 2022 05:53:28 +0100
Subject: Fix detection of native architectures

---
 src/Makefile  | 4 ++--
 test/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 8ad0e2c..715fa8b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -33,7 +33,7 @@ COBJS=bng.$(O) nat_stubs.$(O)
 
 all:: libnums.$(A) nums.cma
 
-ifneq "$(ARCH)" "none"
+ifneq "$(shell command -v $(OCAMLOPT))" ""
 all:: nums.cmxa
 endif
 
@@ -71,7 +71,7 @@ nat_stubs.$(O): bng.h nat.h
 # is installed via findlib
 
 TOINSTALL=nums.cma libnums.$(A) $(CMIS) $(CMIS:.cmi=.mli) $(CMIS:.cmi=.cmti)
-ifneq "$(ARCH)" "none"
+ifneq "$(shell command -v $(OCAMLOPT))" ""
 TOINSTALL+=nums.cmxa nums.$(A) $(CMXS)
 endif
 ifeq "$(NATDYNLINK)" "true"
diff --git a/test/Makefile b/test/Makefile
index 6d7e8d8..43c3db5 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -13,7 +13,7 @@ all:: test.byt
 	@echo "----- Testing in bytecode..."
 	$(OCAMLRUN) -I ../src ./test.byt
 
-ifneq "$(ARCH)" "none"
+ifneq "$(shell command -v $(OCAMLOPT))" ""
 all:: test.exe
 	@echo "----- Testing in native code..."
 	./test.exe