Skip to contentSkip to conversation

Makefile: Automate OBSOLETE_FILES definition

PATCH In review Akira Yokosawa 2 participants 3 messages Jan 14, 2019 – Jan 15, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Makefile: Automate OBSOLETE_FILES definition

From 96dd811c7e084d97cbf4ef3b4b3f68099f6e15eb Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 15 Jan 2019 07:10:15 +0900
Subject: [PATCH 1/2] Makefile: Automate OBSOLETE_FILES definition

Commit 2da175371873 ('defer/rcu: Rework "Introduction to RCU"') obsoleted .eps files used to be generated from the removed .fig files. Instead of manually updating the variable in Makefile, automate the definition of OBSOLETE_FILES for replacements of ".fig -> .svg".

---
 Makefile | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
Makefile +8 -5
index 79ccd99..b76eea0 100644
@@ -12,7 +12,6 @@ LATEXSOURCES = \
 	*/*/*.tex
 
 LATEXGENERATED = autodate.tex qqz.tex contrib.tex origpub.tex
-OBSOLETE_FILES = intro/PPGrelation.eps extraction
 
 ABBREVTARGETS := tcb 1c hb msns mss mstx msr msn msnt 1csf
 
@@ -32,6 +31,12 @@ FIGSOURCES := $(wildcard */*.fig) $(wildcard */*/*.fig)
 
 EPSSOURCES_FROM_FIG := $(FIGSOURCES:%.fig=%.eps)
 
+SVGSOURCES := $(wildcard */*.svg)
+FAKE_EPS_FROM_SVG := $(SVGSOURCES:%.svg=%.eps)
+PDFTARGETS_OF_SVG := $(SVGSOURCES:%.svg=%.pdf)
+
+OBSOLETE_FILES = extraction $(FAKE_EPS_FROM_SVG)
+
 EPSSOURCES_DUP := \
 	$(wildcard */*.eps) \
 	$(wildcard */*/*.eps) \
@@ -51,9 +56,6 @@ PDFTARGETS_OF_EPSOTHER := $(filter-out $(PDFTARGETS_OF_EPSORIG),$(PDFTARGETS_OF_
 
 BIBSOURCES := bib/*.bib alphapf.bst
 
-SVGSOURCES := $(wildcard */*.svg)
-PDFTARGETS_OF_SVG := $(SVGSOURCES:%.svg=%.pdf)
-
 DOT := $(shell which dot 2>/dev/null)
 FIG2EPS := $(shell which fig2eps 2>/dev/null)
 A2PING := $(shell which a2ping 2>/dev/null)
@@ -294,8 +296,9 @@ clean:
 		-o -name '*.qqz' -o -name '*.toc' -o -name '*.bbl' \
 		-o -name '*.fcv' -o -name '*.ltms' | xargs rm -f
 	rm -f perfbook_flat.tex perfbook*.out perfbook-*.tex
-	rm -f $(LATEXGENERATED) $(OBSOLETE_FILES)
+	rm -f $(LATEXGENERATED)
 	rm -f CodeSamples/snippets.mk CodeSamples/snippets.d
+	@rm -f $(OBSOLETE_FILES)
 
 distclean: clean
 	sh utilities/cleanpdf.sh
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 datastruct/hash: Don't track hash_resize_s

From 707069024b111f58847b8994c2df3166d9307c20 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Tue, 15 Jan 2019 07:11:45 +0900
Subject: [PATCH 2/2] datastruct/hash: Don't track hash_resize_s

---
 CodeSamples/datastruct/hash/.gitignore | 1 +
 1 file changed, 1 insertion(+)
CodeSamples/datastruct/hash/.gitignore +1 -0
index 27c09e4..8d5939c 100644
@@ -3,3 +3,4 @@ hash_bkt_hazptr
 hash_bkt_rcu
 hash_global
 hash_resize
+hash_resize_s
Signature · 1 line
2.7.4
#2 lore raw
In reply to Akira Yokosawa
Quoted 5 lines · Akira Yokosawa
Quoted 1 line

From 96dd811c7e084d97cbf4ef3b4b3f68099f6e15eb Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Tue, 15 Jan 2019 07:10:15 +0900
Subject: [PATCH 1/2] Makefile: Automate OBSOLETE_FILES definition

Quoted 7 lines

Commit 2da175371873 ('defer/rcu: Rework "Introduction to RCU"') obsoleted .eps files used to be generated from the removed .fig files. Instead of manually updating the variable in Makefile, automate the definition of OBSOLETE_FILES for replacements of ".fig -> .svg".

Nice automation! I queued and pushed this plus the .gitignore update, thank you!!!

Thanx, Paul

Quoted 53 lines
---
 Makefile | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
Makefile +8 -5
index 79ccd99..b76eea0 100644
@@ -12,7 +12,6 @@ LATEXSOURCES = \
 	*/*/*.tex
 
 LATEXGENERATED = autodate.tex qqz.tex contrib.tex origpub.tex
-OBSOLETE_FILES = intro/PPGrelation.eps extraction
 
 ABBREVTARGETS := tcb 1c hb msns mss mstx msr msn msnt 1csf
 
@@ -32,6 +31,12 @@ FIGSOURCES := $(wildcard */*.fig) $(wildcard */*/*.fig)
 
 EPSSOURCES_FROM_FIG := $(FIGSOURCES:%.fig=%.eps)
 
+SVGSOURCES := $(wildcard */*.svg)
+FAKE_EPS_FROM_SVG := $(SVGSOURCES:%.svg=%.eps)
+PDFTARGETS_OF_SVG := $(SVGSOURCES:%.svg=%.pdf)
+
+OBSOLETE_FILES = extraction $(FAKE_EPS_FROM_SVG)
+
 EPSSOURCES_DUP := \
 	$(wildcard */*.eps) \
 	$(wildcard */*/*.eps) \
@@ -51,9 +56,6 @@ PDFTARGETS_OF_EPSOTHER := $(filter-out $(PDFTARGETS_OF_EPSORIG),$(PDFTARGETS_OF_
 
 BIBSOURCES := bib/*.bib alphapf.bst
 
-SVGSOURCES := $(wildcard */*.svg)
-PDFTARGETS_OF_SVG := $(SVGSOURCES:%.svg=%.pdf)
-
 DOT := $(shell which dot 2>/dev/null)
 FIG2EPS := $(shell which fig2eps 2>/dev/null)
 A2PING := $(shell which a2ping 2>/dev/null)
@@ -294,8 +296,9 @@ clean:
 		-o -name '*.qqz' -o -name '*.toc' -o -name '*.bbl' \
 		-o -name '*.fcv' -o -name '*.ltms' | xargs rm -f
 	rm -f perfbook_flat.tex perfbook*.out perfbook-*.tex
-	rm -f $(LATEXGENERATED) $(OBSOLETE_FILES)
+	rm -f $(LATEXGENERATED)
 	rm -f CodeSamples/snippets.mk CodeSamples/snippets.d
+	@rm -f $(OBSOLETE_FILES)
 
 distclean: clean
 	sh utilities/cleanpdf.sh
Signature · 1 line
2.7.4