cortav  Diff

Differences From Artifact [be343fd9b7]:

To Artifact [af39b8375f]:


2
3
4
5
6
7
8

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
45
luac != which luac
sh != which sh

extens = $(wildcard ext/*.lua)
extens_names ?= $(basename $(notdir $(extens)))
build = build
executable = cortav


prefix = $(HOME)/.local
bin_prefix = $(prefix)/bin
share_prefix = $(prefix)/share/$(executable)

$(build)/$(executable): sirsem.lua cortav.lua $(extens) cli.lua | $(build)/
	@echo ' » building with extensions $(extens_names)'
	echo '#!$(lua)' > $@
	luac -o - $^ >> $@
	chmod +x $@

$(build)/cortav.html: cortav.ct $(build)/$(executable) | $(build)/
	./cortav $< -o $@ -m render:format html -y html:fossil-uv

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

.PHONY: clean
clean:
	rm -f $(build)/cortav $(build)/cortav.html $(build)/velartrill-cortav-view.desktop $(build)/cortav-view.sh

$(build)/%.sh: desk/%.sh
	echo >$@ "#!$(sh)"
	echo >>$@ 'cortav_exec="$(bin_prefix)/$(executable)"'

	cat $< >> $@
	chmod +x $@

$(build)/velartrill-cortav-view.desktop: desk/cortav-view.desktop.tpl
	cp $< $@
	echo "Exec=$(bin_prefix)/cortav-view.sh" >>$@

%/:
	mkdir -p $@

.PHONY: install







>












|













>



|







2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
luac != which luac
sh != which sh

extens = $(wildcard ext/*.lua)
extens_names ?= $(basename $(notdir $(extens)))
build = build
executable = cortav
default-format-flags = -m html:width 40em

prefix = $(HOME)/.local
bin_prefix = $(prefix)/bin
share_prefix = $(prefix)/share/$(executable)

$(build)/$(executable): sirsem.lua cortav.lua $(extens) cli.lua | $(build)/
	@echo ' » building with extensions $(extens_names)'
	echo '#!$(lua)' > $@
	luac -o - $^ >> $@
	chmod +x $@

$(build)/cortav.html: cortav.ct $(build)/$(executable) | $(build)/
	$(build)/$(executable) $< -o $@ -m render:format html -y html:fossil-uv

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

.PHONY: clean
clean:
	rm -f $(build)/cortav $(build)/cortav.html $(build)/velartrill-cortav-view.desktop $(build)/cortav-view.sh

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

$(build)/velartrill-cortav-view.desktop: desk/cortav-view.desktop
	cp $< $@
	echo "Exec=$(bin_prefix)/cortav-view.sh" >>$@

%/:
	mkdir -p $@

.PHONY: install