[PATCH -perfbook 1/7] Makefile: Ignore temporary .eps files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Recipes in epstopdf-rule.mk and a2ping-rule.mk use *__.eps and
*__.pdf as temporary files for fixing fonts and cropping.

Those files are removed afterwards in normal builds, but if you
interrupt "make", they can escape from removals.

They may cause a build error in subsequent "make", which might not
be resolved by "make clean" but needs "make neatfreak".

Add variable EPSSOURCES_TMP in Makefile and filter them out from
EPSSOURCES.

Add a pattern in .gitignore for them as well.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 .gitignore |  1 +
 Makefile   | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3711e0c6..1604a4d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,7 @@
 *.swo
 *_backup.svg
 *.epsi
+*__.eps
 *.svgi
 *.fcv
 *.ltms
diff --git a/Makefile b/Makefile
index e09ba32d..a605487a 100644
--- a/Makefile
+++ b/Makefile
@@ -67,13 +67,20 @@ EPSSOURCES_DUP := \
 	$(EPSSOURCES_FROM_DOT) \
 	$(EPSSOURCES_FROM_FIG)
 
+EPSSOURCES_TMP := \
+	$(wildcard */*__.eps) \
+	$(wildcard */*/*__.eps) \
+	$(wildcard */*/*/*__.eps) \
+	$(wildcard */*/*/*/*__.eps) \
+	$(wildcard */*/*/*/*/*__.eps) \
+
 EPSSOURCES_OLD := \
 	$(wildcard CodeSamples/*/*/OLD-*/*.eps) \
 	$(wildcard CodeSamples/*/*/OLD-*/*/*.eps) \
 	$(wildcard CodeSamples/*/*/*/OLD-*/*.eps) \
 	$(wildcard CodeSamples/*/*/*/OLD-*/*/*.eps)
 
-EPSSOURCES := $(sort $(filter-out $(EPSSOURCES_OLD),$(filter-out $(OBSOLETE_FILES),$(EPSSOURCES_DUP))))
+EPSSOURCES := $(sort $(filter-out $(EPSSOURCES_OLD),$(filter-out $(OBSOLETE_FILES) $(EPSSOURCES_TMP),$(EPSSOURCES_DUP))))
 
 PDFTARGETS_OF_EPS := $(EPSSOURCES:%.eps=%.pdf)
 
@@ -564,7 +571,7 @@ clean:
 	rm -f perfbook*.glg perfbook*.glo perfbook*.gls perfbook*.glsdefs
 	rm -f CodeSamples/snippets.d
 	rm -f *.synctex*
-	@rm -f $(OBSOLETE_FILES)
+	@rm -f $(OBSOLETE_FILES) $(EPSSOURCES_TMP)
 
 paper-clean:
 	rm -f $(BASE_DEPENDS)
-- 
2.25.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux