Another round of cleanup and improvement of build scripts
cover Another round of cleanup and improvement of build scripts
From d6c5dc0374c6e558d0acc003273b42537e50297f Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Jun 2016 23:34:26 +0900
Subject: [RFC PATCH 0/3] Another round of cleanup and improvement of build scripts
Hi,
This series enables parallel build of '.pdf' figures in the first build or a build after removing them by 'make distclean' or 'make neatfreak'.
It is by no means complete, but it works just fine for the evaluation purposes. Any feedback is welcome. Further improvements and cosmetic changes are in my to-do list.
Thanks, Akira
The series can also be pulled as follows:
----
The following changes since commit e719d43325af354d6f0a8a8c8d914b82430a9ff4:
Add TEST_HASH symbol to allow tests to be excluded (2016-05-30 09:50:52 -0700)
are available in the git repository at:
https://github.com/akiyks/perfbook.git cleanup-makefile
for you to fetch changes up to d6c5dc0374c6e558d0acc003273b42537e50297f:
Makefile: Promote eps2pdf.sh to implicit rules (2016-06-05 23:17:49 +0900)
----
Akira Yokosawa (3):
Remove .eps files whose sources are .dot
FAQ-BUILD.txt: Add graphviz package as required
Makefile: Promote eps2pdf.sh to implicit rules
FAQ-BUILD.txt | 4 +- Makefile | 62 ++--- advsync/.gitignore | 1 + advsync/store15tred.eps | 653 ------------------------------------------------ count/.gitignore | 1 + count/sig-theft.eps | 435 -------------------------------- 6 files changed, 30 insertions(+), 1126 deletions(-) create mode 100644 advsync/.gitignore delete mode 100644 advsync/store15tred.eps create mode 100644 count/.gitignore delete mode 100644 count/sig-theft.eps
Signature · 1 line
1.9.1
RFC PATCH 1/3 Remove .eps files whose sources are .dot
From 85f40552cad6745e4e04cf61a53107c116e3cef3 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 25 May 2016 23:40:34 +0900
Subject: [RFC PATCH 1/3] Remove .eps files whose sources are .dot
In commit 72b41446f032 ("rm qqz.tex and add store15tred.esp to repository"), advsync/store15tred.eps is added to the repository. However, since we already have an implicit rule for .dot -> .eps conversion, it is safe to remove .eps files whose sources are .dot files. This commit removes them.
It also updates .gitignore accordingly.
As for .eps files whose sources are .tex files, they used to be removed by 'make clean' before the cleanup of build scripts. This commit adds them as well as the removed .eps files to the 'distclean' rule.
--- Makefile | 4 +- advsync/.gitignore | 1 + advsync/store15tred.eps | 653 ------------------------------------------------ count/.gitignore | 1 + count/sig-theft.eps | 435 -------------------------------- 5 files changed, 5 insertions(+), 1089 deletions(-) create mode 100644 advsync/.gitignore delete mode 100644 advsync/store15tred.eps create mode 100644 count/.gitignore delete mode 100644 count/sig-theft.eps
Makefile +3 -1
@@ -49,7 +49,8 @@ EPSSOURCES = \ future/*.eps \ intro/*.eps \ locking/*.eps \ - $(EPSTARGETS_OF_TEX) + $(EPSTARGETS_OF_TEX) \ + $(EPSTARGETS_OF_DOT) BIBSOURCES = bib/*.bib
@@ -149,6 +150,7 @@ clean: distclean: clean sh utilities/cleanpdf.sh + rm -f $(EPSTARGETS_OF_DOT) $(EPSTARGETS_OF_TEX) touchsvg: find . -name '*.svg' | xargs touch
advsync/.gitignore new file +1 -0
@@ -0,0 +1 @@ +store15tred.eps
advsync/store15tred.eps deleted +0 -653
653 lines not on this page · raw message
count/.gitignore new file +1 -0
@@ -0,0 +1 @@ +sig-theft.eps
count/sig-theft.eps deleted +0 -435
435 lines not on this page · raw message
Signature · 1 line
1.9.1
RFC PATCH 2/3 FAQ-BUILD.txt: Add graphviz package as required
In reply to Akira YokosawaFrom 671ca17a531c5e658812c16c8983788f93b55293 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sat, 4 Jun 2016 15:33:50 +0900
Subject: [RFC PATCH 2/3] FAQ-BUILD.txt: Add graphviz package as required
The implicit rule for .dot -> .eps requires 'dot' command. It is availabe in the 'graphviz' package.
This commit adds it in item #5 of FAQ-BUILD.txt. It also update Ubuntu's release name as 'Trusty'.
--- FAQ-BUILD.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
FAQ-BUILD.txt +2 -2
@@ -34,14 +34,14 @@ find it? A. The "pdflatex" package is a variant of Don Knuth's - digital typesetting program. On Ubuntu Maverick, + digital typesetting program. On Ubuntu Trusty, installing the following set of packages suffices: texlive-latex-base texlive-latex-extra psutils texlive-publishers-doc texlive-fonts-extra texlive-math-extra texlive-publishers texlive-science texlive-bibtex-extra latex2html - gnuplot-x11 xfig inkscape + gnuplot-x11 xfig inkscape graphviz Other systems might provide similarly named packages. For example, Doug Miller noted that the following list
Signature · 1 line
1.9.1
RFC PATCH 3/3 Makefile: Promote eps2pdf.sh to implicit rules
In reply to Akira YokosawaFrom d6c5dc0374c6e558d0acc003273b42537e50297f Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Jun 2016 15:06:23 +0900
Subject: [RFC PATCH 3/3] Makefile: Promote eps2pdf.sh to implicit rules
In the first build or a build after removing '.pdf' files by 'make neatfreak' or 'make distclean', '.pdf' figures can be built in parallel if the rules for '.eps' -> 'pdf' and '.svn' -> 'pdf' are given in Makefile instead of shell scripts.
This commit adds what are done in utilities/eps2pdf.sh, etc. as implicit rules in Makefile.
As the result of the change, empty target 'embedfonts' is removed. Now 'make -j2' works fine despite several warnings of duplicated targets. Those warnings will be taken care of by a later patch.
Note that as of this commit, '-jN' option is not guaranteed to always work as expected.
It is safe to use it when you specify a single target.
Using '-jN' for multiple targets such as in 'make -j2 1c 2c', some of the targets may fail to build depending on the timing of parallel processing, supposedly due to interference of '.aux' files used by 'bibtex'.
--- Makefile | 64 ++++++++++++++++++++++++++-------------------------------------- 1 file changed, 26 insertions(+), 38 deletions(-)
Makefile +26 -38
@@ -26,42 +26,29 @@ LATEXSOURCES = \ together/*.tex \ toolsoftrade/*.tex -EPSTARGETS_OF_TEX = \ +EPSSOURCES_FROM_TEX = \ SMPdesign/DiningPhilosopher5.eps \ SMPdesign/DiningPhilosopher5TB.eps \ SMPdesign/DiningPhilosopher4part-b.eps \ SMPdesign/DiningPhilosopher5PEM.eps -EPSTARGETS_OF_DOT = \ +EPSSOURCES_FROM_DOT = \ advsync/store15tred.eps \ count/sig-theft.eps EPSSOURCES = \ - SMPdesign/*.eps \ - advsync/*.eps \ - appendix/questions/*.eps \ - appendix/whymb/*.eps \ - count/*.eps \ - cpu/*.eps \ - datastruct/*.eps \ - defer/*.eps \ - easy/*.eps \ - future/*.eps \ - intro/*.eps \ - locking/*.eps \ - $(EPSTARGETS_OF_TEX) \ - $(EPSTARGETS_OF_DOT) + $(wildcard */*.eps) \ + $(wildcard */*/*.eps) \ + $(EPSSOURCES_FROM_TEX) \ + $(EPSSOURCES_FROM_DOT) + +PDFTARGETS_OF_EPS := $(EPSSOURCES:%.eps=%.pdf) BIBSOURCES = bib/*.bib -SVGSOURCES = \ - cartoons/*.svg \ - debugging/*.svg \ - count/*.svg \ - SMPdesign/*.svg \ - defer/*.svg \ - datastruct/*.svg \ - rt/*.svg +SVGSOURCES = $(wildcard */*.svg) + +PDFTARGETS_OF_SVG := $(SVGSOURCES:%.svg=%.pdf) default = $(PERFBOOK_DEFAULT)
@@ -86,10 +73,10 @@ perfbook.pdf: perfbook.bbl perfbook.bbl: $(BIBSOURCES) perfbook.aux bibtex perfbook -perfbook.aux: $(LATEXSOURCES) extraction embedfonts +perfbook.aux: $(LATEXSOURCES) extraction sh utilities/runfirstlatex.sh perfbook -perfbook_flat.tex qqz.tex: perfbook.tex $(LATEXSOURCES) $(EPSSOURCES) embedfonts +perfbook_flat.tex qqz.tex: perfbook.tex $(LATEXSOURCES) $(EPSSOURCES) $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG) echo > qqz.tex texexpand perfbook.tex > perfbook_flat.tex sh utilities/extractqqz.sh < perfbook_flat.tex > qqz.tex
@@ -99,12 +86,6 @@ extraction: perfbook_flat.tex sh utilities/extractorigpub.sh < perfbook_flat.tex > origpub.tex touch extraction -embedfonts: $(EPSSOURCES) $(SVGSOURCES) - sh utilities/fixfigfonts.sh - sh utilities/fixdotfonts.sh - sh utilities/eps2pdf.sh - touch embedfonts - perfbook-1c.pdf: perfbook-1c.tex perfbook-1c.bbl sh utilities/runlatex.sh perfbook-1c
@@ -114,7 +95,7 @@ perfbook-1c.tex: perfbook.tex perfbook-1c.bbl: $(BIBSOURCES) perfbook-1c.aux bibtex perfbook-1c -perfbook-1c.aux: $(LATEXSOURCES) extraction embedfonts +perfbook-1c.aux: $(LATEXSOURCES) extraction sh utilities/runfirstlatex.sh perfbook-1c perfbook-hb.pdf: perfbook-hb.tex perfbook-hb.bbl
@@ -126,18 +107,25 @@ perfbook-hb.tex: perfbook.tex perfbook-hb.bbl: $(BIBSOURCES) perfbook-hb.aux bibtex perfbook-hb -perfbook-hb.aux: $(LATEXSOURCES) extraction embedfonts +perfbook-hb.aux: $(LATEXSOURCES) extraction sh utilities/runfirstlatex.sh perfbook-hb # Rules related to perfbook_html are removed as of May, 2016 -$(EPSTARGETS_OF_TEX): %.eps: %.tex +$(EPSSOURCES_FROM_TEX): %.eps: %.tex latex -output-directory=$(shell dirname $<) $< dvips -Pdownload35 -E $(patsubst %.tex,%.dvi,$<) -o $@ sh utilities/fixanepsfonts.sh $@ -$(EPSTARGETS_OF_DOT): %.eps: %.dot +$(EPSSOURCES_FROM_DOT): %.eps: %.dot dot -Tps -o $@ $< + sh utilities/fixanepsfonts.sh $@ + +$(PDFTARGETS_OF_EPS): %.pdf: %.eps + a2ping --below --hires --bboxfrom=compute-gs $< $@ + +$(PDFTARGETS_OF_SVG): %.pdf: %.svg + inkscape --export-pdf=$@ $< clean: find . -name '*.aux' -o -name '*.blg' \
@@ -146,11 +134,11 @@ clean: rm -f perfbook_flat.tex perfbook.out perfbook-1c.out rm -f qqz.tex rm -f perfbook-hb.out perfbook-1c.tex perfbook-hb.tex - rm -f extraction embedfonts + rm -f extraction distclean: clean sh utilities/cleanpdf.sh - rm -f $(EPSTARGETS_OF_DOT) $(EPSTARGETS_OF_TEX) + rm -f $(EPSSOURCES_FROM_DOT) $(EPSSOURCES_FROM_TEX) touchsvg: find . -name '*.svg' | xargs touch
Signature · 1 line
1.9.1
Paul E. McKenney
AppliedQuoted 7 lines · Akira Yokosawa
Quoted 1 line
From
d6c5dc0374c6e558d0acc003273b42537e50297fMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Jun 2016 23:34:26 +0900
Subject: [RFC PATCH 0/3] Another round of cleanup and improvement of build scriptsHi,
Quoted 7 lines
This series enables parallel build of '.pdf' figures in the first build or a build after removing them by 'make distclean' or 'make neatfreak'.
It is by no means complete, but it works just fine for the evaluation purposes. Any feedback is welcome. Further improvements and cosmetic changes are in my to-do list.
Thanks, Akira
I applied and pushed these, thank you.
(And yes, I missed the pull request, so the SHA-1's do not match, apologies!)
Thanx, Paul
Quoted 36 lines
The series can also be pulled as follows:
----
The following changes since commite719d43325af354d6f0a8a8c8d914b82430a9ff4:Add
TEST_HASHsymbol to allow tests to be excluded (2016-05-30 09:50:52 -0700)are available in the git repository at:
https://github.com/akiyks/perfbook.git cleanup-makefile
for you to fetch changes up to
d6c5dc0374c6e558d0acc003273b42537e50297f:
Makefile: Promoteeps2pdf.shto implicit rules (2016-06-05 23:17:49 +0900)
----Akira Yokosawa (3):
Remove .eps files whose sources are .dot
FAQ-BUILD.txt: Add graphviz package as required
Makefile: Promoteeps2pdf.shto implicit rulesFAQ-BUILD.txt | 4 +- Makefile | 62 ++--- advsync/.gitignore | 1 + advsync/store15tred.eps | 653 ------------------------------------------------ count/.gitignore | 1 + count/sig-theft.eps | 435 -------------------------------- 6 files changed, 30 insertions(+), 1126 deletions(-) create mode 100644 advsync/.gitignore delete mode 100644 advsync/store15tred.eps create mode 100644 count/.gitignore delete mode 100644 count/sig-theft.epsSignature · 1 line
1.9.1
Quoted 11 lines · Paul E. McKenney
Quoted 10 lines · Akira Yokosawa
Quoted 1 line
From
d6c5dc0374c6e558d0acc003273b42537e50297fMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Jun 2016 23:34:26 +0900
Subject: [RFC PATCH 0/3] Another round of cleanup and improvement of build scriptsHi,
This series enables parallel build of '.pdf' figures in the first build or a build after removing them by 'make distclean' or 'make neatfreak'.
Quoted 6 lines
Quoted 4 lines
It is by no means complete, but it works just fine for the evaluation purposes. Any feedback is welcome. Further improvements and cosmetic changes are in my to-do list.
Thanks, AkiraI applied and pushed these, thank you.
Oh! I didn't expect them to be applied at the half baked stage... Anyway, thanks.
Quoted 2 lines
(And yes, I missed the pull request, so the SHA-1's do not match, apologies!)
No problem!
I'll submit followup patches later today. (I mean within 20 hours.)
Thanks, Akira
Quoted 40 lines
Thanx, Paul
Quoted 36 lines
The series can also be pulled as follows:
----
The following changes since commite719d43325af354d6f0a8a8c8d914b82430a9ff4:Add
TEST_HASHsymbol to allow tests to be excluded (2016-05-30 09:50:52 -0700)are available in the git repository at:
https://github.com/akiyks/perfbook.git cleanup-makefile
for you to fetch changes up to
d6c5dc0374c6e558d0acc003273b42537e50297f:
Makefile: Promoteeps2pdf.shto implicit rules (2016-06-05 23:17:49 +0900)
----Akira Yokosawa (3):
Remove .eps files whose sources are .dot
FAQ-BUILD.txt: Add graphviz package as required
Makefile: Promoteeps2pdf.shto implicit rulesFAQ-BUILD.txt | 4 +- Makefile | 62 ++--- advsync/.gitignore | 1 + advsync/store15tred.eps | 653 ------------------------------------------------ count/.gitignore | 1 + count/sig-theft.eps | 435 -------------------------------- 6 files changed, 30 insertions(+), 1126 deletions(-) create mode 100644 advsync/.gitignore delete mode 100644 advsync/store15tred.eps create mode 100644 count/.gitignore delete mode 100644 count/sig-theft.epsSignature · 1 line
1.9.1
Quoted 17 lines · Akira Yokosawa
Quoted 16 lines · Paul E. McKenney
Quoted 14 lines · Akira Yokosawa
Quoted 1 line
From
d6c5dc0374c6e558d0acc003273b42537e50297fMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sun, 5 Jun 2016 23:34:26 +0900
Subject: [RFC PATCH 0/3] Another round of cleanup and improvement of build scriptsHi,
This series enables parallel build of '.pdf' figures in the first build or a build after removing them by 'make distclean' or 'make neatfreak'.
It is by no means complete, but it works just fine for the evaluation purposes. Any feedback is welcome. Further improvements and cosmetic changes are in my to-do list.
Thanks, Akira
Quoted 4 lines
Quoted 1 line
I applied and pushed these, thank you.
Oh! I didn't expect them to be applied at the half baked stage... Anyway, thanks.
Easy to back them out if you would rather rework them -- just let me know.
Quoted 6 lines
Quoted 2 lines
(And yes, I missed the pull request, so the SHA-1's do not match, apologies!)
No problem!
I'll submit followup patches later today. (I mean within 20 hours.)
Looking forward to them!
Thanx, Paul
Quoted 43 lines
Thanks, Akira
Quoted 40 lines
Thanx, Paul
Quoted 36 lines
The series can also be pulled as follows:
----
The following changes since commite719d43325af354d6f0a8a8c8d914b82430a9ff4:Add
TEST_HASHsymbol to allow tests to be excluded (2016-05-30 09:50:52 -0700)are available in the git repository at:
https://github.com/akiyks/perfbook.git cleanup-makefile
for you to fetch changes up to
d6c5dc0374c6e558d0acc003273b42537e50297f:
Makefile: Promoteeps2pdf.shto implicit rules (2016-06-05 23:17:49 +0900)
----Akira Yokosawa (3):
Remove .eps files whose sources are .dot
FAQ-BUILD.txt: Add graphviz package as required
Makefile: Promoteeps2pdf.shto implicit rulesFAQ-BUILD.txt | 4 +- Makefile | 62 ++--- advsync/.gitignore | 1 + advsync/store15tred.eps | 653 ------------------------------------------------ count/.gitignore | 1 + count/sig-theft.eps | 435 -------------------------------- 6 files changed, 30 insertions(+), 1126 deletions(-) create mode 100644 advsync/.gitignore delete mode 100644 advsync/store15tred.eps create mode 100644 count/.gitignore delete mode 100644 count/sig-theft.epsSignature · 1 line
1.9.1