@@ -47,9 +47,8 @@ default-format-flags = -m html:width 40em prefix = $(HOME)/.local bin-prefix = $(prefix)/bin -share-prefix = $(prefix)/share/$(executable) lua-standalone = $(if $(lua-lib-prefix),$(lua-lib-prefix)/liblua.a,-llua) lua-bindeps = -lm -ldl @@ -69,14 +68,16 @@ # equations by character class (e.g. italicizing variables) # this is not necessary for parsing the format, and can be # disabled by blanking the encoding-data list when building # ($ make encoding-data=) -encoding-data = ucstbls -encoding-files = $(patsubst %,$(build)/%.lc,$(encoding-data)) -encoding-data-ucs = https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt +encoding-data = 1 +encoding-data-ucs = $(build)/unicode.txt +encoding-data-ucs-url = https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt + +encoding-files = $(if $(encoding-data),$(build)/ucstbls.lc,) # "standalone" bytecode file that can be run directly as a script -$(build)/$(executable): $(build)/$(executable).ct +$(build)/$(executable): $(build)/$(executable).lc echo '#!$(lua)' > $@ cat $< >>$@ chmod +x $@ @@ -86,11 +87,11 @@ @echo ' ยป building with renderers $(rendrs-names)' $(luac) $(dbg-flags-luac) -o $@ $^ # true standalone binary, wraps bytecode file and (optionally) lua -$(build)/$(executable).bin: $(build)/$(executable).lc - $(lua) tools/makeshim.lua $< |\ - $(CC) -o$@ -xc - -xnone $(lua-standalone) $(lua-bindeps) +$(build)/$(executable).bin: $(build)/$(executable).lc tool/makeshim.lua + $(lua) tool/makeshim.lua $< |\ + $(CC) -s -o$@ -xc - -xnone $(lua-standalone) $(lua-bindeps) $(build)/cortav.html: cortav.ct $(build)/$(executable) | $(build)/ $(build)/$(executable) $< -o $@ -m render:format html -y html:fossil-uv @@ -121,11 +122,11 @@ %/: mkdir -p $@ $(build)/unicode.txt: | $(build)/ - curl $(encoding-data-ucs) > $@ -$(build)/ucstbls.lc: $(build)/unicode.txt tools/ucs.lua | $(build)/ - $(lua) tools/ucs.lua $< | $(luac) -o $@ - + curl $(encoding-data-ucs-url) > $@ +$(build)/ucstbls.lc: $(encoding-data-ucs) tool/ucs.lua | $(build)/ + $(lua) tool/ucs.lua $< | $(luac) -o $@ - .PHONY: install install: $(build)/cortav $(build)/cortav-view.sh $(build)/velartrill-cortav-view.desktop | $(bin-prefix)/ install $(build)/$(executable) $(bin-prefix)