From: Akira Yokosawa <akiyks@gmail.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: perfbook@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH 1/2] Makefile: Use more automatic variables
Date: Fri, 14 Oct 2016 07:07:07 +0900 [thread overview]
Message-ID: <459f86ae-cb02-3eea-ab8b-eaebf0e68be5@gmail.com> (raw)
In-Reply-To: <dee02541-574c-3686-8dc7-5cb02303a408@gmail.com>
From 2d0765641c633f9e259339f0814259aefbae863e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 9 Oct 2016 20:38:46 +0900
Subject: [PATCH 1/2] Makefile: Use more automatic variables
This commit simplifies some rules by using automatic variables
such as "$<" and "$@".
It also simplifies the "clean" rule by using wildcards.
.gitignore is modified accordingly.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
.gitignore | 7 ++-----
Makefile | 15 +++++++--------
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index 4a2dc33..965b94d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,11 +18,8 @@ perfbook_flat.tex
qqz.tex
contrib.tex
origpub.tex
-perfbook.out
-perfbook-1c.tex
-perfbook-1c.out
-perfbook-hb.tex
-perfbook-hb.out
+perfbook*.out
+perfbook-*.tex
extraction
embedfonts
diff --git a/Makefile b/Makefile
index 55361c3..6e6d66b 100644
--- a/Makefile
+++ b/Makefile
@@ -80,22 +80,22 @@ perfbook_flat.tex: perfbook.tex $(LATEXSOURCES) $(PDFTARGETS_OF_EPS) $(PDFTARGET
echo > qqz.tex
echo > contrib.tex
echo > origpub.tex
- texexpand perfbook.tex > perfbook_flat.tex
+ texexpand perfbook.tex > $@
qqz.tex: perfbook_flat.tex
- sh utilities/extractqqz.sh < perfbook_flat.tex > qqz.tex
+ sh utilities/extractqqz.sh < $< > $@
contrib.tex: perfbook_flat.tex qqz.tex
- cat perfbook_flat.tex qqz.tex | sh utilities/extractcontrib.sh > contrib.tex
+ cat $^ | sh utilities/extractcontrib.sh > $@
origpub.tex: perfbook_flat.tex
- sh utilities/extractorigpub.sh < perfbook_flat.tex > origpub.tex
+ sh utilities/extractorigpub.sh < $< > $@
perfbook-1c.tex: perfbook.tex
- sed -e 's/,twocolumn//' -e 's/setboolean{twocolumn}{true}/setboolean{twocolumn}{false}/' < perfbook.tex > perfbook-1c.tex
+ sed -e 's/,twocolumn//' -e 's/setboolean{twocolumn}{true}/setboolean{twocolumn}{false}/' < $< > $@
perfbook-hb.tex: perfbook.tex
- sed -e 's/,twocolumn/&,letterpaperhb/' -e 's/setboolean{hardcover}{false}/setboolean{hardcover}{true}/' < perfbook.tex > perfbook-hb.tex
+ sed -e 's/,twocolumn/&,letterpaperhb/' -e 's/setboolean{hardcover}{false}/setboolean{hardcover}{true}/' < $< > $@
# Rules related to perfbook_html are removed as of May, 2016
@@ -139,9 +139,8 @@ clean:
find . -name '*.aux' -o -name '*.blg' \
-o -name '*.dvi' -o -name '*.log' \
-o -name '*.qqz' -o -name '*.toc' -o -name '*.bbl' | xargs rm -f
- rm -f perfbook_flat.tex perfbook.out perfbook-1c.out
+ rm -f perfbook_flat.tex perfbook*.out perfbook-*.tex
rm -f $(LATEXGENERATED)
- rm -f perfbook-hb.out perfbook-1c.tex perfbook-hb.tex
rm -f extraction
distclean: clean
--
2.7.4
next prev parent reply other threads:[~2016-10-13 22:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 22:05 [PATCH 0/2] Makefile cleanups Akira Yokosawa
2016-10-13 22:07 ` Akira Yokosawa [this message]
2016-10-13 22:08 ` [PATCH 2/2] Makefile: Use secondary expansion Akira Yokosawa
2016-10-14 14:51 ` [PATCH 0/2] Makefile cleanups Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=459f86ae-cb02-3eea-ab8b-eaebf0e68be5@gmail.com \
--to=akiyks@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=perfbook@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox