Skip to content

Commit

Permalink
Refactor: remove duplication (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelcarmena authored and hmemcpy committed Aug 29, 2019
1 parent f7db7ca commit 2e472f0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ version.tex:
git describe --tags --always --long | tr -d '\n' >> version.tex
/bin/echo -n '}' >> version.tex

copy:
echo 'Creating output directory: $(GIT_VER)'
mkdir -p ../out/$(GIT_VER)
mv ctfp-reader.pdf ../out/$(GIT_VER)/category-theory-for-programmers.pdf
mv ctfp-print.pdf ../out/$(GIT_VER)/category-theory-for-programmers-print.pdf
copy: suffix = ''
copy: copy-task

copy-scala: suffix = '-scala'
copy-scala: copy-task

copy-scala: #remove this awful duplication ASAP
copy-task:
echo 'Creating output directory: $(GIT_VER)'
mkdir -p ../out/$(GIT_VER)
mv ctfp-reader-scala.pdf ../out/$(GIT_VER)/category-theory-for-programmers-scala.pdf
mv ctfp-print-scala.pdf ../out/$(GIT_VER)/category-theory-for-programmers-scala-print.pdf
mv ctfp-reader$(suffix).pdf ../out/$(GIT_VER)/category-theory-for-programmers$(suffix).pdf
mv ctfp-print$(suffix).pdf ../out/$(GIT_VER)/category-theory-for-programmers$(suffix)-print.pdf

clean:
rm -f *~ *.aux {ctfp-*}.{out,log,pdf,dvi,fls,fdb_latexmk,aux,brf,bbl,idx,ilg,ind,toc,sed}
if which latexmk > /dev/null 2>&1 ; then latexmk -CA; fi
rm -rf ../out

clean-minted:
rm -rf _minted-*
rm -rf _minted-*

0 comments on commit 2e472f0

Please sign in to comment.