1
- SPEC_TEX =riscv-trace-spec
2
- SPEC =$(SPEC_TEX )
1
+ # Variables
2
+ SPEC_TEX := riscv-trace-spec
3
+ SPEC_PDF := $(SPEC_TEX ) .pdf
4
+ INCLUDES_TEX := introduction.tex branchTrace.tex exampleAlgorithm.tex filtering.tex timestamping.tex ingressPort.tex payload.tex dataTracePayload.tex control.tex preamble.tex riscv-trace-spec.tex decoder.tex discovery.tex exampleCodeSnippets.tex fragmentCodeAndTransport.tex future.tex
3
5
4
- INCLUDES_TEX = introduction.tex branchTrace.tex exampleAlgorithm.tex filtering.tex timestamping.tex ingressPort.tex payload.tex dataTracePayload.tex control.tex preamble.tex riscv-trace-spec.tex decoder.tex discovery.tex exampleCodeSnippets.tex fragmentCodeAndTransport.tex future.tex
6
+ # Main Targets
7
+ all : $(SPEC_PDF )
5
8
6
- all : $(SPEC ) .pdf
9
+ publish : $(SPEC_PDF )
10
+ cp $< $(SPEC_TEX ) -` git rev-parse --abbrev-ref HEAD` .` git rev-parse --short HEAD` .pdf
7
11
8
- $(SPEC ) .pdf : $(SPEC_TEX ) .tex $(INCLUDES_TEX ) vc.tex
9
- echo $(SPEC )
10
- pdflatex -shell-escape $< && makeindex $(SPEC_TEX ) && pdflatex -shell-escape $<
12
+ clean :
13
+ rm -f $(SPEC_PDF ) * .aux * .toc * .log * .idx * .ilg * .ind * .lof * .lot * .out * .pdf
11
14
12
- publish : $(SPEC ) .pdf
13
- cp $< $(SPEC ) -` git rev-parse --abbrev-ref HEAD` .` git rev-parse --short HEAD` .pdf
15
+ # Recipe for building the PDF
16
+ $(SPEC_PDF ) : $(SPEC_TEX ) .tex $(INCLUDES_TEX ) vc.tex
17
+ echo $(SPEC_TEX )
18
+ pdflatex -shell-escape $< && makeindex $(SPEC_TEX ) && pdflatex -shell-escape $<
14
19
20
+ # Recipe for generating vc.tex with Git version control information
15
21
vc.tex : .git/logs/HEAD
16
- # https://thorehusfeldt.net/2011/05/13/including-git-revision-identifiers-in-latex/
17
22
echo " %%% This file is generated by Makefile." > vc.tex
18
23
echo " %%% Do not edit this file!\n%%%" >> vc.tex
19
24
git log -1 --format=" format:\
@@ -22,11 +27,9 @@ vc.tex: .git/logs/HEAD
22
27
\\ gdef\\ GITAuthorDate{%ad}\
23
28
\\ gdef\\ GITAuthorName{%an}" >> vc.tex
24
29
30
+ # Recipe for generating changelog.tex from Git logs
25
31
changelog.tex : .git/logs/HEAD Makefile
26
32
echo " %%% This file is generated by Makefile." > changelog.tex
27
33
echo " %%% Do not edit this file!\n%%%" >> changelog.tex
28
34
git log --no-merges --date=short --pretty=" format:vhEntry{%h}{%ad}{%an}{%s}" | \
29
- sed -e " s,\\\\ ,{\\\\ textbackslash},g" -e " s,[_#^],\\\\ &,g" -e s/^/\\\\ / >> changelog.tex
30
-
31
- clean :
32
- rm -f $(SPEC ) .pdf * .aux $(SPEC ) .toc $(SPEC ) .log $(SPEC ) .aux $(SPEC ) .idx $(SPEC ) .ilg $(SPEC ) .ind $(SPEC ) .lof $(SPEC ) .log $(SPEC ) .lot $(SPEC ) .out $(SPEC ) .pdf $(SPEC ) .toc
35
+ sed -e " s,\\\\ ,{\\\\ textbackslash},g" -e " s,[_#^],\\\\ &,g" -e s/^/\\\\ / >> changelog.tex
0 commit comments