Merge from vendor branch TEXINFO:
[dragonfly.git] / share / i18n / esdb / Makefile.part
1 # $DragonFly: src/share/i18n/esdb/Makefile.part,v 1.1 2005/03/10 16:19:55 joerg Exp $
2
3 .for code in ${CODE}  # XXX: immediately expand ${CODE}
4
5 PARTFILE_${code}?=      ${.CURDIR}/${code}/${code}.part
6 ALIASFILE_${code}?=     ${.CURDIR}/${code}/${code}.alias
7 SEP_${code}?=           -
8 SUBDIR_${code}?=        ${code}
9 ${code}_PART!=          sed '/^\#/d;/^ *$$/d' ${PARTFILE_${code}}
10 CODESETS_${code}?=      ${${code}_PART:C/^/${code}${SEP_${code}}/}
11 ESDB_${code}?=          ${CODESETS_${code}:C/$/.esdb/:S/:/@/}
12
13 FILES+=         ${ESDB_${code}}
14 CLEANFILES+=    ${ESDB_${code}}
15 .for i in ${ESDB_${code}}
16 FILESDIR_$i?=   ${BINDIR}/${SUBDIR_${code}}
17 .endfor
18
19 # ----------------------------------------------------------------------
20 # esdb.dir
21 #
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}
32
33 # ----------------------------------------------------------------------
34 # esdb.alias
35 #
36 .for i in ${${code}_PART:S/:/@/}
37 ${code}_$i_aliases!= \
38         sed '/^\#/d;/^ *$$/d;/^${i:S/@/:/}[     ]/!d;;s/^[^     ]*[     ]*//' \
39                 ${ALIASFILE_${code}}
40 .endfor
41 esdb.alias.${code}: ${PARTFILE_${code}} ${ALIASFILE_${code}}
42         ${_MKTARGET_CREATE}
43         echo "# ${code}" > $@
44 .for i in ${${code}_PART:S/:/@/}
45 .for j in ${${code}_$i_aliases}
46         printf "%-32s%s\n" "$j" "${code}${SEP_${code}}${i:S/@/:/}" >> $@
47 .endfor
48 .endfor
49         echo >> $@
50 SRC_esdb.alias+=esdb.alias.${code}
51 CLEANFILES+=    esdb.alias.${code}
52
53 .endfor # code