2008-01-23 21:42:25 +01:00
|
|
|
# $NetBSD: buildlink3.mk,v 1.21 2008/01/23 20:42:25 adam Exp $
|
2004-01-04 00:06:43 +01:00
|
|
|
|
|
|
|
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
|
|
|
|
OCAML_BUILDLINK3_MK:= ${OCAML_BUILDLINK3_MK}+
|
|
|
|
|
2004-01-05 00:34:04 +01:00
|
|
|
.if !empty(BUILDLINK_DEPTH:M+)
|
2004-01-04 00:06:43 +01:00
|
|
|
BUILDLINK_DEPENDS+= ocaml
|
|
|
|
.endif
|
|
|
|
|
2004-04-24 10:06:10 +02:00
|
|
|
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nocaml}
|
|
|
|
BUILDLINK_PACKAGES+= ocaml
|
2008-01-23 21:42:25 +01:00
|
|
|
|
2006-07-09 01:10:35 +02:00
|
|
|
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}ocaml
|
2004-03-05 20:25:06 +01:00
|
|
|
|
2004-01-05 00:34:04 +01:00
|
|
|
.if !empty(OCAML_BUILDLINK3_MK:M+)
|
2006-04-06 08:21:32 +02:00
|
|
|
BUILDLINK_API_DEPENDS.ocaml+= ocaml>=3.08.2
|
2006-05-20 11:10:51 +02:00
|
|
|
BUILDLINK_ABI_DEPENDS.ocaml+= ocaml>=3.09.1nb2
|
2004-01-05 00:34:04 +01:00
|
|
|
BUILDLINK_PKGSRCDIR.ocaml?= ../../lang/ocaml
|
2006-05-20 11:10:51 +02:00
|
|
|
BUILDLINK_DEPMETHOD.ocaml?= build
|
2004-04-24 16:45:15 +02:00
|
|
|
|
2006-12-12 22:52:34 +01:00
|
|
|
. include "../../mk/bsd.fast.prefs.mk"
|
2006-05-20 11:10:51 +02:00
|
|
|
. if ${OPSYS} == "Darwin"
|
2004-04-24 16:45:15 +02:00
|
|
|
INSTALL_UNSTRIPPED= yes
|
2006-05-20 11:10:51 +02:00
|
|
|
. endif
|
2004-04-24 16:45:15 +02:00
|
|
|
|
2004-12-04 21:31:29 +01:00
|
|
|
PRINT_PLIST_AWK+= /^@dirrm lib\/ocaml$$/ \
|
|
|
|
{ print "@comment in ocaml: " $$0; next }
|
|
|
|
|
2004-12-24 19:49:09 +01:00
|
|
|
BUILDLINK_TARGETS+= ocaml-wrappers
|
2006-01-27 20:03:16 +01:00
|
|
|
OCAML_WRAPPERS= ocamlc ocamlc.opt ocamlcp ocamlmklib ocamlmktop \
|
2004-12-24 19:49:09 +01:00
|
|
|
ocamlopt ocamlopt.opt
|
2006-01-27 20:03:16 +01:00
|
|
|
OCAMLBIN_WRAPPERS= ocaml
|
2004-12-24 19:49:09 +01:00
|
|
|
|
2006-02-02 21:47:26 +01:00
|
|
|
.PHONY: ocaml-wrappers
|
2004-12-24 19:49:09 +01:00
|
|
|
ocaml-wrappers:
|
2006-02-02 21:47:26 +01:00
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} set -e; \
|
|
|
|
for w in ${OCAML_WRAPPERS}; do \
|
2008-01-23 21:42:25 +01:00
|
|
|
${SED} -e 's|@SH@|'${SH:Q}'|g' \
|
2004-12-24 19:49:09 +01:00
|
|
|
-e 's|@OCAML_PREFIX@|${BUILDLINK_PREFIX.ocaml}|g' \
|
2006-05-20 11:10:51 +02:00
|
|
|
-e 's|@CFLAGS@|'${CFLAGS:Q}'|g' \
|
|
|
|
-e 's|@LDFLAGS@|'${LDFLAGS:Q}'|g' \
|
2008-01-23 21:42:25 +01:00
|
|
|
< ${.CURDIR}/../../lang/ocaml/files/wrapper.sh \
|
|
|
|
> ${BUILDLINK_DIR}/bin/"$$w"; \
|
|
|
|
${CHMOD} +x ${BUILDLINK_DIR}/bin/"$$w"; \
|
2004-12-24 19:49:09 +01:00
|
|
|
done
|
2006-02-02 21:47:26 +01:00
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} set -e; \
|
|
|
|
for w in ${OCAMLBIN_WRAPPERS}; do \
|
2008-01-23 21:42:25 +01:00
|
|
|
${LN} -s ${BUILDLINK_PREFIX.ocaml}/bin/"$$w" \
|
|
|
|
${BUILDLINK_DIR}/bin/"$$w"; \
|
2006-01-27 20:03:16 +01:00
|
|
|
done
|
2004-12-24 19:49:09 +01:00
|
|
|
|
2004-01-04 00:06:43 +01:00
|
|
|
.endif # OCAML_BUILDLINK3_MK
|
|
|
|
|
2006-02-02 21:47:26 +01:00
|
|
|
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
|