diff --git a/doc/manual/Makefile b/doc/manual/Makefile index b6a3760c0..501ef9e19 100644 --- a/doc/manual/Makefile +++ b/doc/manual/Makefile @@ -31,7 +31,9 @@ IMAGES_TO_CLEAN = $(IMAGES_PNG_CONVERTED) $(IMAGES_PDF) $(IMAGES_EPS) %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.eps; + $(EPSTOPDF) $< -o=$@ + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi # You can set these variables from the command line. diff --git a/doc/models/Makefile b/doc/models/Makefile index e250c7b27..0a607ae26 100644 --- a/doc/models/Makefile +++ b/doc/models/Makefile @@ -261,7 +261,9 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.eps + $(EPSTOPDF) $< -o=$@ + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi # You can set these variables from the command line. SPHINXOPTS = diff --git a/doc/models/rescale-pdf.sh b/doc/models/rescale-pdf.sh index f5bd5175e..aa775893b 100755 --- a/doc/models/rescale-pdf.sh +++ b/doc/models/rescale-pdf.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +TMPDIR=/tmp + TMPFILE=`mktemp` echo "\documentclass{book} @@ -8,5 +10,5 @@ echo "\documentclass{book} \includepdf[width=${1},fitpaper]{${2}} \end{document}" >${TMPFILE}.tex pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp /tmp/`basename ${TMPFILE}`.pdf ${3} - +cp ${TMPFILE}.pdf ${2} +rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} diff --git a/src/antenna/doc/Makefile b/src/antenna/doc/Makefile index e44d7166a..39b344b52 100644 --- a/src/antenna/doc/Makefile +++ b/src/antenna/doc/Makefile @@ -23,7 +23,9 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.eps + $(EPSTOPDF) $< -o=$@ + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png} GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf} @@ -31,7 +33,9 @@ GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf} GRAPHS = $(GRAPHS_EPS) $(GRAPHS_PNG) $(GRAPHS_PDF) %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.eps + $(EPSTOPDF) $< -o=$@ + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi # You can set these variables from the command line. SPHINXOPTS = diff --git a/src/antenna/doc/rescale-pdf.sh b/src/antenna/doc/rescale-pdf.sh index 748d998ab..aa775893b 100755 --- a/src/antenna/doc/rescale-pdf.sh +++ b/src/antenna/doc/rescale-pdf.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +TMPDIR=/tmp + TMPFILE=`mktemp` echo "\documentclass{book} @@ -8,5 +10,5 @@ echo "\documentclass{book} \includepdf[width=${1},fitpaper]{${2}} \end{document}" >${TMPFILE}.tex pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp ${TMPFILE}.pdf ${3} - +cp ${TMPFILE}.pdf ${2} +rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} diff --git a/src/buildings/doc/Makefile b/src/buildings/doc/Makefile index 91d347559..a77c0c4ea 100644 --- a/src/buildings/doc/Makefile +++ b/src/buildings/doc/Makefile @@ -23,7 +23,9 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.eps + $(EPSTOPDF) $< -o=$@; + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png} GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf} @@ -31,7 +33,9 @@ GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf} GRAPHS = $(GRAPHS_EPS) $(GRAPHS_PNG) $(GRAPHS_PDF) %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.eps + $(EPSTOPDF) $< -o=$@ + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi # You can set these variables from the command line. SPHINXOPTS = diff --git a/src/buildings/doc/rescale-pdf.sh b/src/buildings/doc/rescale-pdf.sh index 748d998ab..aa775893b 100755 --- a/src/buildings/doc/rescale-pdf.sh +++ b/src/buildings/doc/rescale-pdf.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +TMPDIR=/tmp + TMPFILE=`mktemp` echo "\documentclass{book} @@ -8,5 +10,5 @@ echo "\documentclass{book} \includepdf[width=${1},fitpaper]{${2}} \end{document}" >${TMPFILE}.tex pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp ${TMPFILE}.pdf ${3} - +cp ${TMPFILE}.pdf ${2} +rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} diff --git a/src/lte/doc/Makefile b/src/lte/doc/Makefile index 86348ee58..ebad2a228 100644 --- a/src/lte/doc/Makefile +++ b/src/lte/doc/Makefile @@ -127,12 +127,18 @@ IMAGES = $(IMAGES_NOBUILD) $(IMAGES_BUILD) %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.seqdiag; $(SEQDIAG) -Tpng -o $@ $< %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.seqdiag; $(SEQDIAG) -Tpdf -o $@ $< ; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.seqdiag + $(SEQDIAG) -Tpdf -o $@ $< + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi +%.pdf : %.eps + $(EPSTOPDF) $< -o=$@ + if test x$($@_width) != x; ./rescale-pdf.sh $($@_width) $@ ; fi %.png : %.eps; $(CONVERT) $< $@ -%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi +%.pdf : %.eps + $(EPSTOPDF) $< -o=$@ + if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi # You can set these variables from the command line. SPHINXOPTS = diff --git a/src/lte/doc/rescale-pdf.sh b/src/lte/doc/rescale-pdf.sh index 748d998ab..aa775893b 100755 --- a/src/lte/doc/rescale-pdf.sh +++ b/src/lte/doc/rescale-pdf.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +TMPDIR=/tmp + TMPFILE=`mktemp` echo "\documentclass{book} @@ -8,5 +10,5 @@ echo "\documentclass{book} \includepdf[width=${1},fitpaper]{${2}} \end{document}" >${TMPFILE}.tex pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp ${TMPFILE}.pdf ${3} - +cp ${TMPFILE}.pdf ${2} +rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}