From 7ac86df891798fd1f0ef4d7a40aff43ec9621854 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 20 Jan 2020 00:05:41 +0000 Subject: IMPORTANT!!! Configuration Makefiles now have a .conf suffix Until now, the configuration Makefiles (in `reproduce/software/config/installation' and `reproduce/analysis/config') had a `.mk' suffix, similar to the workhorse Makefiles. Although they are indeed Makefiles, but given their nature (to only keep configuration parameters), it is confusing (especially to early users) for them to also have a `.mk' (similar to the analysis or software building Makefiles). To address this issue, with this commit, all the configuration Makefiles (in those directories) are now given a `.conf' suffix. This is also assumed for all the files that are loaded. The configuration (software building) and running of the template have been checked with this change from scratch, but please report any error that may not have been noticed. THIS IS AN IMPORTANT CHANGE AND WILL CAUSE CRASHES OR UNEXPECTED BEHAVIORS FOR PROJECTS THAT HAVE BRANCHED FROM THIS TEMPLATE. PLEASE CORRECT THE SUFFIX OF ALL YOUR PROJECT'S CONFIGURATION MAKEFILES (IN THE DIRECTORIES ABOVE), OTHERWISE THEY AREN'T AUTOMATICALLY LOADED ANYMORE. --- reproduce/analysis/config/INPUTS.conf | 15 +++++++++++++++ reproduce/analysis/config/INPUTS.mk | 15 --------------- reproduce/analysis/config/delete-me-num.conf | 2 ++ reproduce/analysis/config/delete-me-num.mk | 2 -- reproduce/analysis/config/pdf-build.conf | 21 +++++++++++++++++++++ reproduce/analysis/config/pdf-build.mk | 21 --------------------- reproduce/analysis/config/verify-outputs.conf | 2 ++ reproduce/analysis/config/verify-outputs.mk | 3 --- reproduce/analysis/make/delete-me.mk | 2 +- reproduce/analysis/make/download.mk | 9 +++++---- reproduce/analysis/make/initialize.mk | 9 +++++---- reproduce/analysis/make/paper.mk | 4 ++-- reproduce/analysis/make/top-make.mk | 8 ++++---- reproduce/analysis/make/top-prepare.mk | 4 ++-- reproduce/analysis/make/verify.mk | 2 +- 15 files changed, 60 insertions(+), 59 deletions(-) create mode 100644 reproduce/analysis/config/INPUTS.conf delete mode 100644 reproduce/analysis/config/INPUTS.mk create mode 100644 reproduce/analysis/config/delete-me-num.conf delete mode 100644 reproduce/analysis/config/delete-me-num.mk create mode 100644 reproduce/analysis/config/pdf-build.conf delete mode 100644 reproduce/analysis/config/pdf-build.mk create mode 100644 reproduce/analysis/config/verify-outputs.conf delete mode 100644 reproduce/analysis/config/verify-outputs.mk (limited to 'reproduce/analysis') diff --git a/reproduce/analysis/config/INPUTS.conf b/reproduce/analysis/config/INPUTS.conf new file mode 100644 index 0000000..6ddaec7 --- /dev/null +++ b/reproduce/analysis/config/INPUTS.conf @@ -0,0 +1,15 @@ +# Input files necessary for this project. +# +# This file is read by the configure script and running Makefiles. +# +# Copyright (C) 2018-2020 Mohammad Akhlaghi +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice and +# this notice are preserved. This file is offered as-is, without any +# warranty. + +WFPC2IMAGE = WFPC2ASSNu5780205bx.fits +WFPC2MD5 = a4791e42cd1045892f9c41f11b50bad8 +WFPC2SIZE = 62kb +WFPC2URL = https://fits.gsfc.nasa.gov/samples diff --git a/reproduce/analysis/config/INPUTS.mk b/reproduce/analysis/config/INPUTS.mk deleted file mode 100644 index 6ddaec7..0000000 --- a/reproduce/analysis/config/INPUTS.mk +++ /dev/null @@ -1,15 +0,0 @@ -# Input files necessary for this project. -# -# This file is read by the configure script and running Makefiles. -# -# Copyright (C) 2018-2020 Mohammad Akhlaghi -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and -# this notice are preserved. This file is offered as-is, without any -# warranty. - -WFPC2IMAGE = WFPC2ASSNu5780205bx.fits -WFPC2MD5 = a4791e42cd1045892f9c41f11b50bad8 -WFPC2SIZE = 62kb -WFPC2URL = https://fits.gsfc.nasa.gov/samples diff --git a/reproduce/analysis/config/delete-me-num.conf b/reproduce/analysis/config/delete-me-num.conf new file mode 100644 index 0000000..17f608c --- /dev/null +++ b/reproduce/analysis/config/delete-me-num.conf @@ -0,0 +1,2 @@ +# Number of samples to create +delete-me-num = 50 diff --git a/reproduce/analysis/config/delete-me-num.mk b/reproduce/analysis/config/delete-me-num.mk deleted file mode 100644 index 17f608c..0000000 --- a/reproduce/analysis/config/delete-me-num.mk +++ /dev/null @@ -1,2 +0,0 @@ -# Number of samples to create -delete-me-num = 50 diff --git a/reproduce/analysis/config/pdf-build.conf b/reproduce/analysis/config/pdf-build.conf new file mode 100644 index 0000000..e2d59cc --- /dev/null +++ b/reproduce/analysis/config/pdf-build.conf @@ -0,0 +1,21 @@ +# Make the final PDF? +# ------------------- +# +# During the project's early phases, it is usually not necessary to build +# the PDF file (which makes a lot of output lines on the command-line and +# can make it hard to find the commands and possible errors (and their +# outputs). Also, in some cases, only the produced results may be of +# interest and not the final PDF, so LaTeX (and its necessary packages) may +# not be installed. +# +# If this variable is given any string, a PDF will be made with +# LaTeX. Otherwise, a notice will just printed that for now, no PDF will be +# created. +# +# Copyright (C) 2018-2020 Mohammad Akhlaghi +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice and +# this notice are preserved. This file is offered as-is, without any +# warranty. +pdf-build-final = yes diff --git a/reproduce/analysis/config/pdf-build.mk b/reproduce/analysis/config/pdf-build.mk deleted file mode 100644 index e2d59cc..0000000 --- a/reproduce/analysis/config/pdf-build.mk +++ /dev/null @@ -1,21 +0,0 @@ -# Make the final PDF? -# ------------------- -# -# During the project's early phases, it is usually not necessary to build -# the PDF file (which makes a lot of output lines on the command-line and -# can make it hard to find the commands and possible errors (and their -# outputs). Also, in some cases, only the produced results may be of -# interest and not the final PDF, so LaTeX (and its necessary packages) may -# not be installed. -# -# If this variable is given any string, a PDF will be made with -# LaTeX. Otherwise, a notice will just printed that for now, no PDF will be -# created. -# -# Copyright (C) 2018-2020 Mohammad Akhlaghi -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and -# this notice are preserved. This file is offered as-is, without any -# warranty. -pdf-build-final = yes diff --git a/reproduce/analysis/config/verify-outputs.conf b/reproduce/analysis/config/verify-outputs.conf new file mode 100644 index 0000000..4f99661 --- /dev/null +++ b/reproduce/analysis/config/verify-outputs.conf @@ -0,0 +1,2 @@ +# To disable verification of output datasets set this variable to yes +verify-outputs = yes diff --git a/reproduce/analysis/config/verify-outputs.mk b/reproduce/analysis/config/verify-outputs.mk deleted file mode 100644 index 5d8eff1..0000000 --- a/reproduce/analysis/config/verify-outputs.mk +++ /dev/null @@ -1,3 +0,0 @@ -# To disable verification of output datasets set this variable to yes - -verify-outputs = yes diff --git a/reproduce/analysis/make/delete-me.mk b/reproduce/analysis/make/delete-me.mk index 3ba4909..8b97673 100644 --- a/reproduce/analysis/make/delete-me.mk +++ b/reproduce/analysis/make/delete-me.mk @@ -26,7 +26,7 @@ delete-numdir = $(texdir)/delete-me-num delete-num = $(delete-numdir)/data.txt $(delete-numdir): | $(texdir); mkdir $@ -$(delete-num): $(pconfdir)/delete-me-num.mk | $(delete-numdir) +$(delete-num): $(pconfdir)/delete-me-num.conf | $(delete-numdir) # When the plotted values are re-made, it is necessary to also # delete the TiKZ externalized files so the plot is also re-made. diff --git a/reproduce/analysis/make/download.mk b/reproduce/analysis/make/download.mk index 7c290f4..07e9f27 100644 --- a/reproduce/analysis/make/download.mk +++ b/reproduce/analysis/make/download.mk @@ -24,9 +24,10 @@ # Download input data # -------------------- # -# The input dataset properties are defined in `$(pconfdir)/INPUTS.mk'. For -# this template we only have one dataset to enable easy processing, so all -# the extra checks in this rule may seem redundant. +# The input dataset properties are defined in +# `$(pconfdir)/INPUTS.conf'. For this template we only have one dataset to +# enable easy processing, so all the extra checks in this rule may seem +# redundant. # # In a real project, you will need more than one dataset. In that case, # just add them to the target list and add an `elif' statement to define it @@ -93,5 +94,5 @@ $(inputdatasets): $(indir)/%.fits: | $(indir) $(lockdir) # # It is very important to mention the address where the data were # downloaded in the final report. -$(mtexdir)/download.tex: $(pconfdir)/INPUTS.mk | $(mtexdir) +$(mtexdir)/download.tex: $(pconfdir)/INPUTS.conf | $(mtexdir) echo "\\newcommand{\\wfpctwourl}{$(WFPC2URL)}" > $@ diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index cdf2129..fa39699 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -241,7 +241,7 @@ distclean: clean # `rm', not our own. $$sys_rm -rf $(BDIR) $$sys_rm -f Makefile .gnuastro .local .build - $$sys_rm -f $(pconfdir)/LOCAL.mk $(gconfdir)/gnuastro-local.conf + $$sys_rm -f $(pconfdir)/LOCAL.conf $(gconfdir)/gnuastro-local.conf @@ -298,10 +298,11 @@ $(packagecontents): paper.pdf | $(texdir) # directories (when building in a group structure, there will be # `build-user1', `build-user2' and etc), are just temporary LaTeX # build files and don't have any relevant/hand-written files in - # them. 2) The `LOCAL.mk' and `gnuastro-local.conf' files just have - # this machine's local settings and are irrelevant for anyone else. + # them. 2) The `LOCAL.conf' and `gnuastro-local.conf' files just + # have this machine's local settings and are irrelevant for anyone + # else. rm -rf $$dir/tex/build/build* - rm $$dir/reproduce/software/config/installation/LOCAL.mk + rm $$dir/reproduce/software/config/installation/LOCAL.conf rm $$dir/reproduce/software/config/gnuastro/gnuastro-local.conf # When submitting to places like arXiv, they will just run LaTeX diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk index a4eeb2e..8a14573 100644 --- a/reproduce/analysis/make/paper.mk +++ b/reproduce/analysis/make/paper.mk @@ -38,7 +38,7 @@ # # Note that if you don't want the final PDF and just want the processing # and file outputs, you can remove the value of `pdf-build-final' in -# `reproduce/analysis/config/pdf-build.mk'. +# `reproduce/analysis/config/pdf-build.conf'. $(mtexdir)/project.tex: $(mtexdir)/verify.tex # If no PDF is requested, or if LaTeX isn't available, don't @@ -62,7 +62,7 @@ $(mtexdir)/project.tex: $(mtexdir)/verify.tex echo "can check by running './.local/bin/latex --version'), _AND_" echo "make sure that the 'pdf-build-final' variable has a value." echo "'pdf-build-final' is defined in: " - echo "'reproduce/analysis/config/pdf-build.mk'." + echo "'reproduce/analysis/config/pdf-build.conf'." echo echo "If you don't have LaTeX within the project, please re-run" echo "'./project configure -e' when you have internet access." diff --git a/reproduce/analysis/make/top-make.mk b/reproduce/analysis/make/top-make.mk index 0292d3c..6c940b8 100644 --- a/reproduce/analysis/make/top-make.mk +++ b/reproduce/analysis/make/top-make.mk @@ -21,7 +21,7 @@ # Load the local configuration (created after running # `./project configure'). -include reproduce/software/config/installation/LOCAL.mk +include reproduce/software/config/installation/LOCAL.conf @@ -50,7 +50,7 @@ include reproduce/software/config/installation/LOCAL.mk # # Controlling this requires two variables that are available at this stage: # -# - `GROUP-NAME': from `LOCAL.mk' (which was built by `./project configure'). +# - `GROUP-NAME': from `LOCAL.conf' (which was built by `./project configure'). # - `reproducible_paper_group_name': value to the `--group' option. # # The analysis is only done when both have the same group name. Note that @@ -63,7 +63,7 @@ include reproduce/software/config/installation/LOCAL.mk # # If you are just interested in the processing and don't want to build the # PDF, you can skip the creatation of the final PDF by removing the value -# of `pdf-build-final' in `reproduce/analysis/config/pdf-build.mk'. +# of `pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'. ifeq (x$(reproducible_paper_group_name),x$(GROUP-NAME)) all: paper.pdf else @@ -132,5 +132,5 @@ makesrc = initialize \ # But before that, we need to identify the phase for the Makefiles that are # run both in `./project prepare' and `./project make'. project-phase = make -include reproduce/analysis/config/*.mk +include reproduce/analysis/config/*.conf include $(foreach s,$(makesrc), reproduce/analysis/make/$(s).mk) diff --git a/reproduce/analysis/make/top-prepare.mk b/reproduce/analysis/make/top-prepare.mk index 5ce120d..cefbc6b 100644 --- a/reproduce/analysis/make/top-prepare.mk +++ b/reproduce/analysis/make/top-prepare.mk @@ -25,7 +25,7 @@ # Load the local configuration (created after running # `./project configure'). -include reproduce/software/config/installation/LOCAL.mk +include reproduce/software/config/installation/LOCAL.conf @@ -87,5 +87,5 @@ makesrc = initialize \ # # See `top-make.mk' for complete explanation. project-phase = prepare -include reproduce/analysis/config/*.mk +include reproduce/analysis/config/*.conf include $(foreach s,$(makesrc), reproduce/analysis/make/$(s).mk) diff --git a/reproduce/analysis/make/verify.mk b/reproduce/analysis/make/verify.mk index a4afd45..d11dcbf 100644 --- a/reproduce/analysis/make/verify.mk +++ b/reproduce/analysis/make/verify.mk @@ -33,7 +33,7 @@ verify-print-tips = \ echo "If you are still developing your project, you can disable"; \ echo "verification by removing the value of the variable in the"; \ echo "following file (from the top project source directory):"; \ - echo " reproduce/analysis/config/verify-outputs.mk"; \ + echo " reproduce/analysis/config/verify-outputs.conf"; \ echo; \ echo "If this is the final version of the file, you can just copy"; \ echo "and paste the calculated checksum (above) for the file in"; \ -- cgit v1.2.1