nixpkgs/pkgs/development/tools/ocaml/ocamlscript/Makefile.patch
Vincent Laporte 16150e1f1e ocamlscript: new derivation
Ocamlscript compiles scripts, i.e. one-file programs, into
natively-compiled binaries, and executes them.

Homepage: http://mjambon.com/ocamlscript.html
2014-11-02 21:41:24 +00:00

25 lines
799 B
Diff

--- a/Makefile 2012-02-04 01:24:21.000000000 +0000
+++ b/Makefile 2014-10-29 14:42:08.690188302 +0000
@@ -4,6 +4,8 @@
version.ml pipeline.mli pipeline.ml common.mli common.ml \
utils.mli utils.ml ocaml.mli ocaml.ml
+CAMLP4 := $(shell ocamlfind query camlp4)
+
STDBIN = $(shell dirname `which ocamlfind`)
ifndef PREFIX
PREFIX = $(shell dirname $(STDBIN))
@@ -36,11 +38,11 @@
common: version.ml
ocamlc -pp 'camlp4orf -loc _loc' -c \
- -I +camlp4 pa_opt310.ml && \
+ -I $(CAMLP4) pa_opt310.ml && \
cp pa_opt310.cmo pa_opt.cmo && \
cp pa_opt310.cmi pa_opt.cmi
ocamlc -pp 'camlp4orf -loc _loc' -c \
- -I +camlp4 pa_tryfinally310.ml && \
+ -I $(CAMLP4) pa_tryfinally310.ml && \
cp pa_tryfinally310.cmo pa_tryfinally.cmo && \
cp pa_tryfinally310.cmi pa_tryfinally.cmi