summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Yokosawa <akiyks@gmail.com>2023-10-13 23:39:18 +0900
committerPaul E. McKenney <paulmck@kernel.org>2023-10-13 16:38:21 -0700
commitc084237613eae98068aaf723b3f6d94014fcd711 (patch)
treea1b7c40ff9f8cca4a5b7568d156f6a91a9aba2bc
parentc2f9a99366b3fbfb479996df320f1d63fbf4f6e0 (diff)
downloadperfbook-c084237613eae98068aaf723b3f6d94014fcd711.tar.gz
Ignore emergency-save SVG files from Inkscape
When Inkscape is terminated by an error, it saves the SVG file it was processing into an emergency-save SVG file. In perfbook, this results in extra SVG files such as: - advsync/rt-regimes.svgi.2023_MM_DD_hh_mm_ss.0.svg - datastruct/hashzu-a.svgi.2023_MM_DD_hh_mm_ss.0.svg Ignore those files in successive runs of make and remove them in "make clean", "make cleanfigs", and "make cleanfigs-svg". Update .gitignore as well. Signed-off-by: Akira Yokosawa <akiyks@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
-rw-r--r--.gitignore1
-rw-r--r--Makefile8
2 files changed, 6 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index fa20ccb5..ce93394f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@
*.epsi
*__.eps
*.svgi
+*.svg*.svg
*.fcv
*.ltms
*.pdfp
diff --git a/Makefile b/Makefile
index 18639b60..6e220c2d 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,9 @@ FIGSOURCES := $(wildcard */*.fig) $(wildcard */*/*.fig)
EPSSOURCES_FROM_FIG := $(FIGSOURCES:%.fig=%.eps)
-SVGSOURCES := $(wildcard */*.svg)
+SVGSOURCES_ALL := $(wildcard */*.svg)
+SVG_EMERGENCY := $(wildcard */*.svg*.svg)
+SVGSOURCES := $(filter-out $(SVG_EMERGENCY),$(SVGSOURCES_ALL))
FAKE_EPS_FROM_SVG := $(SVGSOURCES:%.svg=%.eps)
PDFTARGETS_OF_SVG := $(SVGSOURCES:%.svg=%.pdf)
@@ -603,7 +605,7 @@ clean:
rm -f perfbook*.sil
rm -f CodeSamples/snippets.d
rm -f *.synctex*
- @rm -f $(OBSOLETE_FILES) $(EPSSOURCES_TMP)
+ @rm -f $(OBSOLETE_FILES) $(EPSSOURCES_TMP) $(SVG_EMERGENCY)
paper-clean:
rm -f $(BASE_DEPENDS)
@@ -627,7 +629,7 @@ cleanfigs-eps:
rm -f $(PDFTARGETS_OF_EPS)
cleanfigs-svg:
- rm -f $(PDFTARGETS_OF_SVG)
+ rm -f $(PDFTARGETS_OF_SVG) $(SVG_EMERGENCY)
cleanfigs: cleanfigs-eps cleanfigs-svg