</$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=runetables.h\
runefold.h\
runeunfold.h\
runecompose.h\
L=unicode\
E=type\
compose\
fold\
unfold\
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 $L
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
rune%.h:D: $O.uconv %.rc
$stem.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
|