source: doc/theses/mike_brooks_MMath/Makefile@ 7592f42

Last change on this file since 7592f42 was 2410424, checked in by Michael Brooks <mlbrooks@…>, 8 months ago

Pushing work in progress on data for string plots.

All in-thesis plots source from baselined result data, with no manual massaging. Removing older placeholder graph images and temp data.

Allocation plot, especially the last attribution stacked bar, is showing untrustrworthy data.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1# Configuration variables
2
3Build = build
4
5Benchmarks = benchmarks
6Pictures = pictures
7Plots = plots
8Programs = programs
9
10LaTMac = ../../LaTeXmacros
11BibRep = ../../bibliography
12
13TeXSRC = ${wildcard *.tex}
14PicSRC = ${notdir ${wildcard ${Pictures}/*.png}} ${notdir ${wildcard ${Pictures}/*.fig}}
15PicSRC := ${PicSRC:.fig=.pdf} # substitute ".fig" with ".pdf"
16PlotSRC = ${notdir ${wildcard ${Plots}/*.gp}}
17PlotSRC := ${addprefix ${Build}/plot-,${PlotSRC:.gp=.pdf}} # substitute ".gp" with ".pdf"
18DemoPgmSRC = ${notdir ${wildcard ${Programs}/*-demo.cfa}}
19PgmSRC = ${notdir ${wildcard ${Programs}/*}}
20RunPgmSRC = ${notdir ${wildcard ${Programs}/*.run.*}}
21BibSRC = ${wildcard *.bib}
22
23TeXLIB = .:${LaTMac}:${Build}: # common latex macros
24BibLIB = .:${BibRep}: # common citation repository
25
26#MAKEFLAGS = --no-print-directory # --silent
27VPATH = ${Build} ${Pictures} ${Programs} # extra search path for file names used in document
28
29DOCUMENT = uw-ethesis.pdf
30BASE = ${basename ${DOCUMENT}} # remove suffix
31
32RunPgmExe = ${addprefix ${Build}/,${basename ${basename ${RunPgmSRC}}}}
33RunPgmOut = ${RunPgmExe:%=%.out}
34DemoPgmExe = ${addprefix ${Build}/,${basename ${basename ${DemoPgmSRC}}}}
35DemoPgmOut = ${DemoPgmExe:%=%.out}
36
37# Commands
38
39LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && pdflatex -halt-on-error -output-directory=${Build}
40BibTeX = BIBINPUTS=${BibLIB} && export BIBINPUTS && bibtex
41CFA = cfa -O0 -g
42CC = gcc -O0 -g
43CXX = g++-11 --std=c++20 -O0 -g
44
45# Rules and Recipes
46
47.PHONY : all clean # not file names
48.SECONDARY:
49#.PRECIOUS : ${Build}/% # don't delete intermediates
50.ONESHELL :
51
52all : ${DOCUMENT}
53
54clean :
55 @rm -frv ${DOCUMENT} ${Build}
56
57# File Dependencies
58
59${DOCUMENT}: ${TeXSRC} $(RunPgmOut) ${DemoPgmOut} ${PlotSRC} ${PicSRC} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build}
60 echo ${PicSRC}
61 echo ${GraphSRC_OLD}
62 ${LaTeX} ${BASE}
63 ${BibTeX} ${Build}/${BASE}
64 ${LaTeX} ${BASE}
65 # if needed, run latex again to get citations
66 if fgrep -s "LaTeX Warning: Citation" ${basename $@}.log ; then ${LaTeX} ${BASE} ; fi
67# ${Glossary} ${Build}/${BASE}
68# ${LaTeX} ${BASE}
69 cp ${Build}/$@ $@
70
71${Build}:
72 mkdir -p $@
73
74${Build}/%-demo: ${Programs}/%-demo.cfa | ${Build}
75 ${CFA} $< -o $@
76
77${Build}/%: ${Programs}/%-demo.cfa | ${Build}
78 ${CFA} $< -o $@
79
80${Build}/%: ${Programs}/%.run.cfa | ${Build} # cfa cannot handle pipe
81 sed -f ${Programs}/sedcmd $< > ${Build}/tmp.cfa; ${CFA} ${Build}/tmp.cfa -o $@
82
83${Build}/%: ${Programs}/%.run.c | ${Build}
84 sed -f ${Programs}/sedcmd $< | ${CC} -x c -I ${Programs} -o $@ -
85
86${Build}/%: ${Programs}/%.run.cpp | ${Build}
87 sed -f ${Programs}/sedcmd $< | ${CXX} -x c++ -I ${Programs} -o $@ -
88
89${Build}/%.out: ${Build}/% | ${Build}
90 $< > $@
91
92%.pdf: %.fig | ${Build}
93 fig2dev -L pdf $< > ${Build}/$@
94
95-include $(Plots)/*.d
96
97${Build}/plot-%.dat: ${Plots}/%.py ${Plots}/%.py.INPUTS | ${Build}
98 python3 $< > $@
99
100${Build}/plot-%.pdf: ${Plots}/%.gp ${Plots}/%.gp.INPUTS | ${Build}
101 gnuplot $<
102
103#-include ${Build}/*.d
Note: See TracBrowser for help on using the repository browser.