From 0c30dba4c95de0ffca133eb24cd983ba82cab5c1 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 19 Oct 2019 12:06:08 +0100 Subject: Minor improvments in packaging of project with make dist The steps to package the project have been made slightly more clear and also the temporary directory that is created for packaging is deleted after the tarball is made. --- reproduce/analysis/make/initialize.mk | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'reproduce/analysis') diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 52e4ca1..d6ac011 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -275,9 +275,15 @@ $(packagecontents): paper.pdf | $(texdir) printf "\trm -f *.aux *.auxlock *.bbl *.bcf\n" >> $$m printf "\trm -f *.blg *.log *.out *.run.xml\n" >> $$m - # Copy the top-level contents into it. + # Copy the top-level contents (see next step for `paper.tex'). cp COPYING project README.md README-hacking.md $$dir/ + # Since the packaging is mainly intended for high-level building of + # the PDF with LaTeX, we'll comment the `makepdf' LaTeX macro in + # the paper. This will disable usage of TiKZ. + sed -e's|\\newcommand{\\makepdf}{}|%\\newcommand{\\makepdf}{}|' \ + paper.tex > $$dir/paper.tex + # Build the top-level directories. mkdir $$dir/reproduce $$dir/tex $$dir/tex/tikz $$dir/tex/build @@ -314,17 +320,6 @@ $(packagecontents): paper.pdf | $(texdir) find $$tltopdir/biblatex/ -maxdepth 1 -type f -print0 \ | xargs -0 cp -t $$dir - # PROJECT SPECIFIC - # ---------------- - # Put any project specific distribution steps here. - # ---------------- - - # Since the packaging is mainly intended for high-level building of - # the PDF with LaTeX, we'll comment the `makepdf' LaTeX macro in - # the paper. This will disable usage of TiKZ. - sed -e's|\\newcommand{\\makepdf}{}|%\\newcommand{\\makepdf}{}|' \ - paper.tex > $$dir/paper.tex - # Just in case the package users want to rebuild some of the # figures (manually un-comment the `makepdf' command we commented # above), correct the TikZ external directory, so the figures can @@ -337,12 +332,18 @@ $(packagecontents): paper.pdf | $(texdir) cd $(texdir) find $(packagebasename) -name \*~ -delete + # PROJECT SPECIFIC + # ---------------- + # Put any project specific distribution steps here. + # ---------------- + # Package into `.tar.gz'. dist: $(packagecontents) curdir=$$(pwd) cd $(texdir) tar -cf $(packagebasename).tar $(packagebasename) gzip -f --best $(packagebasename).tar + rm -rf $(packagebasename) cd $$curdir mv $(texdir)/$(packagebasename).tar.gz ./ @@ -351,6 +352,7 @@ dist-zip: $(packagecontents) curdir=$$(pwd) cd $(texdir) zip -q -r $(packagebasename).zip $(packagebasename) + rm -rf $(packagebasename) cd $$curdir mv $(texdir)/$(packagebasename).zip ./ -- cgit v1.2.1