source: doc/theses/mike_brooks_MMath/content/string/Makefile@ 5f53cc3

ADT ast-experimental enum pthread-emulation qualifiedEnum
Last change on this file since 5f53cc3 was 8e819a9, checked in by Michael Brooks <mlbrooks@…>, 3 years ago

Mike MMath initial

  • Property mode set to 100644
File size: 1.4 KB
Line 
1SHELL := /bin/bash
2
3# The targets made here are individual code-level demos.
4# Some produce LaTeX fragments. All are being checked for the code being valid.
5# None are being built from *.tex toward *.pdf. Use the top-level makefile for that.
6
7
8BuildBase = ../../build
9Build = ${BuildBase}/string
10
11# (plg2 has gem)
12# gem install --user-install liquid
13# gem install --user-install liquid-cli
14Liquid = ~/.gem/ruby/2.7.0/bin/liquid
15
16CFA = ../../../../../../build/driver/cfa
17
18DEMOS = ${addsuffix -demo, \
19 sharing \
20}
21
22EZDEMOS = ${addsuffix -ezdemo, \
23 sharectx \
24}
25
26
27all: $(DEMOS) $(EZDEMOS)
28
29# removing the echo rule body means the rule doesn't fire
30%-demo: $(Build)/%-demo.tex %-demo-runok | $(Build)
31 @echo target $@ made
32
33%-ezdemo: %-ezdemo-runok | $(Build)
34 @echo target $@ made
35
36%-demo-runok: $(Build)/%-demo | $(Build)
37 $<
38
39%-ezdemo-runok: $(Build)/%-ezdemo | $(Build)
40 $<
41
42$(Build)/%-demo.tex: %-demo.json %-demo.tex.liquid | $(Build)
43 $(Liquid) "$$(< $<)" < $(word 2,$^) > $@
44# echo will run $(Liquid)
45# echo will get JSON from $<
46# echo will get template from $(word 2,$^)
47
48$(Build)/%-demo: $(Build)/%-demo.cfa
49 $(CFA) $< -o $@
50
51$(Build)/%-demo.cfa: %-demo.json %-demo.cfa.liquid | $(Build)
52 $(Liquid) "$$(< $<)" < $(word 2,$^) > $@
53
54$(Build)/%-ezdemo: %-demo.cfa
55 $(CFA) $< -o $@
56
57
58
59
60${Build}:
61 mkdir -p $@
62
63.PHONY : all %-demo %-demo %-runok
64.PRECIOUS : $(Build)/%-demo.tex $(Build)/%-demo.cfa $(Build)/%-demo
Note: See TracBrowser for help on using the repository browser.