hmemcpy / milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
Other
10.88k stars 578 forks source link

Refactor: remove duplication in Makefile #207

Closed rachelcarmena closed 4 years ago

rachelcarmena commented 4 years ago

Hi @hmemcpy !

I'm preparing the files for Kotlin edition and I saw this comment in Makefile:

#remove this awful duplication ASAP

This super tiny pull request is making a proposal for removing that duplication.

The variable definition is not necessary for the copy target so this line could be removed:

copy: suffix = ''

However, I prefer to make things explicit.

You'll see something like:

mv ctfp-reader''.pdf ../out/v1.3.0-2-gf7db7ca/category-theory-for-programmers''.pdf
mv ctfp-print''.pdf ../out/v1.3.0-2-gf7db7ca/category-theory-for-programmers''-print.pdf

or:

mv ctfp-reader'-scala'.pdf ../out/v1.3.0-2-gf7db7ca/category-theory-for-programmers'-scala'.pdf
mv ctfp-print'-scala'.pdf ../out/v1.3.0-2-gf7db7ca/category-theory-for-programmers'-scala'-print.pdf

And the directory content will be the expected one:

$ tree out/v1.3.0-2-gf7db7ca/
out/v1.3.0-2-gf7db7ca/
├── category-theory-for-programmers.pdf
├── category-theory-for-programmers-print.pdf
├── category-theory-for-programmers-scala.pdf
└── category-theory-for-programmers-scala-print.pdf
hmemcpy commented 4 years ago

This is awesome, thank you so much! :D

rachelcarmena commented 4 years ago

Thanks to you, Igal! :tada: