cortav  Diff

Differences From Artifact [8d3e37cc0b]:

To Artifact [c76cdbdd22]:


85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117




118
119
120
121
122
123
124
	cat $< >>$@
	chmod +x $@

# raw bytecode without shebang header, must be run as `lua cortav.lc`
$(build)/$(executable).lc: sirsem.lua $(encoding-files) cortav.lua $(rendrs) $(extens) cli.lua | $(build)/
	@echo ' » building with extensions $(extens-names)'
	@echo ' » building with renderers $(rendrs-names)'
	$(call comp-lua,$^,$@)

# true standalone binary, wraps bytecode file and (optionally) lua
$(build)/$(executable).bin: $(build)/$(executable).lc tool/makeshim.lua $(binds)
	$(lua) tool/makeshim.lua $< "" $(binds-names) |\
		$(CC) -s -o$@ -xc - -xnone $(binds) $(lua-standalone) $(lua-bindeps)

# loadable lua modules for binds, mainly useful for testing
................................................................................
	$(build)/$(executable) $< -o $@ -m render:format html -y html:fossil-uv

.PHONY: syncdoc
syncdoc: $(build)/cortav.html
	fossil uv add $< --as cortav.html
	fossil uv sync --all

# clean is written in overly cautious fashion to minimize damage,
# just in case it ever gets invoked in a bad way (e.g. build=/)
.PHONY: clean
clean:
	rm -f $(build)/*.{html,lc,sh,txt,desktop} \
	      $(build)/$(executable){,.bin} \
	      $(build)/bind




	rmdir $(build)

$(build)/%.sh: desk/%.sh | $(build)/
	echo >$@ "#!$(sh)"
	echo >>$@ 'cortav_exec="$(bin-prefix)/$(executable)"'
	echo >>$@ 'cortav_flags="$${ct_format_flags-$(default-format-flags)}"'
	cat $< >> $@







|







 







|
|


|
|
|
>
>
>
>







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
	cat $< >>$@
	chmod +x $@

# raw bytecode without shebang header, must be run as `lua cortav.lc`
$(build)/$(executable).lc: sirsem.lua $(encoding-files) cortav.lua $(rendrs) $(extens) cli.lua | $(build)/
	@echo ' » building with extensions $(extens-names)'
	@echo ' » building with renderers $(rendrs-names)'
	$(if $(debug),echo "require'sirsem'._debug=1" | $(call comp-lua,sirsem.lua - $(filter-out sirsem.lua,$^),$@),$(call comp-lua,$^,$@))

# true standalone binary, wraps bytecode file and (optionally) lua
$(build)/$(executable).bin: $(build)/$(executable).lc tool/makeshim.lua $(binds)
	$(lua) tool/makeshim.lua $< "" $(binds-names) |\
		$(CC) -s -o$@ -xc - -xnone $(binds) $(lua-standalone) $(lua-bindeps)

# loadable lua modules for binds, mainly useful for testing
................................................................................
	$(build)/$(executable) $< -o $@ -m render:format html -y html:fossil-uv

.PHONY: syncdoc
syncdoc: $(build)/cortav.html
	fossil uv add $< --as cortav.html
	fossil uv sync --all

# clean and wipe are written in overly cautious fashion to minimize damage,
# just in case they ever get invoked in a bad way (e.g. build=/)
.PHONY: clean
clean:
	rm -f $(build)/*.{html,lc,sh,desktop} \
	      $(build)/$(executable){,.bin}
	rm -r $(build)/bind
# wipe also kills external datasheets
.PHONY: wipe
wipe: clean
	rm -f $(build)/*.txt
	rmdir $(build)

$(build)/%.sh: desk/%.sh | $(build)/
	echo >$@ "#!$(sh)"
	echo >>$@ 'cortav_exec="$(bin-prefix)/$(executable)"'
	echo >>$@ 'cortav_flags="$${ct_format_flags-$(default-format-flags)}"'
	cat $< >> $@