Commit b0b92885 authored by Duncan Mortimer's avatar Duncan Mortimer
Browse files

Add make target to build release tar.gz file

Use this to ensure that .git files/folders don't make it into the tar
parent 142c8ee9
......@@ -2,3 +2,4 @@
.project
compiled/
MCR.version
fix.tar.gz
.PHONY : build_mcrv_file
.PHONY : all
.PHONY : release
MKDIR_P=mkdir -p
......@@ -7,6 +8,8 @@ MCCOPTS=-mv -R -nojvm -R -nodisplay
REQ_FSL=fix_1a_extract_features fix_2c_loo_results functionmotionconfounds
REQ_CIFnFSL=fix_3_clean
parent:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
folder:=$(shell basename $(parent))
all: directories MCR $(REQ_FSL) $(REQ_CIFnFSL) fix_permissions
......@@ -52,4 +55,7 @@ fix_2c_loo_results: fix_2c_loo_results.m
fix_3_clean: fix_3_clean.m
${FSL_FIX_MCC} $(MCCOPTS) -I ${FSL_FIX_FSLMATLAB} -I ${FSL_FIX_CIFTIRW} -d ${FSL_FIX_MLCDIR} $<
release: fix.tar.gz
fix.tar.gz:
(cd "$(parent)/.."; tar zcf "$(parent)/fix.tar.gz" --exclude ".git*" --exclude "fix.tar.gz" -s "/^$(folder)/fix/" "$(folder)")
\ No newline at end of file
......@@ -176,13 +176,21 @@ at your HCP Workbench MATLAB CIFTIRW and Workbench folders respectively.
then issue the following command from within the fix folder:
./build_MATLAB
If the script cannot automatically find your 'matlab' command, configure settings.sh
to point at the matlab and mcc programs.
This will install the binaries into 'compiled/`OS`/`arch`' (eg
compiled/Darwin/x86_64 or compiled/Linux/x86_64) and create a file 'MCR.version'
containing the version number of the MATLAB Compiler Runtime necessary to run
this programs. Install this into a suitable location following these instructions.
this program.
If the script cannot automatically find your 'matlab' command, configure settings.sh
to point at the matlab and mcc programs.
If you wish to build a re-distributable tar.gz file of the compiled software you
should run ./build_MATLAB on each platform of interest (e.g. Linux and macOS),
collating the compiled/Linux and compiled/Darwin folders into a single copy of the
fix folder and then run:
./build_MATLAB release
This will generate fix.tar.gz in the fix folder which can then be distributed.
-------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment