From a9bfe650038afea8b751175cac16f6027345e45f Mon Sep 17 00:00:00 2001 From: Nicholas Date: Sat, 20 Nov 2021 10:53:19 -0800 Subject: Chore: reorganize libutf and libfmt into base I found the split to be arbitrary. Better to include the functionality in the standard library. I also split the headers to allow for more granular inclusion (but the library is still monolithic). The only ugliness is the circular dependency introduced with libutf's generated functions. We put explicit prereqs with the necessary object files instead. --- src/libutf/rules.mk | 76 ----------------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 src/libutf/rules.mk (limited to 'src/libutf/rules.mk') diff --git a/src/libutf/rules.mk b/src/libutf/rules.mk deleted file mode 100644 index aeb86b2..0000000 --- a/src/libutf/rules.mk +++ /dev/null @@ -1,76 +0,0 @@ -include share/push.mk - -UNICODE=14.0.0 - -SRCS_$(d):=\ - $(d)/encode.c\ - $(d)/decode.c\ - $(d)/decodeprev.c\ - $(d)/find.c\ - $(d)/findlast.c\ - $(d)/canfit.c\ - $(d)/runelen.c\ - $(d)/len.c\ - $(d)/runetype-$(UNICODE).c\ - $(d)/runewidth-$(UNICODE).c - -LIBS_$(d):=$(d)/libutf.a - -include share/paths.mk - -# ======================================================================== -# table generation - -$(d)/vendor/common.o: $(d)/vendor/common.c - $(COMPILE) - -# rune categories -$(d)/vendor/UnicodeData-$(UNICODE).txt: - @echo "GET UnicodeData.txt";\ - curl https://www.unicode.org/Public/$(UNICODE)/ucd/UnicodeData.txt > $@ - -$(d)/vendor/mkrunetype: $(d)/vendor/mkrunetype.c $(d)/vendor/common.o $(OBJ_DIR)/base/base.a - $(COMPLINK) - -GENS += $(d)/vendor/mkrunetype - -$(d)/runetype-$(UNICODE).c: $(d)/vendor/UnicodeData-$(UNICODE).txt $(d)/vendor/mkrunetype - @$(dir $@)vendor/mkrunetype $< > $@ - -# rune widths -$(d)/vendor/EastAsianWidth-$(UNICODE).txt: - @echo "GET EastAsianWidth.txt";\ - curl https://www.unicode.org/Public/$(UNICODE)/ucd/EastAsianWidth.txt > $@ - -$(d)/vendor/EmojiData-$(UNICODE).txt: - @echo "GET EmojiData.txt";\ - curl https://www.unicode.org/Public/$(UNICODE)/ucd/emoji/emoji-data.txt > $@ - -$(d)/vendor/mkrunewidth: $(d)/vendor/mkrunewidth.c $(d)/vendor/common.o $(OBJ_DIR)/base/base.a - $(COMPLINK) - -GENS += $(d)/vendor/mkrunewidth - -$(d)/runewidth-$(UNICODE).c: $(d)/vendor/mkrunewidth $(d)/vendor/UnicodeData-$(UNICODE).txt $(d)/vendor/EastAsianWidth-$(UNICODE).txt $(d)/vendor/EmojiData-$(UNICODE).txt - @$(dir $@)vendor/mkrunewidth $(filter-out $<, $^) > $@ - -# grapheme boundaries -$(d)/vendor/GraphemeBreakProperty-$(UNICODE).txt: - @echo "GET GraphemeBreakProperty.txt";\ - curl https://www.unicode.org/Public/$(UNICODE)/ucd/auxiliary/GraphemeBreakProperty.txt > $@ - -$(d)/vendor/mkgraphemedata: $(d)/vendor/mkgraphemedata.c $(d)/vendor/common.o $(OBJ_DIR)/base/base.a - $(COMPLINK) - -$(d)/graphemedata-$(UNICODE).c: $(d)/vendor/mkgraphemedata $(d)/vendor/GraphemeBreakProperty-$(UNICODE).txt - $^ > $@ - -GENS += $(d)/vendor/mkgraphemedata - -# ======================================================================== -# normal operations - -$(LIBS_$(d)): $(OBJS_$(d)) - $(ARCHIVE) - -include share/pop.mk -- cgit v1.2.1