| 1 |
# The installed library directory, change this if necessary: |
| 2 |
LIBDIR = .. |
| 3 |
|
| 4 |
DOC = Circuit_macros |
| 5 |
DOCSRC = Circuit_macros.tex body.tex defines.tex |
| 6 |
|
| 7 |
PICTEX = \ |
| 8 |
AlogixMan.tex \ |
| 9 |
AmpTableMan.tex AntennasMan.tex ArrestersMan.tex AudioMan.tex \ |
| 10 |
AutologixMan.tex Axes.tex \ |
| 11 |
Buffer.tex BigResistor.tex BipMan.tex \ |
| 12 |
CapacitorsMan.tex Composite.tex ConfigA.tex ConfigB.tex \ |
| 13 |
ConfigC.tex ConnMan.tex Corners.tex ContactMan.tex ContactsMan.tex \ |
| 14 |
Dac.tex Darlington.tex DemultiplexerMan.tex \ |
| 15 |
DiodesMan.tex \ |
| 16 |
EmarrowsMan.tex FF.tex FlipFlop.tex Flowdiag.tex FusesMan.tex \ |
| 17 |
GroundsMan.tex HeadersMan.tex HybridPi.tex InductorsMan.tex \ |
| 18 |
JackMan.tex LadderMan.tex LogicMan.tex \ |
| 19 |
Loop.tex MultiplexerMan.tex NPDTMan.tex NLGMan.tex NportMan.tex \ |
| 20 |
Oblique.tex OpampMan.tex Opto.tex ParSeries.tex PconnMan.tex \ |
| 21 |
Potentiometers.tex QTrans.tex \ |
| 22 |
RelayMan.tex relaycoilMan.tex ResistorsMan.tex \ |
| 23 |
Series.tex ShiftRMan.tex Sinus.tex SLDsMan.tex SourcesMan.tex \ |
| 24 |
SRffMan.tex SwitchesMan.tex Symbols.tex \ |
| 25 |
Taps.tex TgateMan.tex Thermal.tex Tline.tex \ |
| 26 |
VariableMan.tex WindingsMan.tex Workflow.tex XformMan.tex \ |
| 27 |
arrowex.tex \ |
| 28 |
bitr.tex bi_trans.tex bistableMan.tex \ |
| 29 |
currents.tex eboxdims.tex fbfilter.tex fetcompMan.tex fetwrapMan.tex \ |
| 30 |
heaterMan.tex heatsinkMan.tex \ |
| 31 |
lrarrows.tex MoreTableMan.tex mplex.tex opampex.tex quick.tex \ |
| 32 |
sampleIC.tex stringdims.tex \ |
| 33 |
ThyristorMan.tex TstripMan.tex ujtMan.tex \ |
| 34 |
woodchips.tex |
| 35 |
|
| 36 |
VERBATIM = BigResistor2.verb eboxdims.verb |
| 37 |
BOXDIMS = AntennasMan.tex bi_trans.tex ConfigA.tex ConfigB.tex ConfigC.tex \ |
| 38 |
Corners.tex \ |
| 39 |
Dac.tex eboxdims.tex FlipFlop.tex \ |
| 40 |
OpampMan.tex ParSeries.tex Sinus.tex stringdims.tex \ |
| 41 |
ThyristorMan.tex WindingsMan.tex woodchips.tex |
| 42 |
# BOXDIMS = $(PICTEX) |
| 43 |
|
| 44 |
LATEX = latex |
| 45 |
#LATEX = latex --quiet |
| 46 |
|
| 47 |
BIBTEX=BIBINPUTS=. bibtex |
| 48 |
|
| 49 |
M4 = m4 -I $(LIBDIR) |
| 50 |
# If M4PATH has been set: |
| 51 |
M4 = m4 |
| 52 |
|
| 53 |
# For gpic |
| 54 |
MODE = gpic |
| 55 |
PIC = pic -t |
| 56 |
PRE = |
| 57 |
POST = ;printf '\\centerline{\\box\\graph}\n' |
| 58 |
PST = |
| 59 |
|
| 60 |
# For dpic; comment these to stick with gpic. |
| 61 |
#MODE = pstricks |
| 62 |
MODE = pgf |
| 63 |
PIC = dpic -p |
| 64 |
# PIC = $$HOME/dpic/test/dpic -p |
| 65 |
# PIC = $$HOME/dpic/p2c/ftp/dpic -p |
| 66 |
PRE = |
| 67 |
POST = |
| 68 |
#POST = ;printf '}%%' |
| 69 |
PST = ;printf '\\usepackage{pstricks}\n' >> heading.tex |
| 70 |
# PST = ;printf '\\usepackage{tikz}\n' >> heading.tex |
| 71 |
|
| 72 |
SFX = dvi |
| 73 |
|
| 74 |
M4LIBS = $(MODE).m4 |
| 75 |
.SUFFIXES: .tex .m4 |
| 76 |
.m4.tex: |
| 77 |
touch $(DOC).dim |
| 78 |
$(M4) $(M4LIBS) $(DOC).dim $*.m4 > $*.pic |
| 79 |
($(PRE) $(PIC) $*.pic $(POST)) > $*.tex |
| 80 |
|
| 81 |
$(DOC).pdf: |
| 82 |
touch mode.tex |
| 83 |
-if grep -q tikz mode.tex ; then true ; else \ |
| 84 |
rm mode.tex; make MODE=tikz clean mode.tex ; fi |
| 85 |
make MODE=pgf PIC="dpic -g" LATEX="pdflatex" SFX=pdf \ |
| 86 |
POST="; printf '\\\\vspace*{-0.5\\\\baselineskip}\\n'" \ |
| 87 |
$(DOC).pdf |
| 88 |
# This breaks internal links: |
| 89 |
# optpdf $(DOC).pdf |
| 90 |
chmod 644 $(DOC).pdf |
| 91 |
|
| 92 |
$(DOC).ps: |
| 93 |
printf "\n $(DOC).ps:\n\n" |
| 94 |
make MODE=pstricks PIC="dpic -p" LATEX="latex" \ |
| 95 |
SFX=dvi POST="" $(DOC).dvi |
| 96 |
dvips -t letter $(DOC) -o |
| 97 |
|
| 98 |
$(DOC).$(SFX): mode.tex citations $(PICTEX) |
| 99 |
@printf "\n $(DOC).SFX=$(DOC).$(SFX):\n\n" |
| 100 |
$(LATEX) $(DOC) ; $(BIBTEX) $(DOC) |
| 101 |
-@if grep -s "Warning: Reference " $(DOC).log ; then \ |
| 102 |
@printf "\n Warning:\n\n" ; \ |
| 103 |
$(LATEX) $(DOC) ; $(BIBTEX) $(DOC) ; \ |
| 104 |
elif test ! -f $(DOC).$(SFX) ; then\ |
| 105 |
@printf "\n No file $(DOC).$(SFX)\n\n" ; \ |
| 106 |
$(LATEX) $(DOC) ; $(BIBTEX) $(DOC) ; fi |
| 107 |
|
| 108 |
Symbols.tex: |
| 109 |
touch $(DOC).dim |
| 110 |
$(M4) $(M4LIBS) $(DOC).dim $*.m4 > $*.pic |
| 111 |
$(PRE) $(PIC) $*.pic | sed -e '/end{tikzpicture}/s/$$/%/' > $*.tex |
| 112 |
|
| 113 |
citations: mode.tex $(DOC).bbl $(PICTEX) |
| 114 |
@printf "\n citations:\n\n" |
| 115 |
$(LATEX) $(DOC) ; $(BIBTEX) $(DOC) |
| 116 |
touch citations |
| 117 |
|
| 118 |
$(DOC).bbl: $(DOC).bib $(DOC).aux |
| 119 |
$(BIBTEX) $(DOC) |
| 120 |
|
| 121 |
# $(DOC).aux: mode.tex $(DOCSRC) heading.tex $(VERBATIM) $(PICTEX) |
| 122 |
$(DOC).aux: mode.tex $(DOCSRC) $(VERBATIM) $(PICTEX) |
| 123 |
@printf "\n $(DOC).aux:\n\n" |
| 124 |
$(LATEX) $(DOC) ; $(BIBTEX) $(DOC) |
| 125 |
rm -f $(BOXDIMS) |
| 126 |
make $(BOXDIMS) |
| 127 |
|
| 128 |
mode.tex: |
| 129 |
-if test "$(MODE)" = "pstricks" ; then \ |
| 130 |
printf "\\usepackage{pstricks}\n" > mode.tex ; else \ |
| 131 |
printf "\\usepackage{tikz}\n" > mode.tex ; fi |
| 132 |
printf "\\def\\Version{" >> mode.tex |
| 133 |
sed -e 's/$$/}/' Version.tex >> mode.tex |
| 134 |
|
| 135 |
heading.tex: |
| 136 |
printf '\\documentclass{article}\n' > heading.tex |
| 137 |
printf '\\usepackage{verbatim,url}\n' >> heading.tex |
| 138 |
printf '\\usepackage{multicol}\n' >> heading.tex |
| 139 |
printf '\\usepackage{amssymb,boxdims}\n' >> heading.tex $(PST) |
| 140 |
printf '\\usepackage{float}\n' >> heading.tex $(PST) |
| 141 |
|
| 142 |
opampex.tex tran.tex bitr.tex: opampex.m4 |
| 143 |
$(M4) $(M4LIBS) $*.m4 > $*.pic |
| 144 |
$(PIC) $*.pic > $*.tex |
| 145 |
|
| 146 |
pics: $(PICTEX) |
| 147 |
|
| 148 |
BigResistor2.verb: BigResistor.m4 |
| 149 |
( printf '\\begin{verbatim}\n'; \ |
| 150 |
sed -n '/thinlines/,/PE/p' BigResistor.m4 ;\ |
| 151 |
printf '\\end{verbatim}\n' ) > BigResistor2.verb |
| 152 |
|
| 153 |
eboxdims.verb: eboxdims.m4 |
| 154 |
( printf '\\begin{verbatim}\n' ; \ |
| 155 |
sed -e '/thinlines/,$$d' eboxdims.m4 ; \ |
| 156 |
printf '.PE\n\\end{verbatim}\n' ) > eboxdims.verb |
| 157 |
|
| 158 |
ex08.m4: ../examples/ex08.m4 |
| 159 |
cp ../examples/ex08.m4 ex08.m4 |
| 160 |
|
| 161 |
clobber: clean |
| 162 |
rm -f *.dvi Circuit_macros.pdf |
| 163 |
|
| 164 |
clean: |
| 165 |
rm -f *.bbl *.log *.aux *.blg *.toc citations *.verb ex08.m4 |
| 166 |
rm -f *.pic $(PICTEX) heading.tex *.dim *.uu Circuit_macros.ps |
| 167 |
rm -f mode.tex Circuit_macros.out *.upa *.upb *.brf Circuit_macros.dvi |