Re: [PATCH] Makefile: Use implicit rules for various layout options

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

 



On Fri, Oct 07, 2016 at 12:24:54AM +0900, Akira Yokosawa wrote:
> >From 9300942224fc8072cad9d6582858993c5efa5131 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@xxxxxxxxx>
> Date: Thu, 6 Oct 2016 23:57:07 +0900
> Subject: [PATCH] Makefile: Use implicit rules for various layout options
> 
> This commit replaces redundant rules for perfbook.pdf,
> perfbook-1c.pdf, and perfbook-hb.pdf with custom implicit rules.
> These implicit rules will also help when you want to add
> tentative rules to try some experimental layout option.
> 
> Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>

Nice!  Queued and pushed, thank you!

							Thanx, Paul

> ---
>  Makefile | 32 ++++++++------------------------
>  1 file changed, 8 insertions(+), 24 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 0207473..55361c3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -9,6 +9,8 @@ LATEXSOURCES = \
> 
>  LATEXGENERATED = qqz.tex contrib.tex origpub.tex
> 
> +PDFTARGETS := perfbook.pdf perfbook-1c.pdf perfbook-hb.pdf
> +
>  EPSSOURCES_FROM_TEX := \
>  	SMPdesign/DiningPhilosopher5.eps \
>  	SMPdesign/DiningPhilosopher5TB.eps \
> @@ -65,14 +67,14 @@ all: $(targ)
> 
>  hb: perfbook-hb.pdf
> 
> -perfbook.pdf: perfbook.bbl
> -	sh utilities/runlatex.sh perfbook
> +$(PDFTARGETS): %.pdf: %.tex %.bbl
> +	sh utilities/runlatex.sh $(basename $@)
> 
> -perfbook.bbl: $(BIBSOURCES) perfbook.aux
> -	bibtex perfbook
> +$(PDFTARGETS:.pdf=.bbl): %.bbl: $(BIBSOURCES) %.aux
> +	bibtex $(basename $@)
> 
> -perfbook.aux: $(LATEXSOURCES) $(LATEXGENERATED)
> -	sh utilities/runfirstlatex.sh perfbook
> +$(PDFTARGETS:.pdf=.aux): $(LATEXSOURCES) $(LATEXGENERATED)
> +	sh utilities/runfirstlatex.sh $(basename $@)
> 
>  perfbook_flat.tex: perfbook.tex $(LATEXSOURCES) $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG)
>  	echo > qqz.tex
> @@ -89,30 +91,12 @@ contrib.tex: perfbook_flat.tex qqz.tex
>  origpub.tex: perfbook_flat.tex
>  	sh utilities/extractorigpub.sh < perfbook_flat.tex > origpub.tex
> 
> -perfbook-1c.pdf: perfbook-1c.tex perfbook-1c.bbl
> -	sh utilities/runlatex.sh perfbook-1c
> -
>  perfbook-1c.tex: perfbook.tex
>  	sed -e 's/,twocolumn//' -e 's/setboolean{twocolumn}{true}/setboolean{twocolumn}{false}/' < perfbook.tex > perfbook-1c.tex
> 
> -perfbook-1c.bbl: $(BIBSOURCES) perfbook-1c.aux
> -	bibtex perfbook-1c
> -
> -perfbook-1c.aux: $(LATEXSOURCES) $(LATEXGENERATED)
> -	sh utilities/runfirstlatex.sh perfbook-1c
> -
> -perfbook-hb.pdf: perfbook-hb.tex perfbook-hb.bbl
> -	sh utilities/runlatex.sh perfbook-hb
> -
>  perfbook-hb.tex: perfbook.tex
>  	sed -e 's/,twocolumn/&,letterpaperhb/' -e 's/setboolean{hardcover}{false}/setboolean{hardcover}{true}/' < perfbook.tex > perfbook-hb.tex
> 
> -perfbook-hb.bbl: $(BIBSOURCES) perfbook-hb.aux
> -	bibtex perfbook-hb
> -
> -perfbook-hb.aux: $(LATEXSOURCES) $(LATEXGENERATED)
> -	sh utilities/runfirstlatex.sh perfbook-hb
> -
>  # Rules related to perfbook_html are removed as of May, 2016
> 
>  $(EPSSOURCES_FROM_TEX): %.eps: %.tex
> -- 
> 2.7.4
> 

--
To unsubscribe from this list: send the line "unsubscribe perfbook" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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