aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/initialize.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-12 20:28:21 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-12 20:31:10 +0000
commit393bc1e84addf5c17b056a86c27356eb8d2ea7d9 (patch)
tree2370ea0b65b6c0dc3b9c7ec73dbd17e1ba28842c /reproduce/src/make/initialize.mk
parent7d8d0b0855826308b1dc63c7c6f2ac43e45c4a33 (diff)
Libcurl, Git, CMake, TIFF, Zlib also built at configure time
During the configuration step several new programs that were necessary for a more complete controlled environment are now also downloaded and built statically.
Diffstat (limited to 'reproduce/src/make/initialize.mk')
-rw-r--r--reproduce/src/make/initialize.mk29
1 files changed, 26 insertions, 3 deletions
diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk
index 165db78..5fd87c9 100644
--- a/reproduce/src/make/initialize.mk
+++ b/reproduce/src/make/initialize.mk
@@ -47,6 +47,16 @@ pconfdir = reproduce/config/pipeline
+# System's environment
+# --------------------
+#
+# Before defining the local sub-environment here, we'll need to save the
+# system's environment for some scenarios (for example after `clean'ing the
+# built programs).
+sys-rm := $(shell which rm)
+
+
+
# High level environment
# ----------------------
#
@@ -113,10 +123,23 @@ $(mtexdir) $(texbdir): | $(texdir); mkdir $@
clean-mmap:; rm -f reproduce/config/gnuastro/mmap*
# ------------------------------------------
clean: clean-mmap
- rm -rf $(BDIR)
- rm -f reproduce/build *.pdf *.log *.out *.aux *.auxlock
+ # Delete the top-level PDF file.
+ rm -f *.pdf
+
+ # Delete all the built outputs except the dependency
+ # programs. We'll use Bash's extended options builtin (`shopt') to
+ # enable "extended glob" (for listing of files). It allows extended
+ # features like ignoring the listing of a file with `!()' that we
+ # are using afterwards.
+ shopt -s extglob
+ rm -rf $(BDIR)/!(dependencies)
distclean: clean
- rm -f Makefile $(pconfdir)/LOCAL.mk .gnuastro
+ # We'll be deleting the built environent programs and just need the
+ # `rm' program. So for this recipe, we'll use the host system's
+ # `rm', not our own.
+ $(sys-rm) -rf $(BDIR) reproduce/build
+ $(sys-rm) -f Makefile $(pconfdir)/LOCAL.mk .gnuastro .local
+