| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: pbulk-index.mk,v 1.11 2010/09/28 20:24:25 joerg Exp $ | | 1 | # $NetBSD: pbulk-index.mk,v 1.12 2011/09/25 19:51:47 joerg Exp $ |
2 | | | 2 | |
3 | # This Makefile fragment is included by bsd.pkg.mk and provides all | | 3 | # This Makefile fragment is included by bsd.pkg.mk and provides all |
4 | # variables and targets related to the parallel bulk build | | 4 | # variables and targets related to the parallel bulk build |
5 | # tree-scanning code. | | 5 | # tree-scanning code. |
6 | # | | 6 | # |
7 | # The following are the "public" targets provided by this module: | | 7 | # The following are the "public" targets provided by this module: |
8 | # | | 8 | # |
9 | # pbulk-index | | 9 | # pbulk-index |
10 | # pbulk-index-item | | 10 | # pbulk-index-item |
11 | | | 11 | |
12 | # | | 12 | # |
13 | # _PBULK_MULTI lists the multi-package variable. | | 13 | # _PBULK_MULTI lists the multi-package variable. |
14 | # For each class the following variables are provided: | | 14 | # For each class the following variables are provided: |
| @@ -35,31 +35,34 @@ _PBULK_MULTI_VAR.ruby= RUBY_VERSION_REQ | | | @@ -35,31 +35,34 @@ _PBULK_MULTI_VAR.ruby= RUBY_VERSION_REQ |
35 | _PBULK_MULTI_DEFAULT.ruby= _RUBY_VERSION_DEFAULT | | 35 | _PBULK_MULTI_DEFAULT.ruby= _RUBY_VERSION_DEFAULT |
36 | | | 36 | |
37 | .PHONY: pbulk-index pbulk-index-item | | 37 | .PHONY: pbulk-index pbulk-index-item |
38 | | | 38 | |
39 | # Find all classes with more than one supported setting. | | 39 | # Find all classes with more than one supported setting. |
40 | # Undefined list variables are handled like a single default value, | | 40 | # Undefined list variables are handled like a single default value, |
41 | # empty list variables are checked afterwards. | | 41 | # empty list variables are checked afterwards. |
42 | # | | 42 | # |
43 | # For each such class, reorder the supported values to list | | 43 | # For each such class, reorder the supported values to list |
44 | # the default value first. This is important for packages that | | 44 | # the default value first. This is important for packages that |
45 | # don't follow the module naming conventions. | | 45 | # don't follow the module naming conventions. |
46 | | | 46 | |
47 | .for _t in ${_PBULK_MULTI} | | 47 | .for _t in ${_PBULK_MULTI} |
48 | . if ${${_PBULK_MULTI_LIST.${_t}}:Unone:[\#]} != 1 && !empty(${_PBULK_MULTI_LIST.${_t}}) | | 48 | . if defined(${_PBULK_MULTI_LIST.${_t}}) && !empty(${_PBULK_MULTI_LIST.${_t}}) |
| | | 49 | . if ${${_PBULK_MULTI_LIST.${_t}}:[\#]} != 1 || \ |
| | | 50 | !empty(${_PBULK_MULTI_LIST.${_t}}:N${_PBULK_MULTI_DEFAULT.${_t}}) |
49 | _PBULK_MULTI_NEEDED:= ${_t} ${_PBULK_MULTI_NEEDED} | | 51 | _PBULK_MULTI_NEEDED:= ${_t} ${_PBULK_MULTI_NEEDED} |
50 | _PBULK_SORTED_LIST.${_t}:= \ | | 52 | _PBULK_SORTED_LIST.${_t}:= \ |
51 | ${${_PBULK_MULTI_LIST.${_t}}:M${${_PBULK_MULTI_DEFAULT.${_t}}}} \ | | 53 | ${${_PBULK_MULTI_LIST.${_t}}:M${${_PBULK_MULTI_DEFAULT.${_t}}}} \ |
52 | ${${_PBULK_MULTI_LIST.${_t}}:N${${_PBULK_MULTI_DEFAULT.${_t}}}} | | 54 | ${${_PBULK_MULTI_LIST.${_t}}:N${${_PBULK_MULTI_DEFAULT.${_t}}}} |
| | | 55 | . endif |
53 | . endif | | 56 | . endif |
54 | .endfor | | 57 | .endfor |
55 | | | 58 | |
56 | .if !defined(_PBULK_MULTI_NEEDED) | | 59 | .if !defined(_PBULK_MULTI_NEEDED) |
57 | # No multi-package handling needed, directly print the item. | | 60 | # No multi-package handling needed, directly print the item. |
58 | pbulk-index: pbulk-index-item | | 61 | pbulk-index: pbulk-index-item |
59 | .else | | 62 | .else |
60 | # | | 63 | # |
61 | # Use an ODE for loop to compute the carthesian product of | | 64 | # Use an ODE for loop to compute the carthesian product of |
62 | # the support settings. This expands to something like | | 65 | # the support settings. This expands to something like |
63 | # | | 66 | # |
64 | # for apache in apache13 apache2; do \ | | 67 | # for apache in apache13 apache2; do \ |
65 | # _PBULK_MULTI_VALUE.apache=$apache; \ | | 68 | # _PBULK_MULTI_VALUE.apache=$apache; \ |