Skip to content

Commit 387b258

Browse files
committed
Fix Makefile to support nix and non-nix install
1 parent e355a8e commit 387b258

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
undefine COQPATH
2-
PREFIX=${out}
1+
ifeq (3.82,$(firstword $(sort $(MAKE_VERSION) 3.82)))
2+
# stuff that requires make-3.82 or higher
3+
undefine COQPATH
4+
endif
5+
ifdef out
6+
PREFIX=${out}
7+
INSTALLOPT="--prefix=${PREFIX} --libdir ${OCAMLFIND_DESTDIR}"
8+
endif
39

410
all: rocq extraction_plugin extraction_ocaml_ffi plugin bootstrap
511

@@ -16,8 +22,8 @@ install: install-rocq plugin
1622

1723
install-rocq: Makefile.rocq rocq
1824
+$(MAKE) -f Makefile.rocq install
19-
cd lib/rocq_verified_extraction_ocaml_ffi && dune install --prefix=${PREFIX} --libdir ${OCAMLFIND_DESTDIR}
20-
cd lib/rocq_verified_extraction_plugin && dune install --prefix=${PREFIX} --libdir ${OCAMLFIND_DESTDIR}
25+
cd lib/rocq_verified_extraction_ocaml_ffi && dune install ${INSTALLOPT}
26+
cd lib/rocq_verified_extraction_plugin && dune install ${INSTALLOPT}
2127
cd plugin/plugin && $(MAKE) -f Makefile.rocq install
2228
cd plugin/plugin-bootstrap && $(MAKE) -f Makefile.rocq install
2329

0 commit comments

Comments
 (0)