# Makefile for the psfrag subdirectory # Where the .m4 libraries are installed. Change if necessary: LIBDIR = $$HOME/lib #--------------------------------------------- MKDIM=pwd | sed -e 's%^%=boxdimfile{%' -e 's%/cygdrive/\(.\)/%\1:/%' \ -e 's%$$%/$(DIMFILE)}%' # MikTeX on Cygwin requires absolute addresses on included files. # Comment out the following line to produce absolute addresses. MKDIM=printf '=boxdimfile{$(DIMFILE)}\n' #--------------------------------------------- # The .m4 circuit_macro libraries used for the examples: M4MACROS = postscript.m4 MB = -B32000 MB = M4 = m4 $(MB) -I $(LIBDIR) #--------------------------------------------- DOC = examples FIGS = Adder.eps Alogix.eps ABlogix.eps Antennas.eps Audio.eps AmpTable.eps \ Bip.eps Btree.eps Byte.eps \ CanLogic.eps CctTable.eps Conn.eps Counting.eps Crossbar.eps Crow.eps \ Csource.eps \ Decoder.eps Demultiplexer.eps Diodes.eps Drive.eps \ Emarrows.eps Flow.eps Fuses.eps \ Globe.eps Grounds.eps Headers.eps Heathkit.eps Jack.eps \ I2L.eps Inclpdf.eps \ Logic.eps Loglog.eps MC.eps MotorControl.eps Multiplexer.eps \ NLG.eps NPDT.eps Nport.eps \ Opamp.eps Optoiso.eps Pconn.eps Rectifiers.eps Relay.eps Rotbox.eps \ Schottky.eps Sierpinski.eps ShiftR.eps Sixpole.eps Sources.eps SQUID.eps \ Switches.eps \ Tgate.eps Three.eps Timer.eps TTLnand.eps \ Windings.eps Variable.eps Xform.eps \ bistable.eps control.eps csc.eps diamond.eps \ ex00.eps ex01.eps ex02.eps ex03.eps ex04.eps \ ex05.eps ex06.eps ex07.eps ex08.eps ex09.eps ex10.eps ex11.eps ex12.eps \ ex15.eps ex16.eps ex17.eps ex18.eps ex19.eps ex21.eps exp.eps \ fet.eps graysurf.eps lcct.eps pwrsupply.eps quick.eps \ recycle.eps rose.eps sfg.eps thyristor.eps ujt.eps worm.eps yinyang.eps # Files using boxdims macros: BOXDIMS = ex09 Crow Inclpdf Loglog TTLnand Opamp Windings # It is advisable to do `make clean' between test examples. #--------------------------------------------- DPIC = dpic # DPIC = $$HOME/dpic/test/dpic TR = | tr '=' '\134' LATEX = latex DIMFILE = tmp.dim .SUFFIXES: .tex .m4 .eps .ps .tex.ps: $(LATEX) $* dvips -Ppdf $* .m4.eps: touch $(DIMFILE) $(M4) $(M4MACROS) $(DIMFILE) $*.m4 | $(DPIC) -f >> $*.eps EXL = exlinks $(DOC).ps: $(DOC).dvi dvips -Ppdf $(DOC) $(DOC).dvi: $(DOC).tex -if test "$(DOC)"="examples" ; then make exlinks ;\ $(MKDIM) $(TR) > setdim.tex; fi make $(FIGS) Incl.eps $(LATEX) $(DOC) -if test -n "$(BOXDIMS)" ; then \ for box in $(BOXDIMS) ; do rm -f $$box.eps; make $$box.eps ; done; \ $(LATEX) $(DOC); fi -if test -n "$(BOXDIMS)" ; then \ for box in $(BOXDIMS) ; do rm -f $$box.eps; make $$box.eps ; done; \ $(LATEX) $(DOC); fi Incl.eps: ../Incl.eps.gz rm -f Incl.eps.gz cp ../Incl.eps.gz . gunzip Incl.eps.gz figs: $(EXL) $(FIGS) exlinks: @echo "" @echo 'Ignore "cannot create ... exists" warnings.' -@if test ! -f ex11.m4 ; then \ ls ../*.m4 | sed -e 's/^/ln -s /' -e '/test.m4/d' | sh;\ ls ../../doc/*.m4 ../*.bb ../*.gz | sed -e 's/^/ln -s /' | sh;\ fi touch $(EXL) clobber: clean rm -f $(DOC).ps test.m4 tst: tst.ps tst.ps: tst.dvi dvips tst tst.dvi: test.eps latex tst test.eps: test.pic $(DPIC) -f test.pic > test.eps test.pic: test.m4 $(M4) postscript.m4 libcct.m4 test.m4 > test.pic $(DPIC) -f test.pic > test.eps latex tst touch tst.dim $(M4) postscript.m4 libcct.m4 tst.dim test.m4 \ > test.pic clean: rm -f stamp-* $(FIGS) *.dvi *.bb *.gz tst.ps *.out *.pfg Incl.eps -if /usr/bin/test -f exlinks ; then \ ls -l *.m4 | grep '\->' | \ sed -e 's/^.* \([^ ][^ ]*\) ->.*$$/rm -f \1/' | sh; fi rm -f *.log *.ps *.aux *.mp *.[0-9] *.[0-9][0-9] *.mpx *.eps *.dim rm -f core log mpxerr* *links figs.* *.dim dims Ftest.* setdim.tex rm -f man[0-9]*.pic man[0-9]*.m4 figs.m4 test.1 test.mp test.pic test.tex -if test -n "$(BOXDIMS)" ; then for box in $(BOXDIMS) ; do \ rm -f F$$box.tex $$box.tex ; done; fi