cortav  Diff

Differences From Artifact [be343fd9b7]:

To Artifact [af39b8375f]:


     2      2   luac != which luac
     3      3   sh != which sh
     4      4   
     5      5   extens = $(wildcard ext/*.lua)
     6      6   extens_names ?= $(basename $(notdir $(extens)))
     7      7   build = build
     8      8   executable = cortav
            9  +default-format-flags = -m html:width 40em
     9     10   
    10     11   prefix = $(HOME)/.local
    11     12   bin_prefix = $(prefix)/bin
    12     13   share_prefix = $(prefix)/share/$(executable)
    13     14   
    14     15   $(build)/$(executable): sirsem.lua cortav.lua $(extens) cli.lua | $(build)/
    15     16   	@echo ' ยป building with extensions $(extens_names)'
    16     17   	echo '#!$(lua)' > $@
    17     18   	luac -o - $^ >> $@
    18     19   	chmod +x $@
    19     20   
    20     21   $(build)/cortav.html: cortav.ct $(build)/$(executable) | $(build)/
    21         -	./cortav $< -o $@ -m render:format html -y html:fossil-uv
           22  +	$(build)/$(executable) $< -o $@ -m render:format html -y html:fossil-uv
    22     23   
    23     24   .PHONY: syncdoc
    24     25   syncdoc: $(build)/cortav.html
    25     26   	fossil uv add $<
    26     27   	fossil uv sync
    27     28   
    28     29   .PHONY: clean
    29     30   clean:
    30     31   	rm -f $(build)/cortav $(build)/cortav.html $(build)/velartrill-cortav-view.desktop $(build)/cortav-view.sh
    31     32   
    32     33   $(build)/%.sh: desk/%.sh
    33     34   	echo >$@ "#!$(sh)"
    34     35   	echo >>$@ 'cortav_exec="$(bin_prefix)/$(executable)"'
           36  +	echo >>$@ 'cortav_flags="$${ct_format_flags-$(default-format-flags)}"'
    35     37   	cat $< >> $@
    36     38   	chmod +x $@
    37     39   
    38         -$(build)/velartrill-cortav-view.desktop: desk/cortav-view.desktop.tpl
           40  +$(build)/velartrill-cortav-view.desktop: desk/cortav-view.desktop
    39     41   	cp $< $@
    40     42   	echo "Exec=$(bin_prefix)/cortav-view.sh" >>$@
    41     43   
    42     44   %/:
    43     45   	mkdir -p $@
    44     46   
    45     47   .PHONY: install