Skip to contentSkip to conversation

Makefile: Keep perfbook-lt.tex in 'make clean'

PATCH Applied Akira Yokosawa 2 participants 2 messages Apr 1, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Keep perfbook-lt.tex in 'make clean'

From a6bd9bf5fa162e8b2c271e51163da3f2f27ac8c1 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 2 Apr 2020 00:04:56 +0900
Subject: [PATCH] Makefile: Keep perfbook-lt.tex in 'make clean'

Commit 39cb8ba9cf56 ("Let paper size be orthogonal to 1c/2c layout variations") changed the base of main .tex file from perfbook.tex to perfbook-lt.tex.
However, the recipe of "clean" was not updated and it removes perfbook-lt.tex rather than perfbook.tex.

Fix this by using a new variable GENERATED_MAIN in "clean".

Fixes 39cb8ba9cf56 ("Let paper size be orthogonal to 1c/2c layout variations")
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Makefile +2 -1
index a2786b1b..e24c5729 100644
@@ -22,6 +22,7 @@ TWOCOLTARGETS := mstx msr msn msnt sf qq nq
 ABBREVTARGETS := lt hb a4 1c tcb msns mss $(TWOCOLTARGETS) $(foreach v,$(TWOCOLTARGETS),1c$(v))
 
 PDFTARGETS := perfbook.pdf $(foreach v,$(ABBREVTARGETS),perfbook-$(v).pdf)
+GENERATED_MAIN := $(filter-out perfbook-lt.tex,$(foreach v,$(ABBREVTARGETS),perfbook-$(v).tex)) perfbook.tex
 
 EPSSOURCES_FROM_TEX := \
 	SMPdesign/DiningPhilosopher5.eps \
@@ -490,7 +491,7 @@ clean:
 		-o -name '*.dvi' -o -name '*.log' \
 		-o -name '*.qqz' -o -name '*.toc' -o -name '*.bbl' \
 		-o -name '*.pdfp' -o -name '*.pdfq' | xargs rm -f
-	rm -f perfbook_flat.tex perfbook*.out perfbook-*.tex
+	rm -f perfbook_flat.tex perfbook*.out $(GENERATED_MAIN)
 	rm -f $(LATEXGENERATED)
 	rm -f CodeSamples/snippets.d
 	rm -f *.synctex*
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Akira Yokosawa
Quoted 1 line

From a6bd9bf5fa162e8b2c271e51163da3f2f27ac8c1 Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Thu, 2 Apr 2020 00:04:56 +0900
Subject: [PATCH] Makefile: Keep perfbook-lt.tex in 'make clean'

Commit 39cb8ba9cf56 ("Let paper size be orthogonal to 1c/2c layout variations") changed the base of main .tex file from perfbook.tex to perfbook-lt.tex.
However, the recipe of "clean" was not updated and it removes perfbook-lt.tex rather than perfbook.tex.

Quoted 4 lines

Fix this by using a new variable GENERATED_MAIN in "clean".

Fixes 39cb8ba9cf56 ("Let paper size be orthogonal to 1c/2c layout variations")

Queued and pushed, thank you, Akira!

Thanx, Paul

Quoted 28 lines
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Makefile +2 -1
index a2786b1b..e24c5729 100644
@@ -22,6 +22,7 @@ TWOCOLTARGETS := mstx msr msn msnt sf qq nq
 ABBREVTARGETS := lt hb a4 1c tcb msns mss $(TWOCOLTARGETS) $(foreach v,$(TWOCOLTARGETS),1c$(v))
 
 PDFTARGETS := perfbook.pdf $(foreach v,$(ABBREVTARGETS),perfbook-$(v).pdf)
+GENERATED_MAIN := $(filter-out perfbook-lt.tex,$(foreach v,$(ABBREVTARGETS),perfbook-$(v).tex)) perfbook.tex
 
 EPSSOURCES_FROM_TEX := \
 	SMPdesign/DiningPhilosopher5.eps \
@@ -490,7 +491,7 @@ clean:
 		-o -name '*.dvi' -o -name '*.log' \
 		-o -name '*.qqz' -o -name '*.toc' -o -name '*.bbl' \
 		-o -name '*.pdfp' -o -name '*.pdfq' | xargs rm -f
-	rm -f perfbook_flat.tex perfbook*.out perfbook-*.tex
+	rm -f perfbook_flat.tex perfbook*.out $(GENERATED_MAIN)
 	rm -f $(LATEXGENERATED)
 	rm -f CodeSamples/snippets.d
 	rm -f *.synctex*
Signature · 1 line
2.17.1