-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (58 loc) · 2.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Personal Makefile variables
#
# $Id$
OLDVERSION="0.9"
NEWVERSION="1.0"
REVISION=`git rev-list --count HEAD`
DATE=`git log --date short |grep "Date:"|head -1|cut -f2 -d':'|sed -e s'/ //g'`
ZIPFOLDER=/Users/gaser/matlab/tfce8
TARGET=/Users/gaser/spm/spm12/toolbox/TFCE
TARGET2=/Volumes/UltraMax/spm12/toolbox/TFCE
TARGET3=paris.biomag.uni-jena.de:/home/gaser/spm12/toolbox/TFCE
STARGET_HOST=141.35.69.218
STARGET_HTDOCS=${STARGET_HOST}:/volume1/web/
STARGET_FOLDER=/volume1/web/tfce
STARGET=${STARGET_HOST}:${STARGET_FOLDER}
MATLAB_FILES=Contents.* tfce_*.m spm_TFCE.m snpm_P_FDR.m tbx_cfg_tfce.m cat_spm_results_ui.m
C_FILES=tfceMex_pthread.*
MISC_FILES=html
FILES=${MATLAB_FILES} ${C_FILES} ${MISC_FILES}
ZIPFILE=tfce_r${REVISION}.zip
install:
-@echo install
-@test ! -d ${TARGET} || rm -rf ${TARGET}
-@mkdir ${TARGET}
-@cp -R ${FILES} ${TARGET}
install2:
-@echo install2
-@test ! -d ${TARGET2} || rm -rf ${TARGET2}
-@mkdir ${TARGET2}
-@cp -R ${FILES} ${TARGET2}
install3:
-@echo install3
-@scp -r ${FILES} ${TARGET3}/
help:
-@echo Available commands:
-@echo install install2 install3 zip scp doc update
doc:
-@cat html/tfce.txt | sed -e 's/VERSION/'${NEWVERSION}'/g' -e 's/RELNUMBER/r'${REVISION}'/g' -e 's/DATE/'${DATE}'/g' > html/tfce.html
update: doc
-@git fetch
-@echo '% TFCE Toolbox' > Contents.m
-@echo '% Version ' ${REVISION} ' (version '${NEWVERSION}')' ${DATE} >> Contents.m
-@cat Contents_info.txt >> Contents.m
-@perl -p -i -e "s/${OLDVERSION}/${NEWVERSION}/g" spm_TFCE.m
-@echo '% TFCE Toolbox' > INSTALL.txt
-@echo '% Version ' ${REVISION} ${NEWVERSION} ${DATE} >> INSTALL.txt
-@cat INSTALL_info.txt >> INSTALL.txt
zip: update
-@echo zip
-@test ! -d TFCE || rm -r TFCE
-@mkdir TFCE
-@cp -rp ${FILES} TFCE
-@bash update_revision.sh
-@zip ${ZIPFOLDER}/${ZIPFILE} -rm TFCE
scp: zip
-@echo scp to http://${STARGET_HOST}/tfce/${ZIPFILE}
-@scp -O -P 2222 CHANGES.txt ${ZIPFOLDER}/${ZIPFILE} ${STARGET}
-@bash -c "ssh -p 2222 ${STARGET_HOST} ln -fs ${STARGET_FOLDER}/${ZIPFILE} ${STARGET_FOLDER}/tfce_latest.zip"