aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-10-19 12:06:08 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-10-19 12:06:08 +0100
commit0c30dba4c95de0ffca133eb24cd983ba82cab5c1 (patch)
tree314bacf2f0d4b5fed953ccf9909452e6b332c70f /reproduce
parentd4835357d2e96fd8a3a33bfaf9f7b459ba31e978 (diff)
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.
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/analysis/make/initialize.mk26
1 files changed, 14 insertions, 12 deletions
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 ./