diff options
Diffstat (limited to 'graphics/circuit_macros/examples/Makefile')
-rw-r--r-- | graphics/circuit_macros/examples/Makefile | 90 |
1 files changed, 58 insertions, 32 deletions
diff --git a/graphics/circuit_macros/examples/Makefile b/graphics/circuit_macros/examples/Makefile index d729596a17..cd0500c40c 100644 --- a/graphics/circuit_macros/examples/Makefile +++ b/graphics/circuit_macros/examples/Makefile @@ -5,10 +5,11 @@ # Type "make <diag>.ps" to make a postscript file from <diag>.m4 # It may be necessary to type "make clean" before this or any of the following: # Type "make <diag>.eps" to make an .eps file from <diag>.m4 +# Type "make <diag>.svg" to make an .svg file from <diag>.m4 using pdf2svg # The following require ImageMagick convert: # Type "make <diag>.png" to make a .png file from <diag>.m4 # Type "make <diag>.tif" to make a .tif file from <diag>.m4 -# Type "make <diag>.svg" to make a .svg file from <diag>.m4 +# # See also: the svg subdirectory for generating svg directly. # # To test the file test.m4, type "make tst" if boxdims is used, otherwise @@ -28,9 +29,9 @@ LIBDIR = .. # The dpic processor: PIC = dpic -p #PIC = $$HOME/dpic/build/p2c/ftp/dpic -p -#PIC = $$HOME/dpic/dev/p2c/ftp/dpic -p +#PIC = $$HOME/dpic/pa*dev/p2c/ftp/dpic -p #PIC = $$HOME/dpic/bison/dpic -p -#PIC = $$HOME/dpic/bdev/dpic -p +#PIC = $$HOME/dpic/bi*v/dpic -p CONFIGFILE = pstricks.m4 @@ -66,21 +67,21 @@ PICS = \ ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex ex16.tex ex17.tex ex18.tex \ ex21.tex exp.tex fet.tex Flow.tex Fuses.tex GrayCode.tex graysurf.tex \ Grounds.tex Headers.tex Heathkit.tex I2L.tex Incleps.tex Jack.tex \ - lcct.tex Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex \ + lcct.tex Lyap.tex Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex \ Multiplexer.tex NLG.tex NPDT.tex Nport.tex Opamp.tex Optoiso.tex \ Pconn.tex PushPull.tex pwrsupply.tex Quantum.tex quick.tex random.tex \ Rectifiers.tex recycle.tex relaycoil.tex Relay.tex rose.tex Rotbox.tex \ Schottky.tex sfg.tex shapes.tex ShiftR.tex Sierpinski.tex Sixpole.tex \ Sources.tex SQUID.tex Switches.tex \ - Tgate.tex Three.tex thyristor.tex Timer.tex \ + Tgate.tex Three.tex thyristor.tex \ TTLnand.tex Ttree.tex Tubediags.tex ujt.tex Variable.tex Windings.tex \ worm.tex Xform.tex XOR.tex # Files that have to be processed twice: -BOXDIMS = ex09.tex Crow.tex Incleps.tex Loglog.tex Opamp.tex random.tex \ - Ttree.tex Windings.tex -BOXPICS = ex09.pic Crow.pic Incleps.pic Loglog.pic Opamp.pic random.pic \ - Ttree.pic Windings.pic +BOXDIMS = ex09.tex Crow.tex Incleps.tex Lyap.tex Loglog.tex Opamp.tex \ + random.tex Ttree.tex Windings.tex +BOXPICS = ex09.pic Crow.pic Incleps.pic Lyap.pic Loglog.pic Opamp.pic \ + random.pic Ttree.pic Windings.pic DVIPSOPTS = -Ppdf -G0 -t letter DVIPSOPTS = -G0 -t letter @@ -91,6 +92,18 @@ BS = tr '|' '\134' # Might be needed (change latex commands to $(LTX) ) # LTX = latex --shell-escape +LTXFILE=printf "|documentclass[11pt]{article}\n\ +|usepackage{times,pstricks,boxdims,graphicx,pst-grad,pst-slpe}\n\ +|usepackage{siunitx}\n\ +|setlength{|textwidth}{28cm}|setlength{|textheight}{28cm}\n\ +|setlength{|oddsidemargin}{0pt}|setlength{|evensidemargin}{0pt}\n\ +|setlength{|hoffset}{-1cm}\n\ +|pagestyle{empty}|thispagestyle{empty}\n\ +|newbox|graph\n\ +|begin{document}\n\ +|noindent|input{"$*".tex}\n\ +|end{document}\n" | $(BS) + .SUFFIXES: .ps .dvi .tex .m4 .pic .eps .png .pdf .svg .tif .gif .dvi.ps: dvips $(DVIPSOPTS) $* -o $*.ps @@ -106,25 +119,25 @@ BS = tr '|' '\134' @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi $(M4) $(M4LIBS) $(DIMFILE) $*.m4 > $*.pic .m4.dvi: - make $*.tex - printf "|documentclass[11pt]{article}\n\ -|usepackage{times,pstricks,boxdims,graphicx,pst-grad,pst-slpe}\n\ -|usepackage{siunitx}\n\ -|setlength{|textwidth}{28cm}|setlength{|textheight}{28cm}\n\ -|setlength{|oddsidemargin}{0pt}|setlength{|evensidemargin}{0pt}\n\ -|setlength{|hoffset}{-1cm}\n\ -|pagestyle{empty}|thispagestyle{empty}\n\ -|newbox|graph\n\ -|begin{document}\n\ -|noindent|input{"$*".tex}\n\ -|end{document}\n" | $(BS) > F_$*.tex - latex F_$* + @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim + $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' \ + | $(PIC) > $*.tex + $(LTXFILE) > F_$*.tex + latex --quiet F_$* touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex - latex F_$* + latex --quiet F_$* touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex - latex F_$* + latex --quiet F_$* .m4.eps: - make $*.dvi + @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim + $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' \ + | $(PIC) > $*.tex + $(LTXFILE) > F_$*.tex + latex --quiet F_$* + touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex + latex --quiet F_$* + touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex + latex --quiet F_$* dvips F_$* -T128cm,28cm -o $*.ps # dvips -Ppdf F_$* -T128cm,28cm -o $*.ps # Recent changes to PSTricks(?) have clashed with the use of TeXtoEPS @@ -140,9 +153,9 @@ BS = tr '|' '\134' make $*.tex && mv $*.tex test.tex; latex tst dvips $(DVIPSOPTS) tst -o $*.ps chmod 644 $*.ps -.m4.svg: - make $*.eps - convert $(EPSOPTS) $*.eps $*.svg +#.m4.svg: +# make $*.eps +# convert $(EPSOPTS) $*.eps $*.svg .m4.png: make $*.eps convert $(PNGOPTS) $*.eps $*.png @@ -161,11 +174,24 @@ BS = tr '|' '\134' $(PIC) -g $*.pic > test.tex sed -e '/^\\usepackage.*graphicx/s/^.*$$/\\usepackage{tikz}/' \ -e '/pstricks/d' tst.tex > F_$*.tex - pdflatex F_$* + pdflatex --quiet F_$* + $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic + $(PIC) -g $*.pic > test.tex + pdflatex --quiet F_$* + mv F_$*.pdf $*.pdf +.m4.svg: + touch F_$*.dim + $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic + $(PIC) -g $*.pic > test.tex + sed -e '/^\\usepackage.*graphicx/s/^.*$$/\\usepackage{tikz}/' \ + -e '/pstricks/d' tst.tex > F_$*.tex + pdflatex --quiet F_$* $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic $(PIC) -g $*.pic > test.tex - pdflatex F_$* + pdflatex --quiet F_$* mv F_$*.pdf $*.pdf + pdf2svg $*.pdf $*.svg + rm -f $*.pdf $*.pic F_$** ######################################################################### @@ -237,7 +263,7 @@ clobber: clean do (if test -d $$dir ; then cd $$dir; make clobber; fi) ; done rm -f *.warn rm -f examples.pdf - rm -rf index.html html basenames *.png* dist zips htmlfiles svgfiles + rm -rf index.html html basenames *.png* dist zips htmlfiles rm -rf $(TMP)/Cir* $(ECETMP)/Cir* $(ECEDIR) if test -f Incl.pdf ; then \ mv Incl.pdf Incl.pdx; rm -f *.pdf; mv Incl.pdx Incl.pdf ; fi @@ -249,7 +275,7 @@ clobber: clean clean: @printf "\n examples clean:\n" rm -f core boxdims.tar.gz pics - rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.tif *.epsi eps *-mfpic* + rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.tif *.epsi eps *-mfpic* *.svg rm -f fig*.tex $(PICS) *.roff *.int *.pic gpic.m4 test.tex xxx* *.fig rm -f *.dim *.bak *.frs *.frp $(RPICS) rotate.ps tst.ps *.bbl *-pics.ps rm -f *.tfm *[0-9]pk *.png *.1 *.gif |