| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: module.mk,v 1.2 2016/07/20 11:58:40 nros Exp $ | | 1 | # $NetBSD: module.mk,v 1.3 2022/10/20 10:14:01 nros Exp $ |
2 | # | | 2 | # |
3 | # This file should be included in the makefile of packages that install | | 3 | # This file should be included in the makefile of packages that install |
4 | # Qore modules. | | 4 | # Qore modules. |
5 | # | | 5 | # |
6 | # PLIST variables: | | 6 | # PLIST variables: |
7 | # | | 7 | # |
8 | # QORE_VERSION To be used by packages that install files in | | 8 | # QORE_VERSION To be used by packages that install files in |
9 | # ${QORE_MODULE_DIR}/${QORE_VERSION}/ | | 9 | # ${QORE_MODULE_DIR}/${QORE_VERSION}/ |
10 | # | | 10 | # |
11 | # QORE_MODULE_API This should be used by packages that install | | 11 | # QORE_MODULE_API This should be used by packages that install |
12 | # modules that uses the compatible module api | | 12 | # modules that uses the compatible module api |
13 | # version. | | 13 | # version. |
14 | # | | 14 | # |
| @@ -27,13 +27,16 @@ | | | @@ -27,13 +27,16 @@ |
27 | # | | 27 | # |
28 | | | 28 | |
29 | qore-module: post-install .PHONY | | 29 | qore-module: post-install .PHONY |
30 | qore-version=qore --short-version | ${SED} -e s/-.*// | | 30 | qore-version=qore --short-version | ${SED} -e s/-.*// |
31 | qore-module-api=qore --module-api | | 31 | qore-module-api=qore --module-api |
32 | qore-module-dir=qore --module-dir | | 32 | qore-module-dir=qore --module-dir |
33 | qore-latest-module-api=qore --latest-module-api | | 33 | qore-latest-module-api=qore --latest-module-api |
34 | qore-user-module-dir=qore --user-module-dir | | 34 | qore-user-module-dir=qore --user-module-dir |
35 | PLIST_SUBST+=QORE_VERSION="${qore-version:sh}" | | 35 | PLIST_SUBST+=QORE_VERSION="${qore-version:sh}" |
36 | PLIST_SUBST+=QORE_MODULE_API="${qore-module-api:sh}" | | 36 | PLIST_SUBST+=QORE_MODULE_API="${qore-module-api:sh}" |
37 | PLIST_SUBST+=QORE_MODULE_DIR="${qore-module-dir:sh:C,^${PREFIX}/,,W}" | | 37 | PLIST_SUBST+=QORE_MODULE_DIR="${qore-module-dir:sh:C,^${PREFIX}/,,W}" |
38 | PLIST_SUBST+=QORE_LATEST_MODULE_API="${qore-latest-module-api:sh}" | | 38 | PLIST_SUBST+=QORE_LATEST_MODULE_API="${qore-latest-module-api:sh}" |
39 | PLIST_SUBST+=QORE_USER_MODULE_DIR="${qore-user-module-dir:sh:C,^${PREFIX}/,,W}" | | 39 | PLIST_SUBST+=QORE_USER_MODULE_DIR="${qore-user-module-dir:sh:C,^${PREFIX}/,,W}" |
| | | 40 | PRINT_PLIST_AWK+= { gsub("^${qore-module-dir:sh:C,^${PREFIX}/,,W}", "$${QORE_MODULE_DIR}"); } |
| | | 41 | PRINT_PLIST_AWK+= { gsub("^${qore-user-module-dir:sh:C,^${PREFIX}/,,W}", "$${QORE_USER_MODULE_DIR}"); } |
| | | 42 | PRINT_PLIST_AWK+= /.*\.qmod$$/ { gsub("${qore-latest-module-api:sh}", "$${QORE_LATEST_MODULE_API}"); } |