Expand PMF_FN_* macros.
[netbsd-mini2440.git] / share / i18n / esdb / Makefile.part
blob5599e9c6afb3c46309be3e3e05b76ddf2944e816
1 # $NetBSD: Makefile.part,v 1.5 2008/07/23 13:44:02 tnozaki Exp $
3 .for code in ${CODE}  # XXX: immediately expand ${CODE}
5 PARTFILE_${code}?=      ${.CURDIR}/${code}/${code}.part
6 ALIASFILE_${code}?=     ${.CURDIR}/${code}/${code}.alias
7 SEP_${code}?=           -
8 SUBDIR_${code}?=        ${code}
9 ${code}_PART!=          ${TOOL_SED} '/^\#/d;/^ *$$/d' ${PARTFILE_${code}}
10 CODESETS_${code}?=      ${${code}_PART:C/^/${code}${SEP_${code}}/}
11 ESDB_${code}?=          ${CODESETS_${code}:C/$/.esdb/:S/:/@/}
13 FILES+=         ${ESDB_${code}}
14 CLEANFILES+=    ${ESDB_${code}}
15 .for i in ${ESDB_${code}}
16 FILESDIR_$i?=   ${BINDIR}/${SUBDIR_${code}}
17 .endfor
19 # ----------------------------------------------------------------------
20 # esdb.dir
22 esdb.dir.${code}: ${PARTFILE_${code}}
23         ${_MKTARGET_CREATE}
24         echo "# ${code}" > $@
25 .for i in ${${code}_PART}
26         printf "%-32s%s\n" "${code}${SEP_${code}}$i" \
27                 "${SUBDIR_${code}}/${code}${SEP_${code}}${i:S/:/@/}.esdb" >> $@
28 .endfor
29         echo >> $@
30 SRC_esdb.dir+=  esdb.dir.${code}
31 CLEANFILES+=    esdb.dir.${code}
33 # ----------------------------------------------------------------------
34 # esdb.alias
36 .for i in ${${code}_PART:S/:/@/}
37 ${code}_$i_aliases!= echo \
38         `${TOOL_SED} \
39             '/^\#/d;/^ *$$/d;/^${i:S/@/:/}[     ]/!d;s/^[^      ]*[     ]*//' \
40                 ${ALIASFILE_${code}}`
41 .endfor
42 esdb.alias.${code}: ${PARTFILE_${code}} ${ALIASFILE_${code}}
43         ${_MKTARGET_CREATE}
44         echo "# ${code}" > $@
45 .for i in ${${code}_PART:S/:/@/}
46 .for j in ${${code}_$i_aliases}
47         printf "%-32s%s\n" "$j" "${code}${SEP_${code}}${i:S/@/:/}" >> $@
48 .endfor
49 .endfor
50         echo >> $@
51 SRC_esdb.alias+=esdb.alias.${code}
52 CLEANFILES+=    esdb.alias.${code}
54 .endfor # code