blob: aaf36e870e02c1fded9029d6e1cef293905e0f5c (
plain)
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
45
46
47
|
# $NetBSD: buildlink3.mk,v 1.50 2019/05/14 15:34:16 jaapb Exp $
BUILDLINK_TREE+= ocaml
.if !defined(OCAML_BUILDLINK3_MK)
OCAML_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.ocaml+= ocaml>=4.07.0
BUILDLINK_ABI_DEPENDS.ocaml+= ocaml>=4.07.1nb2
BUILDLINK_PKGSRCDIR.ocaml?= ../../lang/ocaml
#BUILDLINK_DEPMETHOD.ocaml?= build
BUILDLINK_PASSTHRU_DIRS+= ${BUILDLINK_PREFIX.ocaml}/lib/ocaml
.include "../../mk/ocaml.mk"
BUILDLINK_TARGETS+= ocaml-wrappers
OCAML_WRAPPERS= ocamlc ocamlcp ocamlmklib ocamlmktop
.if ${OCAML_USE_OPT_COMPILER} == "yes"
OCAML_WRAPPERS+= ocamlc.opt ocamlopt ocamlopt.opt
.endif
OCAMLBIN_WRAPPERS= ocaml ocamldep ocamllex ocamlyacc
.PHONY: ocaml-wrappers
ocaml-wrappers:
${RUN} \
for w in ${OCAML_WRAPPERS}; do \
${SED} -e 's|@SH@|'${SH:Q}'|g' \
-e 's|@OCAML_PREFIX@|${BUILDLINK_PREFIX.ocaml}|g' \
-e 's|@CFLAGS@|'${CFLAGS:M*:Q}'|g' \
-e 's|@LDFLAGS@|'${LDFLAGS:M*:Q}'|g' \
-e 's|@WRAPPEE@|'$$w'|g' \
< ${.CURDIR}/../../lang/ocaml/files/wrapper.sh \
> ${BUILDLINK_DIR}/bin/"$$w"; \
${CHMOD} +x ${BUILDLINK_DIR}/bin/"$$w"; \
done
${RUN} \
for w in ${OCAMLBIN_WRAPPERS}; do \
${LN} -s ${BUILDLINK_PREFIX.ocaml}/bin/"$$w" \
${BUILDLINK_DIR}/bin/"$$w"; \
done
.include "../../mk/termcap.buildlink3.mk"
.endif # OCAML_BUILDLINK3_MK
BUILDLINK_TREE+= -ocaml
|