diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-01-21 19:24:49 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-01-21 19:48:06 +0000 |
commit | 15d32a7df7b2d4420bebd18b855f83606d872f30 (patch) | |
tree | f0d54987b542493c7e073a34a4ce2bb78ab745fa /reproduce/src/make/dependencies-build-rules.mk | |
parent | 2c5d48c6bd557e78438682690bf007039fee375f (diff) |
Metastore package now installed to allow keeping file meta-data
The pipeline heavily depends on file meta data (and in particular the
modification dates), for example the configuration-Makefiles within the
pipeline are set as prerequisites to the rules of the pipeline.
However, when Git checks out a branch, it doesn't preserve the meta-data of
the files unique to that branch (for example program source files or
configuration-Makefiles). As a result, the rules that depend on them will
be re-done.
This is especially troublesome in the scenario of this reproducible paper
project because we commonly need to switch between branches (for example to
import recent work in the pipeline into the projects). After some
searching, I think the Metastore program is the best solution. Metastore is
now built as part of the pipeline and through two Git hooks, it is called
by Git to store the original meta-data of files into a binary file that is
version controlled (and managed by Metastore).
Diffstat (limited to 'reproduce/src/make/dependencies-build-rules.mk')
-rw-r--r-- | reproduce/src/make/dependencies-build-rules.mk | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/reproduce/src/make/dependencies-build-rules.mk b/reproduce/src/make/dependencies-build-rules.mk index 1c30a55..0c7262e 100644 --- a/reproduce/src/make/dependencies-build-rules.mk +++ b/reproduce/src/make/dependencies-build-rules.mk @@ -49,10 +49,15 @@ # 5: Extra options/arguments to pass to Make. # 6: Step to run between `make' and `make install': usually `make check'. # 7: The configuration script (`configure' by default). +# 8: Arguments for `make install'. # # NOTE: Unfortunately the configure script of `zlib' doesn't recognize # `SHELL'. So we'll have to remove it from the call to the configure # script. +# +# NOTE: A program might not contain any configure script. In this case, +# we'll just pass a non-relevant function like `pwd'. So SED should be used +# to modify `confscript' or to set `configop'. gbuild = if [ x$(static_build) = xyes ] && [ "x$(3)" = xstatic ]; then \ export LDFLAGS="$$LDFLAGS -static"; \ fi; \ @@ -67,19 +72,23 @@ gbuild = if [ x$(static_build) = xyes ] && [ "x$(3)" = xstatic ]; then \ fi; \ \ if [ -f $(ibdir)/bash ]; then \ - sed -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \ - -e's|\#\!/bin/sh|\#\! $(ibdir)/bash|' \ - $$confscript > $$confscript-tmp; \ - mv $$confscript-tmp $$confscript; \ - chmod +x $$confscript; \ + if [ -f $$confscript ]; then \ + sed -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \ + -e's|\#\!/bin/sh|\#\! $(ibdir)/bash|' \ + $$confscript > $$confscript-tmp; \ + mv $$confscript-tmp $$confscript; \ + chmod +x $$confscript; \ + fi; \ shellop="SHELL=$(ibdir)/bash"; \ elif [ -f /bin/bash ]; then shellop="SHELL=/bin/bash"; \ else shellop="SHELL=/bin/sh"; \ fi; \ \ - if [ x"$(strip $(2))" = x"zlib-$(zlib-version)" ]; then \ - configop="--prefix=$(idir)"; \ - else configop="$$shellop --prefix=$(idir)"; \ + if [ -f $$confscript ]; then \ + if [ x"$(strip $(2))" = x"zlib-$(zlib-version)" ]; then \ + configop="--prefix=$(idir)"; \ + else configop="$$shellop --prefix=$(idir)"; \ + fi; \ fi; \ \ echo; echo "Using '$$confscript' to configure:"; echo; \ @@ -87,7 +96,7 @@ gbuild = if [ x$(static_build) = xyes ] && [ "x$(3)" = xstatic ]; then \ $$confscript $(4) $$configop && \ make "$$shellop" $(5) && \ $$check && \ - make "$$shellop" install && \ + make "$$shellop" install $(8) && \ cd .. && rm -rf $(2) |