tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Cryptic idiom
It selects the first word in TOOLS_PLATFORM.${_t_} in the case that it
is
a sequence of words.
Was that from before bmake learned :[1]?
What makes me want to write:
```
. elif defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
#####
##### For each system-supplied tool, break the tool down into a path
##### and arguments so that either a symlink or a wrapper will be
##### properly created.
#####
TOOLS_CREATE+= ${_t_}
TOOLS_PATH.${_t_}?= \
${TOOLS_PLATFORM.${_t_}:[1]}
TOOLS_ARGS.${_t_}?= \
${TOOLS_PLATFORM.${_t_}:[2..-1]}
. endif
```
But it seems to work as expected only if there are several words in
TOOLS_PLATFORM.${_t_}. In case where TOOLS_PLATFORM.bash would contain
/bin/bash, both TOOLS_PATH.bash and TOOLS_ARGS.bash are /bin/bash while
TOOLS_ARGS.bash should be empty.
To me, it looks like a bug. But I wonder if this isn't the expected
behavior according to bmake(1):
If start is greater than end, the words are output in reverse order.
Home |
Main Index |
Thread Index |
Old Index