| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: ocaml.mk,v 1.3 2014/10/27 11:58:36 jaapb Exp $ | | 1 | # $NetBSD: ocaml.mk,v 1.4 2015/04/20 02:36:05 hiramatsu Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment handles the common variables used by OCaml packages. | | 3 | # This Makefile fragment handles the common variables used by OCaml packages. |
4 | # | | 4 | # |
5 | # Build def variables: | | 5 | # Build def variables: |
6 | # OCAML_USE_OPT_COMPILER | | 6 | # OCAML_USE_OPT_COMPILER |
7 | # if set to yes, will enable optimised (native code) compilation | | 7 | # if set to yes, will enable optimised (native code) compilation |
8 | # default value: depends on architecture | | 8 | # default value: depends on architecture |
9 | # | | 9 | # |
10 | # PLIST variable: | | 10 | # PLIST variable: |
11 | # PLIST.ocaml-opt for files only installed when using the optimised compiler | | 11 | # PLIST.ocaml-opt for files only installed when using the optimised compiler |
12 | # Set based on OCAML_USE_OPT_COMPILER | | 12 | # Set based on OCAML_USE_OPT_COMPILER |
13 | # | | 13 | # |
14 | # Package-settable variables: | | 14 | # Package-settable variables: |
| @@ -75,26 +75,30 @@ CONFIGURE_ARGS+= --prefix "${PREFIX}" | | | @@ -75,26 +75,30 @@ CONFIGURE_ARGS+= --prefix "${PREFIX}" |
75 | # Force use of native code compiler according to setting | | 75 | # Force use of native code compiler according to setting |
76 | .if ${OCAML_USE_OPT_COMPILER} == "yes" | | 76 | .if ${OCAML_USE_OPT_COMPILER} == "yes" |
77 | CONFIGURE_ARGS+= --override is_native true | | 77 | CONFIGURE_ARGS+= --override is_native true |
78 | .else | | 78 | .else |
79 | CONFIGURE_ARGS+= --override is_native false | | 79 | CONFIGURE_ARGS+= --override is_native false |
80 | .endif | | 80 | .endif |
81 | .endif | | 81 | .endif |
82 | | | 82 | |
83 | # Value for OCAML_SITELIBDIR | | 83 | # Value for OCAML_SITELIBDIR |
84 | OCAML_SITELIBDIR= lib/ocaml/site-lib | | 84 | OCAML_SITELIBDIR= lib/ocaml/site-lib |
85 | MAKE_ENV+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" | | 85 | MAKE_ENV+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" |
86 | PLIST_SUBST+= OCAML_SITELIB="${OCAML_SITELIBDIR}" | | 86 | PLIST_SUBST+= OCAML_SITELIB="${OCAML_SITELIBDIR}" |
87 | | | 87 | |
| | | 88 | PRINT_PLIST_AWK+= { gsub(/${OCAML_SITELIBDIR:S|/|\\/|g}/, \ |
| | | 89 | "$${OCAML_SITELIB}"); \ |
| | | 90 | print; next; } |
| | | 91 | |
88 | .if ${OCAML_USE_FINDLIB} == "yes" | | 92 | .if ${OCAML_USE_FINDLIB} == "yes" |
89 | .include "../../devel/ocaml-findlib/buildlink3.mk" | | 93 | .include "../../devel/ocaml-findlib/buildlink3.mk" |
90 | INSTALLATION_DIRS+= ${OCAML_SITELIBDIR} | | 94 | INSTALLATION_DIRS+= ${OCAML_SITELIBDIR} |
91 | .endif | | 95 | .endif |
92 | | | 96 | |
93 | # | | 97 | # |
94 | # Compiler stuff | | 98 | # Compiler stuff |
95 | # | | 99 | # |
96 | | | 100 | |
97 | # Things that get installed with the opt compiler | | 101 | # Things that get installed with the opt compiler |
98 | PLIST_VARS+= ocaml-opt | | 102 | PLIST_VARS+= ocaml-opt |
99 | | | 103 | |
100 | .if ${OCAML_USE_OPT_COMPILER} == "yes" | | 104 | .if ${OCAML_USE_OPT_COMPILER} == "yes" |