aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis/make/initialize.mk
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/analysis/make/initialize.mk')
-rw-r--r--reproduce/analysis/make/initialize.mk39
1 files changed, 18 insertions, 21 deletions
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk
index a5d5b92..4bae0a4 100644
--- a/reproduce/analysis/make/initialize.mk
+++ b/reproduce/analysis/make/initialize.mk
@@ -77,21 +77,11 @@ endif
# (independent parts of the paper can be added to it independently). To fix
# this problem, when we are in a group setting, we'll use the user's ID to
# create a separate LaTeX build directory for each user.
-#
-# The same logic applies to the final paper PDF: each user will create a
-# separte final PDF (for example `paper-user1.pdf' and `paper-user2.pdf')
-# and no `paper.pdf' will be built. This isn't a problem because
-# `initialize.tex' is a .PHONY prerequisite, so the rule to build the final
-# paper is always executed (even if it is present and nothing has
-# changed). So in terms of over-all efficiency and processing steps, this
-# doesn't change anything.
ifeq (x$(GROUP-NAME),x)
texbtopdir = build
-final-paper = paper.pdf
else
user = $(shell whoami)
texbtopdir = build-$(user)
-final-paper = paper-$(user).pdf
endif
texbdir = $(texdir)/$(texbtopdir)
tikzdir = $(texbdir)/tikz
@@ -129,6 +119,7 @@ curdir := $(shell echo $$(pwd))
# we are also going to overwrite `TEXINPUTS' just before `pdflatex'.
.ONESHELL:
.SHELLFLAGS = -ec
+export TERM=xterm
export TEXINPUTS :=
export CCACHE_DISABLE := 1
export PATH := $(installdir)/bin
@@ -219,19 +210,15 @@ project-package-contents = $(texdir)/$(project-package-name)
# we want to ensure that the file is always built in every run: it contains
# the project version which may change between two separate runs, even when
# no file actually differs.
-.PHONY: all clean dist dist-zip dist-lzip texclean distclean clean-mmap \
+.PHONY: all clean dist dist-zip dist-lzip texclean distclean \
$(project-package-contents) $(mtexdir)/initialize.tex
-# --------- Delete for no Gnuastro ---------
-clean-mmap:; rm -f reproduce/config/gnuastro/mmap*
-# ------------------------------------------
-
texclean:
rm *.pdf
rm -rf $(BDIR)/tex/build/*
mkdir $(BDIR)/tex/build/tikz # 'tikz' is assumed to already exist.
-clean: clean-mmap
+clean:
# Delete the top-level PDF file.
rm -f *.pdf
@@ -282,10 +269,13 @@ $(project-package-contents): paper.pdf | $(texdir)
# (including the bibliography).
m=$$dir/Makefile
echo "paper.pdf: paper.tex paper.bbl" > $$m
- printf "\tpdflatex -shell-escape -halt-on-error paper\n" >> $$m
+ printf "\tlatex -shell-escape -halt-on-error paper\n" >> $$m
+ printf "\tdvips paper.dvi\n" >> $$m
+ printf "\tps2pdf -dNOSAFER paper.ps\n" >> $$m
echo "paper.bbl: tex/src/references.tex" >> $$m
- printf "\tpdflatex -shell-escape -halt-on-error paper\n" >> $$m
- printf "\tbiber paper\n" >> $$m
+ printf "\tlatex -shell-escape -halt-on-error paper\n" >> $$m
+ printf "\tbibtex paper\n" >> $$m
+ printf "\tlatex -shell-escape -halt-on-error paper\n" >> $$m
echo ".PHONY: clean" >> $$m
echo "clean:" >> $$m
printf "\trm -f *.aux *.auxlock *.bbl *.bcf\n" >> $$m
@@ -326,6 +316,8 @@ $(project-package-contents): paper.pdf | $(texdir)
# be using Bash's extended globbing ('extglob') for excluding this
# directory.
shopt -s extglob
+ cp -r tex/img $$dir/tex/img
+ cp tex/tikz/*.eps $$dir/tex/tikz
cp -r tex/build/!($(project-package-name)) $$dir/tex/build
# Clean up the $(texdir)/build* directories in the archive (when
@@ -353,8 +345,8 @@ $(project-package-contents): paper.pdf | $(texdir)
# that may cause problems on the arXiv server.
cp tex/build/build/paper.bbl $$dir/
tltopdir=.local/texlive/maneage/texmf-dist/tex/latex
- find $$tltopdir/biblatex/ -maxdepth 1 -type f -print0 \
- | xargs -0 cp -t $$dir
+ #find $$tltopdir/biblatex/ -maxdepth 1 -type f -print0 \
+ # | xargs -0 cp -t $$dir
# Just in case the package users want to rebuild some of the
# figures (manually un-comment the `makepdf' command we commented
@@ -492,6 +484,11 @@ $(mtexdir)/initialize.tex: | $(mtexdir)
echo "\newcommand{\projecttitle}{$(metadata-title)}" >> $@
echo "\newcommand{\projectversion}{$(project-commit-hash)}" >> $@
+ # arXiv/Zenodo identifier (necessary for download link):
+ echo "\newcommand{\projectarxivid}{$(metadata-arxiv)}" >> $@
+ v=$$(echo $(metadata-doi-zenodo) | sed -e's/\./ /g' | awk '{print $$NF}')
+ echo "\newcommand{\projectzenodoid}{$$v}" >> $@
+
# Calculate the latest Maneage commit used to build this
# project:
# - The project may not have the 'maneage' branch (for example