| 1 |
# Makefile for the psfrag subdirectory |
| 2 |
|
| 3 |
# Where the .m4 libraries are installed. Change if necessary: |
| 4 |
LIBDIR = $$HOME/lib |
| 5 |
|
| 6 |
#--------------------------------------------- |
| 7 |
|
| 8 |
MKDIM=pwd | sed -e 's%^%=boxdimfile{%' -e 's%/cygdrive/\(.\)/%\1:/%' \ |
| 9 |
-e 's%$$%/$(DIMFILE)}%' |
| 10 |
|
| 11 |
# Comment out the following line to produce absolute addresses for .dim files. |
| 12 |
MKDIM=printf '=boxdimfile{$(DIMFILE)}\n' |
| 13 |
|
| 14 |
#--------------------------------------------- |
| 15 |
|
| 16 |
# The .m4 circuit_macro libraries used for the examples: |
| 17 |
M4MACROS = psfrag.m4 |
| 18 |
M4 = m4 |
| 19 |
|
| 20 |
#--------------------------------------------- |
| 21 |
DOC = examplespsfrag |
| 22 |
|
| 23 |
FIGS = \ |
| 24 |
ABlogix.eps Adder.eps Alogix.eps AmpTable.eps Antennas.eps Arresters.eps \ |
| 25 |
Audio.eps Bip.eps Btree.eps Buttons.eps Byte.eps \ |
| 26 |
Capacitors.eps CanLogic.eps Chips.eps Conn.eps Boards.eps \ |
| 27 |
Contacts.eps Contact.eps control.eps Crow.eps \ |
| 28 |
csc.eps Csource.eps Decoder.eps \ |
| 29 |
Demultiplexer.eps diamond.eps Dini.eps Diodes.eps Drive.eps \ |
| 30 |
EEP.eps Emarrows.eps Escher.eps EVplugs.eps \ |
| 31 |
ex00.eps ex01.eps ex02.eps ex03.eps ex04.eps ex05.eps ex06.eps ex08.eps \ |
| 32 |
ex09.eps ex10.eps ex11.eps ex12.eps ex15.eps ex16.eps ex17.eps ex18.eps \ |
| 33 |
ex21.eps exp.eps fet.eps Flow.eps Fuses.eps \ |
| 34 |
Geometry.eps GrayCode.eps graysurf.eps Grounds.eps \ |
| 35 |
Headers.eps Heathkit.eps \ |
| 36 |
I2L.eps Incleps.eps Inductors.eps Jack.eps \ |
| 37 |
lcct.eps Logic.eps Loglog.eps MC.eps Mixer.eps MoreTable.eps \ |
| 38 |
MotorControl.eps Multiplexer.eps \ |
| 39 |
NLG.eps NPDT.eps Nport.eps Opamp.eps Optoiso.eps \ |
| 40 |
Pconn.eps Plate.eps PushPull.eps pwrsupply.eps \ |
| 41 |
Quantum.eps quick.eps \ |
| 42 |
random.eps Rectifiers.eps recycle.eps relaycoil.eps Relay.eps \ |
| 43 |
Resistors.eps Rotbox.eps \ |
| 44 |
Schottky.eps sfg.eps shapes.eps ShiftR.eps Sierpinski.eps Sixpole.eps \ |
| 45 |
Smithchart.eps Sources.eps SQUID.eps Switches.eps \ |
| 46 |
Tgate.eps Three.eps thyristor.eps TTLnand.eps Tubediags.eps \ |
| 47 |
UNO.eps ujt.eps Variable.eps Windings.eps worm.eps Xform.eps XOR.eps \ |
| 48 |
rose.eps |
| 49 |
|
| 50 |
LOCALFIGS = ex21 |
| 51 |
|
| 52 |
# Files using boxdims macros: |
| 53 |
BOXDIMS = ex09 Crow Incleps Loglog TTLnand Opamp Btree Windings |
| 54 |
|
| 55 |
# It is advisable to do `make clean' between test examples. |
| 56 |
#--------------------------------------------- |
| 57 |
|
| 58 |
DPIC = dpic |
| 59 |
# DPIC = $$HOME/dpic/test/dpic |
| 60 |
# DPIC = $$HOME/dpic/build/p2c/ftp/dpic |
| 61 |
|
| 62 |
TR = | tr '=' '\134' |
| 63 |
|
| 64 |
LATEX = latex --quiet |
| 65 |
|
| 66 |
DIMFILE = tmp.dim |
| 67 |
|
| 68 |
.SUFFIXES: .tex .m4 .eps .ps |
| 69 |
.tex.ps: |
| 70 |
$(LATEX) $* |
| 71 |
dvips -Ppdf $* |
| 72 |
|
| 73 |
.m4.eps: |
| 74 |
touch $(DIMFILE) |
| 75 |
$(M4) $(M4MACROS) $(DIMFILE) $*.m4 > $*.pic |
| 76 |
$(DPIC) -f $*.pic > $*.eps |
| 77 |
# $(M4) $(M4MACROS) $(DIMFILE) $*.m4 | $(DPIC) -f >> $*.eps |
| 78 |
|
| 79 |
$(DOC).ps: $(DOC).dvi |
| 80 |
dvips -Ppdf $(DOC) |
| 81 |
|
| 82 |
$(DOC).dvi: $(DOC).tex |
| 83 |
-if test "$(DOC)"="examplespsfrag" ; then make exlinks ;\ |
| 84 |
$(MKDIM) $(TR) > setdim.tex; fi |
| 85 |
make $(FIGS) Incl.eps |
| 86 |
$(LATEX) $(DOC) |
| 87 |
-if test -n "$(BOXDIMS)" ; then \ |
| 88 |
for box in $(BOXDIMS) ; do rm -f $$box.eps; make $$box.eps ; done; \ |
| 89 |
$(LATEX) $(DOC); fi |
| 90 |
-if test -n "$(BOXDIMS)" ; then \ |
| 91 |
for box in $(BOXDIMS) ; do rm -f $$box.eps; make $$box.eps ; done; \ |
| 92 |
$(LATEX) $(DOC); fi |
| 93 |
|
| 94 |
Incl.eps: ../Incl.eps.gz |
| 95 |
rm -f Incl.eps.gz |
| 96 |
cp ../Incl.eps.gz . |
| 97 |
gunzip Incl.eps.gz |
| 98 |
|
| 99 |
figs: exlinks $(FIGS) |
| 100 |
|
| 101 |
exlinks: |
| 102 |
@echo "" |
| 103 |
@echo 'Ignore "cannot create ... exists" warnings.' |
| 104 |
-@if test ! -f ex11.m4 ; then \ |
| 105 |
ls ../*.m4 | sed -e 's/^/ln -s /' -e '/test.m4/d' | sh;\ |
| 106 |
ls ../../doc/*.m4 ../*.bb ../*.gz | sed -e 's/^/ln -s /' | sh;\ |
| 107 |
fi |
| 108 |
touch exlinks |
| 109 |
# for file in $(LOCALFIGS); do cp $${file}PSF.m4 $${file}.m4 ; done |
| 110 |
|
| 111 |
clobber: clean |
| 112 |
rm -f $(DOC).ps test.m4 |
| 113 |
|
| 114 |
tst: tstpsfrag.ps |
| 115 |
|
| 116 |
tstpsfrag.ps: tstpsfrag.dvi |
| 117 |
dvips tstpsfrag |
| 118 |
|
| 119 |
tstpsfrag.dvi: test.eps |
| 120 |
$(LATEX) tstpsfrag |
| 121 |
|
| 122 |
test.eps: test.pic |
| 123 |
$(DPIC) -f test.pic > test.eps |
| 124 |
|
| 125 |
test.pic: test.m4 testlinks |
| 126 |
$(M4) $(M4MACROS) test.m4 > test.pic |
| 127 |
$(DPIC) -f test.pic > test.eps |
| 128 |
$(LATEX) tstpsfrag |
| 129 |
touch tstpsfrag.dim |
| 130 |
$(M4) $(M4MACROS) tstpsfrag.dim test.m4 > test.pic |
| 131 |
|
| 132 |
testlinks: |
| 133 |
-for file in ics.m4 FlowchartDefs.m4 ; do ln -s ../$$file ; done |
| 134 |
touch testlinks |
| 135 |
|
| 136 |
clean: |
| 137 |
@printf "\n psfrag clean:\n" |
| 138 |
rm -f stamp-* $(FIGS) *.dvi *.bb *.gz tstpsfrag.ps *.out *.pfg Incl.eps |
| 139 |
-if /usr/bin/test -f exlinks ; then \ |
| 140 |
ls -l *.m4 | grep '\->' | \ |
| 141 |
sed -e 's/^.* \([^ ][^ ]*\) ->.*$$/rm -f \1/' | sh; rm -f exlinks ; fi |
| 142 |
-if /usr/bin/test -f testlinks ; then \ |
| 143 |
ls -l *.m4 | grep '\->' | \ |
| 144 |
sed -e 's/^.* \([^ ][^ ]*\) ->.*$$/rm -f \1/' | sh; rm -f testlinks ; fi |
| 145 |
rm -f FlowchartDefs.m4 ics.m4 |
| 146 |
for file in $(LOCALFIGS); do rm -f $${file}.m4 ; done |
| 147 |
rm -f *.log *.ps *.aux *.mp *.[0-9] *.[0-9][0-9] *.mpx *.eps *.dim *.pic |
| 148 |
rm -f core log mpxerr* *links figs.* *.dim dims F_test.* setdim.tex |
| 149 |
rm -f man[0-9]*.pic man[0-9]*.m4 figs.m4 test.1 test.mp test.pic test.tex |
| 150 |
-if test -n "$(BOXDIMS)" ; then for box in $(BOXDIMS) ; do \ |
| 151 |
rm -f F_$$box.tex $$box.tex ; done; fi |
| 152 |
@printf "\n" |