aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis/make
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2021-01-09 23:36:58 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2021-01-09 23:44:32 +0000
commit55d6570aecc5f442399262b7faa441d16ccd4556 (patch)
tree0e23073eadd7f5169b3ce38e829763a65e71b5cb /reproduce/analysis/make
parente3f4be66020538e3ab641f91405b8c07582e5862 (diff)
parentd9a6855948fad17fa0fbc2017ab2be0238ca8b72 (diff)
Imported recent changes in Maneage, minor single conflict fixed
There was a single conflict in the comments of one part of 'configure.sh' that has been fixed. There was also a single place that needed to convert 'BDIR' to 'badir' in this project (so after the merge, it also built easily).
Diffstat (limited to 'reproduce/analysis/make')
-rw-r--r--reproduce/analysis/make/format.mk2
-rw-r--r--reproduce/analysis/make/initialize.mk53
-rw-r--r--reproduce/analysis/make/prepare.mk2
3 files changed, 35 insertions, 22 deletions
diff --git a/reproduce/analysis/make/format.mk b/reproduce/analysis/make/format.mk
index efd9918..fd4060a 100644
--- a/reproduce/analysis/make/format.mk
+++ b/reproduce/analysis/make/format.mk
@@ -23,7 +23,7 @@
# Save the "Table 3" spreadsheet from the downloaded `.xlsx' file into a
# simple plain-text file that is easy to use.
-a1dir = $(BDIR)/analysis1
+a1dir = $(badir)/analysis1
mk20tab3 = $(a1dir)/table-3.txt
$(a1dir):; mkdir $@
$(mk20tab3): $(indir)/menke20.xlsx | $(a1dir)
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk
index 8f1769e..168010f 100644
--- a/reproduce/analysis/make/initialize.mk
+++ b/reproduce/analysis/make/initialize.mk
@@ -30,14 +30,24 @@
# parallel. Also, some programs may not be thread-safe, therefore it will
# be necessary to put a lock on them. This project uses the `flock' program
# to achieve this.
-texdir = $(BDIR)/tex
-lockdir = $(BDIR)/locks
-indir = $(BDIR)/inputs
-prepdir = $(BDIR)/prepare
+#
+# To help with modularity and clarity of the build directory (not mixing
+# software-environment built-products with products built by the analysis),
+# it is recommended to put all your analysis outputs in the 'analysis'
+# subdirectory of the top-level build directory.
+badir=$(BDIR)/analysis
+bsdir=$(BDIR)/software
+
+# Derived directories (the locks directory can be shared with software
+# which already has this directory.).
+texdir = $(badir)/tex
+lockdir = $(bsdir)/locks
+indir = $(badir)/inputs
+prepdir = $(padir)/prepare
mtexdir = $(texdir)/macros
+installdir = $(bsdir)/installed
bashdir = reproduce/analysis/bash
pconfdir = reproduce/analysis/config
-installdir = $(BDIR)/software/installed
@@ -56,7 +66,7 @@ installdir = $(BDIR)/software/installed
ifeq (x$(project-phase),xprepare)
$(prepdir):; mkdir $@
else
-include $(BDIR)/software/preparation-done.mk
+include $(bsdir)/preparation-done.mk
ifeq (x$(include-prepare-results),xyes)
include $(prepdir)/*.mk
endif
@@ -184,7 +194,7 @@ export MPI_PYTHON3_SITEARCH :=
# option: they add too many extra checks that make it hard to find what you
# are looking for in the outputs.
.SUFFIXES:
-$(lockdir): | $(BDIR); mkdir $@
+$(lockdir): | $(bsdir); mkdir $@
@@ -215,8 +225,8 @@ project-package-contents = $(texdir)/$(project-package-name)
texclean:
rm *.pdf
- rm -rf $(BDIR)/tex/build/*
- mkdir $(BDIR)/tex/build/tikz # 'tikz' is assumed to already exist.
+ rm -rf $(texdir)/build/*
+ mkdir $(texdir)/build/tikz # 'tikz' is assumed to already exist.
clean:
# Delete the top-level PDF file.
@@ -228,10 +238,10 @@ clean:
# 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|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
+ rm -rf $(texdir)/macros/!(dependencies.tex|dependencies-bib.tex|hardware-parameters.tex)
+ rm -rf $(badir)/!(tex) $(texdir)/!(macros|$(texbtopdir))
+ rm -rf $(texdir)/build/!(tikz) $(texdir)/build/tikz/*
+ rm -rf $(bsdir)/preparation-done.mk
distclean: clean
# Without cleaning the Git hooks, we won't be able to easily
@@ -398,14 +408,15 @@ dist-zip: $(project-package-contents)
dist-software:
curdir=$$(pwd)
dirname=software-$(project-commit-hash)
- cd $(BDIR)
+ cd $(bsdir)
+ if [ -d $$dirname ]; then rm -rf $$dirname; fi
mkdir $$dirname
- cp -L software/tarballs/* $$dirname/
+ cp -L tarballs/* $$dirname/
tar -cf $$dirname.tar $$dirname
gzip -f --best $$dirname.tar
rm -rf $$dirname
cd $$curdir
- mv $(BDIR)/$$dirname.tar.gz ./
+ mv $(bsdir)/$$dirname.tar.gz ./
@@ -422,9 +433,11 @@ dist-software:
#
# 1. Those data that also go into LaTeX (for example to give to LateX's
# PGFPlots package to create the plot internally) should be under the
-# '$(BDIR)/tex' directory (because other LaTeX producers may also need
-# it for example when using './project make dist'). The contents of
-# this directory are directly taken into the tarball.
+# '$(texdir)' directory (because other LaTeX producers may also need it
+# for example when using './project make dist', or you may want to
+# publish the raw data behind the plots, like:
+# https://zenodo.org/record/4291207/files/tools-per-year.txt). The
+# contents of this directory are also directly taken into the tarball.
#
# 2. The data that aren't included directly in the LaTeX run of the paper,
# can be seen as supplements. A good place to keep them is under your
@@ -436,7 +449,7 @@ dist-software:
# (or paper's tex/appendix), you will put links to the dataset on servers
# like Zenodo (see the "Publication checklist" in 'README-hacking.md').
tex-publish-dir = $(texdir)/to-publish
-data-publish-dir = $(BDIR)/data-to-publish
+data-publish-dir = $(badir)/data-to-publish
$(tex-publish-dir):; mkdir $@
$(data-publish-dir):; mkdir $@
diff --git a/reproduce/analysis/make/prepare.mk b/reproduce/analysis/make/prepare.mk
index 995132c..d0b61d9 100644
--- a/reproduce/analysis/make/prepare.mk
+++ b/reproduce/analysis/make/prepare.mk
@@ -23,7 +23,7 @@
#
# Without this file, `./project make' won't work.
prepare-dep = $(subst prepare, ,$(makesrc))
-$(BDIR)/software/preparation-done.mk: \
+$(bsdir)/preparation-done.mk: \
$(foreach s, $(prepare-dep), $(mtexdir)/$(s).tex)
# If you need to add preparations define targets above to do the