source: doc/theses/mike_brooks_MMath/Makefile@ c8bdbaf

stuck-waitfor-destruct
Last change on this file since c8bdbaf was 2410424, checked in by Michael Brooks <mlbrooks@…>, 12 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
RevLine 
[bbf6a180]1# Configuration variables
[8e819a9]2
[bbf6a180]3Build = build
[f85de47]4
5Benchmarks = benchmarks
[bbf6a180]6Pictures = pictures
[f85de47]7Plots = plots
[bbf6a180]8Programs = programs
[8e819a9]9
[297b796]10LaTMac = ../../LaTeXmacros
11BibRep = ../../bibliography
12
[bbf6a180]13TeXSRC = ${wildcard *.tex}
[a7d93cb]14PicSRC = ${notdir ${wildcard ${Pictures}/*.png}} ${notdir ${wildcard ${Pictures}/*.fig}}
[873e96c]15PicSRC := ${PicSRC:.fig=.pdf} # substitute ".fig" with ".pdf"
[f85de47]16PlotSRC = ${notdir ${wildcard ${Plots}/*.gp}}
[873e96c]17PlotSRC := ${addprefix ${Build}/plot-,${PlotSRC:.gp=.pdf}} # substitute ".gp" with ".pdf"
[489d3ba]18DemoPgmSRC = ${notdir ${wildcard ${Programs}/*-demo.cfa}}
[5717495]19PgmSRC = ${notdir ${wildcard ${Programs}/*}}
20RunPgmSRC = ${notdir ${wildcard ${Programs}/*.run.*}}
[bbf6a180]21BibSRC = ${wildcard *.bib}
[8e819a9]22
[297b796]23TeXLIB = .:${LaTMac}:${Build}: # common latex macros
24BibLIB = .:${BibRep}: # common citation repository
[8e819a9]25
[5717495]26#MAKEFLAGS = --no-print-directory # --silent
[bbf6a180]27VPATH = ${Build} ${Pictures} ${Programs} # extra search path for file names used in document
[8e819a9]28
[bbf6a180]29DOCUMENT = uw-ethesis.pdf
30BASE = ${basename ${DOCUMENT}} # remove suffix
[8e819a9]31
[5717495]32RunPgmExe = ${addprefix ${Build}/,${basename ${basename ${RunPgmSRC}}}}
33RunPgmOut = ${RunPgmExe:%=%.out}
[489d3ba]34DemoPgmExe = ${addprefix ${Build}/,${basename ${basename ${DemoPgmSRC}}}}
35DemoPgmOut = ${DemoPgmExe:%=%.out}
[5717495]36
[bbf6a180]37# Commands
[8e819a9]38
[bbf6a180]39LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && pdflatex -halt-on-error -output-directory=${Build}
40BibTeX = BIBINPUTS=${BibLIB} && export BIBINPUTS && bibtex
[5717495]41CFA = cfa -O0 -g
42CC = gcc -O0 -g
43CXX = g++-11 --std=c++20 -O0 -g
[8e819a9]44
[bbf6a180]45# Rules and Recipes
[8e819a9]46
[873e96c]47.PHONY : all clean # not file names
[489d3ba]48.SECONDARY:
49#.PRECIOUS : ${Build}/% # don't delete intermediates
[bbf6a180]50.ONESHELL :
[8e819a9]51
[489d3ba]52all : ${DOCUMENT}
[8e819a9]53
54clean :
[bbf6a180]55 @rm -frv ${DOCUMENT} ${Build}
56
57# File Dependencies
58
[2410424]59${DOCUMENT}: ${TeXSRC} $(RunPgmOut) ${DemoPgmOut} ${PlotSRC} ${PicSRC} ${BibSRC} ${BibRep}/pl.bib ${LaTMac}/common.tex Makefile | ${Build}
[a7d93cb]60 echo ${PicSRC}
[f85de47]61 echo ${GraphSRC_OLD}
[bbf6a180]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}
[8e819a9]69 cp ${Build}/$@ $@
70
71${Build}:
[bbf6a180]72 mkdir -p $@
73
[5717495]74${Build}/%-demo: ${Programs}/%-demo.cfa | ${Build}
75 ${CFA} $< -o $@
76
[489d3ba]77${Build}/%: ${Programs}/%-demo.cfa | ${Build}
78 ${CFA} $< -o $@
79
[873e96c]80${Build}/%: ${Programs}/%.run.cfa | ${Build} # cfa cannot handle pipe
[b64d0f4]81 sed -f ${Programs}/sedcmd $< > ${Build}/tmp.cfa; ${CFA} ${Build}/tmp.cfa -o $@
[5717495]82
83${Build}/%: ${Programs}/%.run.c | ${Build}
[b64d0f4]84 sed -f ${Programs}/sedcmd $< | ${CC} -x c -I ${Programs} -o $@ -
[5717495]85
86${Build}/%: ${Programs}/%.run.cpp | ${Build}
[b64d0f4]87 sed -f ${Programs}/sedcmd $< | ${CXX} -x c++ -I ${Programs} -o $@ -
[bbf6a180]88
[5717495]89${Build}/%.out: ${Build}/% | ${Build}
90 $< > $@
[8e819a9]91
[a7d93cb]92%.pdf: %.fig | ${Build}
93 fig2dev -L pdf $< > ${Build}/$@
94
[2410424]95-include $(Plots)/*.d
[f85de47]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
[a7d93cb]103#-include ${Build}/*.d
Note: See TracBrowser for help on using the repository browser.