TeX/main.pdf: CHEST := code/chestnut PYENV := code/python:code/hmm:${CHEST} PYTHON := env PYTHONPATH=${PYENV} python # Filesystem location abbreviations D := data DA := ${D}/Apnea C := code P := ${C}/python PS := ${C}/plotscripts XF := ${C}/xfigs H := ${C}/hmm F := figs # Complete list of figures in the book: # LaserLP5 LaserLogLike LaserStates LaserForecast mm dhmm TSintro # STSintro Statesintro dhmm_net nonmm # # forward viterbi viterbiB sequenceMAP train TrainChar GaussMix EM # # LaserHist ScalarGaussian MLEfail VARGstates # # ToyTS1 ToyStretch ToyH QR benettin LikeLor # # a03erA a03erN a03erHR ApneaNLD sgram viterbiC LDA class1 structure # PFsurvey # Still need data for the following figures: # # TrainChar GaussMix EM # # ScalarGaussian MLEfail # # LikeLor FIG_TARGETS = # The XFig diagram should be created at actual size with appropriately # sized LaTeX (not Postscript) fonts so that no scaling has to be done # outside of XFig. The text areas should be flagged as "special" so # that they may contain LaTeX macros. They should probably also be # center justified, and if the LaTeX markup causes a label to exceed # the final typeset size, the text box should be flagged "hidden". # # This is so that fig2dev does not use it's un-typeset size when it # finds the bounding box of the diagram for export. For example, if a # label with a longish LaTeX macro extends off to the right of the # diagram proper, and it is not flagged as "hidden", the exported # diagram will have a bounding box that encompasses the size of the # un-typeset label. It also affects the box size of a compound # object, which you can see while using the "move" or "scale" tools. # # It is useful to bind all of a completed diagram into a compound # object so that it can be scaled as a unit. For this, the text # should be flagged "rigid", so it won't scale along with the rest of # the diagram. If it is scaled by much, it may be necessary to split # up the compound and re-adjust label positioning. # These next two command definitions are a duo. They are split out # into two rules to improve the parallelism of a "make -j" build. The # document requires that both the .pdf_t and matching .pdf are # available, which makes sense since they both come from the same .fig # diagram. # # The .pdf_t is a piece of LaTeX that contains two "picture" # environments. The first one is zero sized, and contains an # \includegraphics that brings in the associated .pdf image. The # second "picture" environment is sized to reflect the actual image, # and contains a series of \put statements that typeset the labels # over the top of the .pdf image using the font settings from the # ambient environment surrounding the \input statement. # $(call pdf_t_from_fig, INPUT_BASE, OUTPUT_BASE [, ARG1 ARG2 ...]) # define pdf_t_from_fig fig2dev -L pdftex_t -p $(2) $(3) $(1).fig $(2).pdf_t endef # $(call eps_from_fig, INPUT_BASE, OUTPUT_BASE [, ARG1 ARG2 ...]) # define pdf_from_fig fig2dev -L pdftex $(3) $(1).fig $(2).pdf endef # These pattern rules are for the general case where the input and # output both have the same base name and no extra "fig2dev" arguments # are required. ${F}/%.pdf ${F}/%.pdf_t : ${XF}/%.fig fig2dev -L pdftex ${XF}/$*.fig ${F}/$*.pdf fig2dev -L pdftex_t -p ${F}/$*.pdf ${XF}/$*.fig ${F}/$*.pdf_t #I use a variant of Karl Hegbloom's run_gnuplot command to create #pairs of files with names that have the pattern *.pdf and *.pdf_t. #It uses the following awkward trick to pass information from the #Makefile to gnuplot commands in the gnuplot script. The definition #expands to a single line that runs the command "gnuplot" with #environment variables GP_OUTPUT, GP_INPUT1, ... GP_INPUT4 set to #values found on the line of invocation. The gnuplot script accesses #environment variables with commands like # # set output "`echo -n $GP_OUTPUT`" # # An invocation has the following form: # #$(call run_gnuplot, script.gpt OUTPUT.pdf [, GP_INPUT1] [, GP_INPUT2] ...) # # "basename" and "strip" are file/text manipulation functions of gnu-make define run_gnuplot (GP_INPUT4="$(strip $(6))" \ GP_INPUT3="$(strip $(5))" \ GP_INPUT2="$(strip $(4))" \ GP_INPUT1="$(strip $(3))" \ GP_OUTPUT="$(basename $(strip $(2))).eps" \ gnuplot $(1); \ if [ -f "$(basename $(strip $(2))).tex" ]; then \ mv "$(basename $(strip $(2))).tex" "$(basename $(strip $(2))).pdf_t"; \ fi; \ if [ -f "$(basename $(strip $(2))).eps" ]; then \ epstopdf "$(basename $(strip $(2))).eps"; \ rm "$(basename $(strip $(2))).eps"; \ fi; \ ) endef ${P}/lorenz.py: ${P}/liblorenz.a # Any use of lorenz.py requires liblorenz.a ${P}/Laser_data.py: ${P}/lorenz.py # Laser_data.py calls lorenz.py # Atomic from: http://www.cmcrossroads.com/content/view/7970/268/ # # Usage: # # $(call atomic,a b,c d) # command_line ... # # "command_line" builds "a" and "b" which depend on "c" and "d". # There will be an automatically generated ".sentinel._a_b" # intermediate target. # sp := sp += sentinel = $(shell expr substr ".sentinel.$(subst $(sp),_,$(subst /,_,$1))" 1 100) atomic = $(eval $1: $(call sentinel,$1) ; @:)$(call sentinel,$1): $2 ; touch $$@ $(foreach t,$1,$(if $(wildcard $t),,$(shell rm -f $(call sentinel,$1)))) ##################Figures for Introduction (chap 1)####################### # Both "Markov_mm.pdf_t" and "Markov_dhmm.pdf_t" are generated # from the same .fig file. The output arcs and their labels are at # depth 40 and the rest is at depth 50. When "mm.pdf_t" is created, # the space taken up by the output arcs is blank, so we need to trim # it off using the '-K' switch to 'fig2dev'. LASERS = LaserLP5 LaserStates LaserForecast LaserHist FIGS_INTRO = $(foreach name, ${LASERS}, ${name}.pdf) LaserLogLike.pdf \ Markov_dhmm_net.pdf Markov_dhmm_net.pdf_t Markov_dhmm.pdf \ Markov_dhmm.pdf_t Markov_mm.pdf nonmm.pdf nonmm.pdf_t \ STSintro.pdf TSintro.pdf Statesintro.pdf FIG_TARGETS += ${FIGS_INTRO} LASERDATA = $(foreach name, ${LASERS} LaserLogLike, ${D}/${name}) LASERFIGS = $(foreach name, ${LASERS}, ${F}/${name}.pdf) $(call atomic, ${LASERDATA}, ${P}/Laser_data.py ${D}/LP5.DAT) ${PYTHON} ${P}/Laser_data.py ${D} ${F}/LaserLogLike.pdf: ${PS}/LaserLogLike.gpt ${D}/LaserLogLike $(call run_gnuplot, $<, $@, ${D}/LaserLogLike) $(call atomic, ${LASERFIGS}, ${PS}/Laser_plots.py ${LASERDATA}) python ${PS}/Laser_plots.py ${D} ${F} ${F}/Markov_mm.pdf : ${XF}/Markov_dhmm.fig fig2dev -D+50 -K -L pdftex ${XF}/Markov_dhmm.fig ${F}/Markov_mm.pdf fig2dev -D+50 -K -L pdftex_t -p ${F}/Markov_mm.pdf \ ${XF}/Markov_dhmm.fig ${F}/Markov_mm.pdf_t ##### Prepare data ############### ${P}/lorenz.o: ${P}/lorenz.c gcc -Wall -O3 -fPIC -o $@ -c $< ${P}/liblorenz.a: ${P}/lorenz.o rm -f $@ ar cru $@ $< ar -s $@ $(call atomic, ${D}/lorenz.4 ${D}/lorenz.xyz, ${P}/lorenz.py ${P}/liblorenz.a ) python ${P}/lorenz.py --data_dir=${D} --L20K TSI_LIST = ${D}/TSintro_1_vfine ${D}/TSintro_2_pu ${D}/TSintro_3_q $(call atomic,${TSI_LIST}, ${P}/lorenz.o ${P}/lorenz.py ${P}/liblorenz.a ) python ${P}/lorenz.py --TSintro --data_dir=${D} STATES = 0 1 2 3 4 5 6 7 8 9 10 11 STATEDATA = ${D}/states $(foreach state, ${STATES}, ${D}/state${state}) ${D}/m12s.4y : ${P}/MakeModel.py ${D}/lorenz.4 ${PYTHON} ${P}/MakeModel.py ${D} lorenz.4 m12s.4y $(call atomic, ${STATEDATA}, ${D}/m12s.4y ${D}/lorenz.4 ${P}/StatePic.py) ${PYTHON} ${P}/StatePic.py ${D} lorenz.4 lorenz.xyz m12s.4y # ${D}/states is a time series of decoded states # ${D}/state0 is a list of 3-d vectors corresponding to times state = 0 # ${F}/v.0.eps is a plot of the points in ${D}/state0 ${F}/Statesintro.pdf: ${PS}/stateplot.py ${STATEDATA} python ${PS}/stateplot.py ${D} state $@ ####### Make figures using data ############## ${F}/TSintro.pdf: ${PS}/TSintro.py ${TSI_LIST} python ${PS}/TSintro.py ${TSI_LIST} figs/TSintro.pdf ${F}/STSintro.pdf : ${PS}/STSintro.gpt ${STATEDATA} $(call run_gnuplot, $<, $@, ${D}/states) ${D}/po_speech : ${P}/po_speech.py ${D}/gutenberg-19355 ${PYTHON} $^ 7 > $@ ##################Figures for Algorithms (chap 2)####################### FIGS_ALGS = forward.pdf forward.pdf_t sequenceMAP.pdf \ sequenceMAP.pdf_t viterbiB.pdf viterbiB.pdf_t EM1.pdf EM2.pdf \ TrainChar.pdf gaussmix.pdf gaussmixA.pdf FIG_TARGETS += ${FIGS_ALGS} ${D}/TrainChar: ${P}/TrainChar.py ${D}/lorenz.4 ${PYTHON} $^ $@ ${F}/TrainChar.pdf: ${PS}/TrainChar.gpt ${D}/TrainChar $(call run_gnuplot, $<, $@, ${D}/TrainChar) ${F}/gaussmixA.pdf : ${PS}/gaussmixA.gpt $(call run_gnuplot, $<, $@) # em_yt is transcribed from the first line of output from python # code/python/em.py ${F}/gaussmix.pdf: ${PS}/gaussmix.gpt ${D}/em_yt $(call run_gnuplot, $<, $@, ${D}/em_yt) ${F}/EM%.pdf: ${PS}/EM%.gpt $(call run_gnuplot, $<, $@) ##################Figures for Variants (chap 3)####################### FIGS_VARS = SGOsimS.pdf SGOsimY.pdf SGOdecodeS.pdf SGO.pdf SGO.pdf_t \ VARGstates.pdf FIG_TARGETS += ${FIGS_VARS} SGO_NAMES = SGOsimS SGOsimY SGOdecodeS SGO_DATA := $(addprefix ${D}/, ${SGO_NAMES}) SGO_FIGS := $(addprefix ${F}/,$(addsuffix .pdf, ${SGO_NAMES})) VARG_DATA = $(foreach state, ${STATES}, ${D}/varg_state${state}) ${F}/VARGstates.pdf: ${PS}/stateplot.py ${VARG_DATA} python ${PS}/stateplot.py ${D} varg_state $@ ##### Prepare data ############### $(call atomic, ${SGO_DATA}, ${H}/ScalarGaussian.py) ${PYTHON} ${H}/ScalarGaussian.py ${D} $(call atomic, ${VARG_DATA}, ${P}/VStatePic.py ${D}/lorenz.xyz) ${PYTHON} ${P}/VStatePic.py ${D} lorenz.xyz ####### Make figures using data ############## # This subfigure is used several times in fig:ScalarGaussian and also # in fig:MLEfail. The labels are done with macros that are redefined # for each time the .pdf_t is input. # ${F}/SGO.pdf_t : ${XF}/ScalarGaussian.fig $(call pdf_t_from_fig, ${XF}/ScalarGaussian, ${F}/SGO) # ${F}/SGO.pdf : ${XF}/ScalarGaussian.fig $(call pdf_from_fig, ${XF}/ScalarGaussian, ${F}/SGO) $(call atomic, $(SGO_FIGS), $(SGO_DATA) ${PS}/SGO.py) python ${PS}/SGO.py $(SGO_DATA) $(SGO_FIGS) ##################Figures for Toys (chap 5)####################### FIGS_TOYS = QR.pdf QR.pdf_t ToyTS.pdf ToyStretch.pdf ToyH.pdf \ benettin.pdf LikeLor.pdf FIG_TARGETS += ${FIGS_TOYS} #${D}/Save_Hview_T_118 ${D}/Save_Hview_T_119 # From the old Hview #${D}/Save_Hview_T_131 ${D}/Save_Hview_T_132 # From the new Hview $(call atomic, ${F}/ToyTS.pdf ${F}/ToyStretch.pdf, ${PS}/ToyA.py \ ${D}/Save_Hview_T_100 ${D}/Save_Hview_T_118 ${D}/Save_Hview_T_119) ${PYTHON} $^ ${F}/ToyTS.pdf ${F}/ToyStretch.pdf $(call atomic, ${D}/Hsurvey ${D}/HtauS, ${P}/Hsurvey.py) python code/python/Hsurvey.py data ${F}/ToyH.pdf : ${PS}/Hsurvey.gpt ${D}/Hsurvey ${D}/HtauS $(call run_gnuplot, $<, $@, ${D}/Hsurvey, ${D}/HtauS) ${D}/benettin: ${P}/LyapPlot.py python $< $@ ${F}/benettin.pdf : ${PS}/LyapPlot.gpt ${D}/benettin $(call run_gnuplot, $<, $@, ${D}/benettin) ${D}/LikeLor: ${P}/Sparse_hmm_lor.py ${PYTHON} $< $@ ${F}/LikeLor.pdf : ${PS}/LikeLor.gpt ${D}/LikeLor $(call run_gnuplot, $<, $@, ${D}/LikeLor) ##################Figures for REAL (chap 6)####################### EXPERT=data/summary_of_training As = a01 a02 a03 a04 a05 \ a06 a07 a08 a09 a10 \ a11 a12 a13 a14 a15 \ a16 a17 a18 a19 a20 Bs = b01 b02 b03 b04 # b05 is a mess Cs = c01 c02 c03 c04 c05 \ c06 c07 c08 c09 c10 Xs = x01 x02 x03 x04 x05 \ x06 x07 x08 x09 x10 \ x11 x12 x13 x14 x15 \ x16 x17 x18 x19 x20 \ x21 x22 x23 x24 x25 \ x26 x27 x28 x29 x30 \ x31 x32 x33 x34 x35 ALL = $(As) $(Bs) $(Cs) $(Xs) LOW = c01 c02 c03 c04 c05 \ c06 c07 c08 c09 c10 b04 MED = c07 c08 b04 a06 b01 a11 HIGH = a01 a02 a03 a04 a05 \ a07 a08 a09 a10 \ a11 a12 a13 a14 a15 \ a16 a17 a18 a19 a20 \ b02 b03 AMFs = $(ALL:%=$(DA)/%.amf) # data with lead noise suppressed WQRSs = $(ALL:%=$(DA)/%.wqrs) # qrs annotations by wqrs utility RESPIREs = $(ALL:%=$(DA)/%.resp) # Estimates of respiration frequency LP_HRs = $(ALL:%=$(DA)/%.lphr) # Low pass filtered heart rate RTIMESs = $(ALL:%=$(DA)/%.Rtimes) # Rtime annotations in text format $(call atomic, ${RESPIREs} ${D}/mean.resp ${D}/AA.resp ${D}/AN.resp \ ${D}/C.resp, ${RTIMEs} ${P}/respire.py ${D}/summary_of_training ${H}/ApOb.py) echo This takes 1.8 GB and 32 minutes on a 3GHZ 64 bit machine ${PYTHON} ${P}/respire.py --Annotations=${D}/summary_of_training \ --Data_Dir=${D} --ApOb_Dir=${H} ${ALL} $(call atomic, ${LP_HRs}, ${RTIMEs} ${P}/rr2hr.py) python ${P}/rr2hr.py --Data_Dir=${DA} ${ALL} .LPHR_RESP: ${LP_HRs} ${RESPIREs} touch $@ FIGS_REAL = structure.pdf structure.pdf_t a03erA.pdf a03erA.pdf \ a03erN.pdf a03erHR.pdf ApneaNLD.pdf sgram.pdf LDA1.pdf LDA2.pdf \ class1.pdf PFsurvey.pdf ####### Make apnea time series figures using data ############## ATSPLOTS = ${F}/a03erA.pdf ${F}/a03erN.pdf ${F}/a03erHR.pdf ${F}/ApneaNLD.pdf ATSDATA = ${D}/a03er_seg ${DA}/a01.lphr ${DA}/a03.lphr ${DA}/a12.lphr $(call atomic, ${ATSPLOTS}, ${PS}/apnea_ts_plots.py ${ATSDATA}) python $^ ${ATSPLOTS} SGRAMDATA = ${DA}/a11.Rtimes ${DA}/a11.lphr ${D}/summary_of_training ${F}/sgram.pdf: ${PS}/apnea_sgram.py ${SGRAMDATA} python $^ ${P} $@ $(call atomic, ${F}/LDA1.pdf ${F}/LDA2.pdf, ${PS}/LDA.py ${D}/mean.resp \ ${D}/AA.resp ${D}/AN.resp ${D}/C.resp) python $^ ${F}/LDA1.pdf ${F}/LDA2.pdf ${F}/PFsurvey.pdf: ${PS}/PFsurvey.gpt ${D}/PFsurvey $(call run_gnuplot, $<, $@, ${D}/PFsurvey) ####### Models for apnea classification: ##################### # mod_A2 2-state AR4 trained unsupervised on a-records. Used for # first pass classification of entire record. # # mod_C1 1-state AR4 trained unsupervised on c-records. Used for # first pass classification of entire record. # # mod_2L 4 normal states, 2 apnea states, AR4. Trained with # supervision on the low records $(LOW). Used for second pass # classification of individual minutes. # # mod_2M 4 normal states, 2 apnea states, AR4. Trained with # supervision on the medium records $(MED). Used for second # pass classification of individual minutes. # # mod_2H 5 normal states, 4 apnea states, AR2. Trained with # supervision on the high records $(HIGH). Used for second # pass classification of individual minutes. MODA=${D}/mod_A MODBC=${D}/mod_C MODL=${D}/mod_L MODM=${D}/mod_M MODH=${D}/mod_H test_hr: ${H}/ApTrain.py ${H}/ApOb.py ${PYTHON} $< --AR=4 --NN=2 --NA=2 --Iterations=5 --Out_mod=$@ \ --Annotations=${EXPERT} --Dpath=${DA} a01 a02 test_resp: ${H}/ApTrain.py ${H}/ApOb.py ${PYTHON} $< --NS=2 --Resp --Iterations=5 --Out_mod=$@ \ --Dpath=${DA} a03 a02 test_both: ${H}/ApTrain.py ${H}/ApOb.py ${PYTHON} $< --AR=6 --NS=2 --Resp --Iterations=5 --Out_mod=$@ \ --Dpath=${DA} a03 a02 test_struct: ${H}/ApTrain.py ${H}/ApOb.py ${PYTHON} $< --AR=4 --Resp --Iterations=5 --Out_mod=$@ \ --Annotations=${EXPERT} --Peak_max=8 --Peak_min=2 \ --N_peaks=1 --N_isles=4 --A_peaks=2 --A_isles=2 --Dpath=${DA} a03 a02 ${D}/mod_A: ${H}/ApTrain.py .LPHR_RESP # Model for first pass classification ${PYTHON} $< --AR=4 --NS=2 --Resp --Iterations=20 --Out_mod=$@ \ --Dpath=${DA} ${As} a06 a10 a17 a06 ${D}/mod_C: ${H}/ApTrain.py .LPHR_RESP # Model for first pass classification ${PYTHON} $< --AR=4 --NS=1 --Resp --Iterations=2 --Out_mod=$@ \ --Dpath=${DA} ${Cs} c08 c02 c09 c08 c02 ${D}/mod_L: ${H}/ApTrain.py .LPHR_RESP # Model for second pass classification ${PYTHON} $< --Annotations=${EXPERT} --Out_mod=$@ --AR=4 --Resp \ --Iterations=20 --Peak_min=2 --Peak_max=8 --N_peaks=1 \ --N_isles=3 --A_peaks=1 --A_isles=1 --Dpath=${DA} ${LOW} ${D}/mod_M: ${H}/ApTrain.py .LPHR_RESP # Model for second pass classification ${PYTHON} $< --Annotations=${EXPERT} --Out_mod=$@ --AR=4 --Resp \ --Iterations=20 --Peak_min=2 --Peak_max=8 --N_peaks=1 \ --N_isles=3 --A_peaks=1 --A_isles=1 --Dpath=${DA} ${MED} ${D}/mod_H: ${H}/ApTrain.py .LPHR_RESP # Model for second pass classification ${PYTHON} $< --Annotations=${EXPERT} --Out_mod=$@ --AR=2 --Resp \ --Iterations=20 --Peak_min=2 --Peak_max=8 --N_peaks=1 \ --N_isles=4 --A_peaks=2 --A_isles=2 --Dpath=${DA} ${HIGH} # Seems H 1.0 2.5, M 0.98 2.5, and L 1.5 0.9 might be better CLASSIFY = ${PYTHON} ${H}/DoubleClassify.py --Amodel=${MODA} \ --BCmodel=${MODBC} --Lmodel=${MODL} 2.2 0.9 --Mmodel=${MODM} 1.15 2.5 \ --Hmodel=${MODH} 1.0 2.6 --Dpath=${DA} ${D}/PFsurveyH: ${H}/PFsurvey.py ${MODH} ${PYTHON} ${H}/PFsurvey.py --Model=${MODH} --Annotations=${EXPERT} \ --Results=$@ --Power=1.5 3.501 .1 --Fudge=0.95 1.021 .01 \ --Dpath=${DA} ${HIGH} ${D}/PFsurveyM: ${H}/PFsurvey.py ${MODM} ${PYTHON} ${H}/PFsurvey.py --Model=${MODH} --Annotations=${EXPERT} \ --Results=$@ --Power=1.6 4.001 .4 --Fudge=1.05 2.201 .05 \ --Dpath=${DA} ${MED} $(call atomic, ${D}/reportTrain ${D}/scoreTrain, ${H}/DoubleClassify.py \ ${MODA} ${MODBC} ${MODL} ${MODM} ${MODH}) ${CLASSIFY} --Annotations=${EXPERT} \ --Results ${D}/reportTrain ${D}/scoreTrain ${As} ${Bs} ${Cs} $(call atomic, ${D}/reportTest ${D}/scoreTest, ${H}/DoubleClassify.py \ ${MODA} ${MODBC} ${MODL} ${MODM} ${MODH}) ${CLASSIFY} --Annotations=${D}/event-2-answers \ --Dpath=${DA} --Results ${D}/reportTest ${D}/scoreTest ${Xs} ${D}/reportTrainC: ${H}/DoubleClassify.py ${MODA} ${MODBC} \ ${MODL} ${MODM} ${MODH} ${CLASSIFY} --Annotations=${EXPERT} \ --Results ${D}/reportTrainC ${D}/scoreTrainC ${Cs} ${D}/reportTrainH: ${H}/DoubleClassify.py ${MODA} ${MODBC} \ ${MODL} ${MODM} ${MODH} ${CLASSIFY} --Results ${D}/reportTrainH ${D}/scoreTrainC ${HIGH} ${D}/reportTrainM: ${H}/DoubleClassify.py ${MODA} ${MODBC} \ ${MODL} ${MODM} ${MODH} ${CLASSIFY} --Annotations=${EXPERT} \ --Results ${D}/reportTrainM ${D}/scoreTrainM a06 b01 b04 ${D}/pass1A: ${H}/DoubleClassify.py ${MODA} ${MODBC} ${MODL} ${MODM} ${MODH} ${CLASSIFY} --Single ${As} > $@ ${D}/pass1B: ${H}/DoubleClassify.py ${MODA} ${MODBC} ${MODL} ${MODM} ${MODH} ${CLASSIFY} --Single ${Bs} > $@ ${D}/pass1C: ${H}/DoubleClassify.py ${MODA} ${MODBC} ${MODL} ${MODM} ${MODH} ${CLASSIFY} --Single ${Cs} > $@ ${D}/pass1X: ${H}/DoubleClassify.py ${MODA} ${MODBC} ${MODL} ${MODM} ${MODH} ${CLASSIFY} --Single ${Xs} > $@ ${F}/class1.pdf: ${PS}/class1.py ${D}/pass1A ${D}/pass1B ${D}/pass1C ${D}/pass1X ${PYTHON} $^ $@ FIG_TARGETS += ${FIGS_REAL} ALLFIGS = $(foreach name, ${FIG_TARGETS}, ${F}/${name}) CHAPNAMES = main introduction algorithms variants continuous toys real appendix TEXNAMES = $(foreach name, ${CHAPNAMES}, TeX/${name}.tex) TeX/main.pdf: ${TEXNAMES} ${ALLFIGS} ${D}/po_speech rubber --pdf -I . --inplace TeX/main.tex TeX/software.pdf: TeX/software.tex ${ALLFIGS} ${D}/po_speech rubber --pdf -I . --inplace TeX/software.tex .PHONY TeX/clean: rubber --clean --pdf -I . --inplace TeX/main.tex webhmmds.tar.bz2: cd /tmp; rm -rf webhmmds; svn co http://fraserphysics.com/webhmmds cp -a ${CHEST} /tmp/webhmmds/trunk/code/chestnut find /tmp/webhmmds/trunk -name .svn|xargs -ix rm -rf x cp -a /tmp/webhmmds/trunk webhmmds patch webhmmds/Makefile patch.Makefile tar -cjvf webhmmds.tar.bz2 webhmmds rm -rf webhmmds # Local Variables: # mode: makefile # End: