aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis/make
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-12-01 16:36:04 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-12-01 16:38:08 +0000
commita9786200d5ed5bde30cb29b445e2a6af06694b2e (patch)
treeca1f3277f6ee724b43e458a5df25795a665827fe /reproduce/analysis/make
parent8fbf384f7ca3d3cba566194c21da23ee6c9374be (diff)
parentac8eee90b1580fb566ee5b84fef9acb4ed437c01 (diff)
Imported recent work in Maneage, minor conflicts fixed
Some minor conflicts that came up during the merge were fixed.
Diffstat (limited to 'reproduce/analysis/make')
-rw-r--r--reproduce/analysis/make/initialize.mk24
-rw-r--r--reproduce/analysis/make/paper.mk16
-rw-r--r--reproduce/analysis/make/top-make.mk4
-rw-r--r--reproduce/analysis/make/verify.mk8
4 files changed, 27 insertions, 25 deletions
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk
index 6431863..75f87ee 100644
--- a/reproduce/analysis/make/initialize.mk
+++ b/reproduce/analysis/make/initialize.mk
@@ -38,9 +38,6 @@ mtexdir = $(texdir)/macros
bashdir = reproduce/analysis/bash
pconfdir = reproduce/analysis/config
installdir = $(BDIR)/software/installed
-# --------- Delete for no Gnuastro ---------
-gconfdir = reproduce/analysis/config/gnuastro
-# ------------------------------------------
@@ -240,7 +237,7 @@ clean: clean-mmap
# features like ignoring the listing of a file with `!()' that we
# are using afterwards.
shopt -s extglob
- rm -rf $(BDIR)/tex/macros/!(dependencies.tex|dependencies-bib.tex)
+ rm -rf $(BDIR)/tex/macros/!(dependencies.tex|dependencies-bib.tex|hardware-parameters.tex)
rm -rf $(BDIR)/!(software|tex) $(BDIR)/tex/!(macros|$(texbtopdir))
rm -rf $(BDIR)/tex/build/!(tikz) $(BDIR)/tex/build/tikz/*
rm -rf $(BDIR)/software/preparation-done.mk
@@ -255,8 +252,8 @@ distclean: clean
# `rm' program. So for this recipe, we'll use the host system's
# `rm', not our own.
$$sys_rm -rf $(BDIR)
+ $$sys_rm -f $(pconfdir)/LOCAL.conf
$$sys_rm -f Makefile .gnuastro .local .build
- $$sys_rm -f $(pconfdir)/LOCAL.conf $(gconfdir)/gnuastro-local.conf
@@ -487,8 +484,13 @@ print-copyright = \
# actually exists, it is also aded as a `.PHONY' target above.
$(mtexdir)/initialize.tex: | $(mtexdir)
- # Version and title of project.
- @echo "\newcommand{\projecttitle}{$(metadata-title)}" > $@
+ # Version and title of project. About the starting '@': since these
+ # commands are run every time with './project make', it is annoying
+ # to print them on the standard output every time. With the '@',
+ # make will not print the commands that it runs in this recipe.
+ @d=$$(git show -s --format=%aD HEAD | awk '{print $$2, $$3, $$4}')
+ echo "\newcommand{\projectdate}{$$d}" > $@
+ echo "\newcommand{\projecttitle}{$(metadata-title)}" >> $@
echo "\newcommand{\projectversion}{$(project-commit-hash)}" >> $@
# arXiv/Zenodo identifier (necessary for download link):
@@ -505,10 +507,6 @@ $(mtexdir)/initialize.tex: | $(mtexdir)
# after cloning from a fork that didn't include it!). In this
# case, we'll just return the string a clear string.
v=$$(git describe --always --long maneage) || v=maneage-ref-missing
+ d=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}')
+ echo "\newcommand{\maneagedate}{$$d}" >> $@
echo "\newcommand{\maneageversion}{$$v}" >> $@
-
- # Get the date of the most recent commit from the Maneage
- # branch. Note that with '%aD', the format looks like this:
- # Wed, 9 Sep 2020 10:08:20 +0200
- v=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}')
- echo "\newcommand{\maneagedate}{$$v}" >> $@
diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk
index 6a974d9..d8f18b3 100644
--- a/reproduce/analysis/make/paper.mk
+++ b/reproduce/analysis/make/paper.mk
@@ -37,14 +37,14 @@
# completed.
#
# Note that if you don't want the final PDF and just want the processing
-# and file outputs, you can remove the value of `pdf-build-final' in
-# `reproduce/analysis/config/pdf-build.conf'.
+# and file outputs, you can give any value other than 'yes' to
+# 'pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'.
$(mtexdir)/project.tex: $(mtexdir)/verify.tex
# If no PDF is requested, or if LaTeX isn't available, don't
# continue to building the final PDF. Otherwise, merge all the TeX
# macros into one for building the PDF.
- @if [ -f .local/bin/latex ] && [ x"$(pdf-build-final)" != x ]; then
+ @if [ -f .local/bin/latex ] && [ x"$(pdf-build-final)" = xyes ]; then
# Put a LaTeX input command for all the necessary macro files.
# 'hardware-parameters.tex' is created in 'configure.sh'.
@@ -77,11 +77,11 @@ $(mtexdir)/project.tex: $(mtexdir)/verify.tex
echo "LaTeX-built PDF paper will not be built."
echo
if [ x$(more-on-building-pdf) = x1 ]; then
- echo "To do so, make sure you have LaTeX within the project (you"
- echo "can check by running './.local/bin/latex --version'), _AND_"
- echo "make sure that the 'pdf-build-final' variable has a value."
- echo "'pdf-build-final' is defined in: "
- echo "'reproduce/analysis/config/pdf-build.conf'."
+ echo "To build the PDF, make sure you have LaTeX within the "
+ echo "project (you can check by running "
+ echo "'./.local/bin/latex --version'), _AND_ make sure that "
+ echo "the 'pdf-build-final' variable has a value of 'yes', it "
+ echo "is defined in: 'reproduce/analysis/config/pdf-build.conf'."
echo
echo "If you don't have LaTeX within the project, please re-run"
echo "'./project configure -e' when you have internet access."
diff --git a/reproduce/analysis/make/top-make.mk b/reproduce/analysis/make/top-make.mk
index 55b1f43..18d54b1 100644
--- a/reproduce/analysis/make/top-make.mk
+++ b/reproduce/analysis/make/top-make.mk
@@ -62,8 +62,8 @@ include reproduce/software/config/LOCAL.conf
# -----------------------------
#
# If you are just interested in the processing and don't want to build the
-# PDF, you can skip the creation of the final PDF by removing the value
-# of `pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'.
+# PDF, you can skip the creation of the final PDF by giving a value of
+# `yes' to `pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'.
ifeq (x$(reproducible_paper_group_name),x$(GROUP-NAME))
all: paper.pdf
else
diff --git a/reproduce/analysis/make/verify.mk b/reproduce/analysis/make/verify.mk
index fe828dd..35f49db 100644
--- a/reproduce/analysis/make/verify.mk
+++ b/reproduce/analysis/make/verify.mk
@@ -114,8 +114,12 @@ verify-dep = $(subst verify,,$(subst paper,,$(makesrc)))
verify-check = $(subst initialize,,$(verify-dep))
$(mtexdir)/verify.tex: $(foreach s, $(verify-dep), $(mtexdir)/$(s).tex)
- # Make sure that verification is actually requested.
- if [ x"$(verify-outputs)" = xyes ]; then
+ # Make sure that verification is actually requested, the '@' at the
+ # start of the recipe is added so Make doesn't print the commands
+ # on the standard output because this recipe is run on every call
+ # to the project and can be annoying (get mixed in the middle of
+ # the analysis outputs or the LaTeX outputs).
+ @if [ x"$(verify-outputs)" = xyes ]; then
# Make sure the temporary output doesn't exist (because we want
# to append to it). We are making a temporary output target so if