Correct conditional to correctly treat segments which end on a boundary.
[dragonfly.git] / contrib / sendmail-8.13.8 / devtools / M4 / list.m4
1 divert(-1)
2 #
3 # Copyright (c) 1999 Sendmail, Inc. and its suppliers.
4 #       All rights reserved.
5 #
6 # By using this file, you agree to the terms and conditions set
7 # forth in the LICENSE file which can be found at the top level of
8 # the sendmail distribution.
9 #
10 #
11 #  Definitions for Makefile construction for sendmail
12 #
13 #       $Id: list.m4,v 8.3 1999/07/15 22:46:05 rand Exp $
14 #
15 divert(0)dnl
16 define(`bldLIST_PUSH_ITEM',
17 `define(`$1', ifdef(`$1', `$1 $2 ', `$2 '))'
18 )dnl
19 define(`bldFOREACH',
20 `$1substr($2, `0', index($2, ` ')))`'ifelse(index($2, ` '), eval(len($2)-1),  , `bldFOREACH(`$1', substr($2, index($2, ` ')))')'dnl
21 )dnl 
22
23 define(`bldADD_PATH', `$1/$2 ')dnl
24 define(`bldADD_PATHS',
25 `bldFOREACH(`bldADD_PATH(`$1',', $2)'dnl
26 )dnl