aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/analysis/make/prepare.mk35
-rw-r--r--reproduce/analysis/make/top-make.mk (renamed from reproduce/analysis/make/top.mk)0
-rw-r--r--reproduce/analysis/make/top-prepare.mk91
-rwxr-xr-xreproduce/software/bash/configure.sh6
4 files changed, 129 insertions, 3 deletions
diff --git a/reproduce/analysis/make/prepare.mk b/reproduce/analysis/make/prepare.mk
new file mode 100644
index 0000000..3e41fa9
--- /dev/null
+++ b/reproduce/analysis/make/prepare.mk
@@ -0,0 +1,35 @@
+# Basic preparations, called by `./project prepare'.
+#
+# Copyright (C) 2019 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+#
+# This Makefile is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This Makefile is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details. See <http://www.gnu.org/licenses/>.
+
+
+
+
+
+# Final-target
+#
+# Without this file, `./project make' won't work.
+$(BDIR)/software/preparation-done.txt:
+
+ # If you need to add preparations define targets above to do the
+ # preparations. Recall that before this file, `top-prepare.mk'
+ # loads `initialize.mk' and `download.mk', so you can safely assume
+ # everything that is defined there in this Makefile.
+ #
+ # TIP: the targets can actually be automatically generated
+ # Makefiles that are used by `./project make'. They can include
+ # variables, or actual rules. Just make sure that those Makefiles
+ # aren't written in the source directory! Even though they are
+ # Makefiles, they are automatically built, so they should be
+ # somewhere under $(BDIR).
+ @touch $@
diff --git a/reproduce/analysis/make/top.mk b/reproduce/analysis/make/top-make.mk
index 7d20800..7d20800 100644
--- a/reproduce/analysis/make/top.mk
+++ b/reproduce/analysis/make/top-make.mk
diff --git a/reproduce/analysis/make/top-prepare.mk b/reproduce/analysis/make/top-prepare.mk
new file mode 100644
index 0000000..3353638
--- /dev/null
+++ b/reproduce/analysis/make/top-prepare.mk
@@ -0,0 +1,91 @@
+# Do basic preparations to optimize the project's running.
+#
+# NOTE: This file is very similar to `top-make.mk', so the large comments
+# are not included here. Please see that file for thorough comments on each
+# step.
+#
+# Copyright (C) 2019 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+#
+# This Makefile is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This Makefile is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# A copy of the GNU General Public License is available at
+# <http://www.gnu.org/licenses/>.
+
+
+
+
+
+# Load the local configuration (created after running
+# `./project configure').
+include reproduce/software/config/installation/LOCAL.mk
+
+
+
+
+
+# Ultimate target of this project
+# -------------------------------
+#
+# See `top-make.mk' for complete explanation.
+ifeq (x$(reproducible_paper_group_name),x$(GROUP-NAME))
+all: $(BDIR)/software/preparation-done.txt
+ @echo "";
+ echo "----------------"
+ echo "Project preparation has been completed without any errors."
+ echo ""
+ echo "Please run the following command to start building the project."
+ echo "(Replace '8' with the number of CPU threads on your system)"
+ echo ""
+ if [ "x$(GROUP-NAME)" = x ]; then
+ echo " $$ ./project make"
+ else
+ echo " $$ ./project make --group=$(GROUP-NAME) -j8"
+ fi
+ echo ""
+else
+all:
+ @if [ "x$(GROUP-NAME)" = x ]; then
+ echo "Project is NOT configured for groups, please run"
+ echo " $$ ./project prepare"
+ else
+ echo "Project is configured for groups, please run"
+ echo " $$ ./project prepare --group=$(GROUP-NAME) -j8"
+ fi
+endif
+
+
+
+
+
+# Define source Makefiles
+# -----------------------
+#
+# See `top-make.mk' for complete explanation.
+#
+# To ensure that `prepare' and `make' have the same basic definitions and
+# environment and that all `downloads' are managed in one place, both
+# `./project prepare' and `./project make' will first read `initialize.mk'
+# and `downloads.mk'.
+makesrc = initialize \
+ download \
+ prepare
+
+
+
+
+
+# Include all analysis Makefiles
+# ------------------------------
+#
+# See `top-make.mk' for complete explanation.
+include reproduce/analysis/config/*.mk
+include reproduce/software/config/installation/versions.mk
+include $(foreach s,$(makesrc), reproduce/analysis/make/$(s).mk)
diff --git a/reproduce/software/bash/configure.sh b/reproduce/software/bash/configure.sh
index 5c46496..7ef576a 100755
--- a/reproduce/software/bash/configure.sh
+++ b/reproduce/software/bash/configure.sh
@@ -1387,9 +1387,9 @@ echo `.local/bin/date` > $finaltarget
# The configuration is now complete, we can inform the user on the next
# step(s) to take.
if [ x$reproducible_paper_group_name = x ]; then
- buildcommand="./project make -j8"
+ buildcommand="./project prepare -j8"
else
- buildcommand="./project make --group=$reproducible_paper_group_name -j8"
+ buildcommand="./project prepare --group=$reproducible_paper_group_name -j8"
fi
cat <<EOF
@@ -1397,7 +1397,7 @@ cat <<EOF
The project and its environment are configured with no errors.
Please run the following command to start.
-(Replace '8' with the number of CPU threads)
+(Replace '8' with the number of CPU threads on your system)
$buildcommand