From fcfe32775f72550ebb6d883b95cf50a1be84c451 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 12 Apr 2019 17:18:01 +0100 Subject: Dependency BibTeX entries included only when necessary Until now, there was a single `tex/src/references.tex' file that housed the BibTex entries for everything (software and non-software). Since we have started to include the BibTeX entry for more software, it will be hard to manage the large (sometime unused) BibTeX entries of the software in the middle of the non-software related citations in the text of the paper. Therefore, with this commit, a `tex/dependencies' directory has been made which has a separate BibTeX entry file for each software that needs one. After the software is built, this file is copied to the new `.local/version-info/cite' directory. At the end, the configure script will concatenate all the files in this directory into one file which will later be used with `tex/src/references.tex' by BibLaTeX. This greatly simplifies managing of citations. Allowing us to focus on the software-building and paper-writing citations separately/cleanly (and thus be more efficient in both). --- reproduce/src/make/dependencies-python.mk | 15 +++++++++------ reproduce/src/make/dependencies.mk | 9 ++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'reproduce') diff --git a/reproduce/src/make/dependencies-python.mk b/reproduce/src/make/dependencies-python.mk index 11c6b1f..7ccf6b3 100644 --- a/reproduce/src/make/dependencies-python.mk +++ b/reproduce/src/make/dependencies-python.mk @@ -295,10 +295,8 @@ $(ipydir)/astropy: $(tdir)/astropy-$(astropy-version).tar.gz \ $(ipydir)/h5py \ $(ipydir)/numpy \ $(ipydir)/scipy - # Since we have two citations in Astropy (with the `,' character - # which can be confused in Make), its easier to just re-write the - # full version after the build. $(call pybuild, tar xf, $<, astropy-$(astropy-version)) \ + && cp $(dtexdir)/astropy.tex $(ictdir)/ \ && echo "Astropy $(astropy-version) \citep{astropy2013,astropy2018}" > $@ $(ipydir)/beautifulsoup4: $(tdir)/beautifulsoup4-$(beautifulsoup4-version).tar.gz \ @@ -336,6 +334,7 @@ $(ipydir)/cycler: $(tdir)/cycler-$(cycler-version).tar.gz \ $(ipydir)/cython: $(tdir)/cython-$(cython-version).tar.gz \ $(ipydir)/setuptools $(call pybuild, tar xf, $<, Cython-$(cython-version)) \ + && cp $(dtexdir)/cython.tex $(ictdir)/ \ && echo "Cython $(cython-version) \citep{cython2011}" > $@ $(ipydir)/entrypoints: $(tdir)/entrypoints-$(entrypoints-version).tar.gz \ @@ -389,7 +388,8 @@ $(ipydir)/matplotlib: $(tdir)/matplotlib-$(matplotlib-version).tar.gz \ $(ipydir)/numpy \ $(ipydir)/pyparsing \ $(ipydir)/python-dateutil - $(call pybuild, tar xf, $<, matplotlib-$(matplotlib-version)) \ + $(call pybuild, tar xf, $<, matplotlib-$(matplotlib-version)) \ + && cp $(dtexdir)/matplotlib.tex $(ictdir)/ \ && echo "Matplotlib $(matplotlib-version) \citep{matplotlib2007}" > $@ # Currently mpi4py doesn't build because of some conflict with OpenMPI: @@ -404,7 +404,8 @@ $(ipydir)/matplotlib: $(tdir)/matplotlib-$(matplotlib-version).tar.gz \ $(ipydir)/mpi4py: $(tdir)/mpi4py-$(mpi4py-version).tar.gz \ $(ipydir)/setuptools \ $(ilidir)/openmpi - $(call pybuild, tar xf, $<, mpi4py-$(mpi4py-version)) \ + $(call pybuild, tar xf, $<, mpi4py-$(mpi4py-version)) \ + && cp $(dtexdir)/mpi4py.tex $(ictdir)/ \ && echo "mpi4py $(mpi4py-version) \citep{mpi4py2011}" > $@ $(ipydir)/numpy: $(tdir)/numpy-$(numpy-version).zip \ @@ -420,6 +421,7 @@ $(ipydir)/numpy: $(tdir)/numpy-$(numpy-version).zip \ conf="$$(pwd)/reproduce/config/pipeline/dependency-numpy-scipy.cfg"; \ $(call pybuild, unzip, $<, numpy-$(numpy-version),$$conf, \ Numpy $(numpy-version)) \ + && cp $(dtexdir)/numpy.tex $(ictdir)/ \ && echo "Numpy $(numpy-version) \citep{numpy2011}" > $@ $(ibidir)/pip3: $(tdir)/pip-$(pip-version).tar.gz \ @@ -465,7 +467,8 @@ $(ipydir)/scipy: $(tdir)/scipy-$(scipy-version).tar.gz \ export LDFLAGS="$(LDFLAGS) -shared"; \ fi; \ conf="$$(pwd)/reproduce/config/pipeline/dependency-numpy-scipy.cfg"; \ - $(call pybuild, tar xf, $<, scipy-$(scipy-version),$$conf)       \ + $(call pybuild, tar xf, $<, scipy-$(scipy-version),$$conf) \ + && cp $(dtexdir)/scipy.tex $(ictdir)/ \ && echo "Scipy $(scipy-version) \citep{scipy2007,scipy2011}" > $@ $(ipydir)/secretstorage: $(tdir)/secretstorage-$(secretstorage-version).tar.gz \ diff --git a/reproduce/src/make/dependencies.mk b/reproduce/src/make/dependencies.mk index ae1daa7..67ce490 100644 --- a/reproduce/src/make/dependencies.mk +++ b/reproduce/src/make/dependencies.mk @@ -37,6 +37,7 @@ include reproduce/config/pipeline/dependency-versions.mk lockdir = $(BDIR)/locks ddir = $(BDIR)/dependencies +dtexdir = $(shell pwd)/tex/dependencies tdir = $(BDIR)/dependencies/tarballs idir = $(BDIR)/dependencies/installed ibdir = $(BDIR)/dependencies/installed/bin @@ -44,6 +45,7 @@ ildir = $(BDIR)/dependencies/installed/lib ibidir = $(BDIR)/dependencies/installed/version-info/bin ilidir = $(BDIR)/dependencies/installed/version-info/lib itidir = $(BDIR)/dependencies/installed/version-info/tex +ictdir = $(BDIR)/dependencies/installed/version-info/cite ipydir = $(BDIR)/dependencies/installed/version-info/python # Define the top-level programs to build (installed in `.local/bin'). @@ -604,9 +606,10 @@ $(ibidir)/gnuastro: $(tdir)/gnuastro-$(gnuastro-version).tar.lz \ ifeq ($(static_build),yes) staticopts="--enable-static=yes --enable-shared=no"; endif - $(call gbuild, $<, gnuastro-$(gnuastro-version), static, \ - $$staticopts, -j$(numthreads), \ - make check -j$(numthreads)) \ + $(call gbuild, $<, gnuastro-$(gnuastro-version), static, \ + $$staticopts, -j$(numthreads), \ + make check -j$(numthreads)) \ + && cp $(dtexdir)/gnuastro.tex $(ictdir)/ \ && echo "GNU Astronomy Utilities $(gnuastro-version) \citep{gnuastro}" > $@ $(ibidir)/unzip: $(tdir)/unzip-$(unzip-version).tar.gz -- cgit v1.2.1