aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-09-26 14:42:39 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-09-26 14:42:39 +0100
commitbe31089199a7697531307930a76ae1cd412a1e88 (patch)
tree7ee7f388ad6c2d460a07cbd222cb67c13ca680c5 /reproduce/software
parent26b3ed86f8f56e85a5cd41838fdd6946e6dfa77a (diff)
Working project when downloaded from arXiv
Until now, we were assuming that the users would just clone the project in Git. But after submitting arXiv:1909.11230, and trying to build directly from the arXiv source, I noticed several problems that wouldn't allow users to build it automatically. So I tried the build step by step and was able to find a fix for the several issues that came up. The scripting parts of the fix were primarily related to the fact that the unpacked arXiv tarball isn't under version control, so some checks had to be put there. Also, we wanted to make it easy to remove the extra files, so an extra `--clean-texdit' option was added to `./project'. Finally, some manual corrections were necessary (prior to running `./project', which are now described in `README.md'. Most of the later steps can be automated and we should do it later, I just don't have enough time now.
Diffstat (limited to 'reproduce/software')
-rw-r--r--reproduce/software/make/basic.mk31
1 files changed, 19 insertions, 12 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 17ff561..b0b757f 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -968,6 +968,11 @@ $(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
#
# We want to inform the user if Metastore isn't built, so we don't
# continue the call to `gbuild' with an `&&'.
+ #
+ # Checking for presence of `.git'. When the project source is
+ # downloaded from a non-Git source (for example from arXiv), there
+ # is no `.git' directory to work with. So until we find a better
+ # solution, avoid the step to to add the Git hooks.
current_dir=$$(pwd); \
$(call gbuild, $<, metastore-$(metastore-version), static,, \
NO_XATTR=1 V=1,,pwd,PREFIX=$(idir)); \
@@ -975,18 +980,20 @@ $(ibidir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
if [ "x$(needpatchelf)" != x ]; then \
$(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/metastore; \
fi; \
- user=$$(whoami); \
- group=$$(groups | awk '{print $$1}'); \
- cd $$current_dir; \
- for f in pre-commit post-checkout; do \
- sed -e's|@USER[@]|'$$user'|g' \
- -e's|@GROUP[@]|'$$group'|g' \
- -e's|@BINDIR[@]|$(ibdir)|g' \
- -e's|@TOP_PROJECT_DIR[@]|'$$current_dir'|g' \
- reproduce/software/bash/git-$$f > .git/hooks/$$f \
- && chmod +x .git/hooks/$$f \
- && echo "Metastore (forked) $(metastore-version)" > $@; \
- done; \
+ if [ -d .git ]; then \
+ user=$$(whoami); \
+ group=$$(groups | awk '{print $$1}'); \
+ cd $$current_dir; \
+ for f in pre-commit post-checkout; do \
+ sed -e's|@USER[@]|'$$user'|g' \
+ -e's|@GROUP[@]|'$$group'|g' \
+ -e's|@BINDIR[@]|$(ibdir)|g' \
+ -e's|@TOP_PROJECT_DIR[@]|'$$current_dir'|g' \
+ reproduce/software/bash/git-$$f > .git/hooks/$$f \
+ && chmod +x .git/hooks/$$f; \
+ done; \
+ fi \
+ && echo "Metastore (forked) $(metastore-version)" > $@; \
else \
echo; echo; echo; \
echo "*****************"; \