Differences From
Artifact [10a67640c2]:
32 32 # doesn't accept options like -l -x -o then you'll have to build
33 33 # the binary by hand, sorry. but if you want to contribute a build
34 34 # script to the repository, i'll happily take merge requests :)
35 35
36 36 lua != which lua
37 37 luac != which luac
38 38 sh != which sh
39 +
40 +#sterilize the operating theatre
41 +lua += -E
39 42
40 43 extens = $(wildcard ext/*.lua)
41 44 extens-names ?= $(basename $(notdir $(extens)))
42 45 rendrs = $(wildcard render/*.lua)
43 46 rendrs-names ?= $(basename $(notdir $(rendrs)))
44 47 binds = $(wildcard bind/*.c)
45 48 binds-names ?= $(basename $(notdir $(binds)))
................................................................................
57 60 ifneq ($(filter net,$(binds-names)),)
58 61 lua-bindeps += -lcurl
59 62 endif
60 63
61 64 dbg-flags-luac = $(if $(debug),,-s)
62 65 dbg-flags-cc = $(if $(debug),-g,-s)
63 66
64 -# sterilize the operating theatre
65 -export LUA_PATH=./?.lua;./?.lc
66 -export LUA_PATH_5_3=./?.lc;./?.lua
67 -export LUA_PATH_5_4=./?.lc;./?.lua
68 -export LUA_INIT=
69 -export LUA_INIT_5_3=
70 -export LUA_INIT_5_4=
71 67
72 68 # by default, we fetch and parse information about encodings we
73 69 # support so that cortav can do fancy things like format math
74 70 # equations by character class (e.g. italicizing variables)
75 71 # this is not necessary for parsing the format, and can be
76 72 # disabled by blanking the encoding-data list when building
77 73 # ($ make encoding-data=)
................................................................................
107 103
108 104 .PHONY: syncdoc
109 105 syncdoc: $(build)/cortav.html
110 106 fossil uv add $< --as cortav.html
111 107 fossil uv sync --all
112 108
113 109 # clean is written in overly cautious fashion to minimize damage,
114 -# just in case it ever gets invoked in a bad way
110 +# just in case it ever gets invoked in a bad way (e.g. build=/)
115 111 .PHONY: clean
116 112 clean:
117 113 rm -f $(build)/*.{html,lc,sh,txt,desktop} \
118 - $(build)/$(executable){,.bin}
114 + $(build)/$(executable){,.bin} \
115 + $(build)/bind
119 116 rmdir $(build)
120 117
121 118 $(build)/%.sh: desk/%.sh | $(build)/
122 119 echo >$@ "#!$(sh)"
123 120 echo >>$@ 'cortav_exec="$(bin-prefix)/$(executable)"'
124 121 echo >>$@ 'cortav_flags="$${ct_format_flags-$(default-format-flags)}"'
125 122 cat $< >> $@