</$objtype/mkfile
rune20bit='^[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]?[0-9A-F]?;'
rune16bit='^[0-9A-F][0-9A-F][0-9A-F][0-9A-F];'
rune=`{mkrunesize}
url=http://www.unicode.org/Public/UNIDATA/
uconv=$O.uconv
CLIB=/sys/src/libc/port
ULIB=/lib
BIN=/$objtype/bin
H=utftables.h\
utffold.h\
utfunfold.h\
L=unicode\
E=trunetype\
HELPER=uconv\
EXTRA=${E:%=$O.$E}
UTFFILES=unicodedata\
valuealiases\
default:V: $H $HELPER $EXTRA
all:V: $H $HELPER $EXTRA
install:V: ${H:%=$CLIB/%} $CLIB/runetype.c $ULIB/unicode $BIN/$TARG
$ULIB/%: %
cp $newprereq $ULIB
$CLIB/%: %
cp $newprereq $CLIB
$BIN/%: $O.%
cp $newprereq $target
#</sys/src/cmd/mkone
%: $O.%
cp $O.$stem $stem
%.$O: $HFILES # don't combine with following %.$O rules
%.$O: %.c
$CC $CFLAGS $stem.c
$O.%: %.$O $OFILES $LIB
$LD $LDFLAGS -o $target $prereq
nuke:V: clean
rm -f $UTFFILES
clean:V:
rm -f *.[$OS] [$OS].^(out $HELPER $E) y.tab.? lex.yy.c y.debug y.output $TARG $CLEANFILES
#</sys/src/cmd/mkone
uconv: $UTFFILES
$H: $HELPER
${E:%=%.$O}: $H $HELPER
utftables.h:D: $BIN/uconv case.rc
case.rc unicodedata > $target
utffold.h:D: $BIN/uconv fold.rc
fold.rc unicodedata > $target
utfunfold.h:D: $BIN/uconv unfold.rc
unfold.rc unicodedata > $target
unicode:D: unicode.rc unicodedata
unicode.rc unicodedata
unicodedata:
hget $url/UnicodeData.txt>$target
valuealiases:
hget $url/PropertyValueAliases.txt>$target
CLEANFILES=$H $HELPER
|