forked from fangohr/oommf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile-update-oommf
58 lines (50 loc) · 2.26 KB
/
Makefile-update-oommf
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
# Compose name of OOMMF tar ball as available on NIST webpages
# (as of September 2015)
OOMMFPREFIX="oommf"
OOMMFVERSION="12b0"
# USE dot in conda version numbers:
OOMMFVERSIONCONDA="1.2b0"
OOMMFDATE="20160930"
OOMMFBUILD="b1"
OOMMFROOTNAME=$(OOMMFPREFIX)$(OOMMFVERSION)
OOMMFSOURCEFILE=$(OOMMFROOTNAME)_$(OOMMFDATE).tar.gz
OOMMFSOURCEURL=http://math.nist.gov/oommf/dist/$(OOMMFSOURCEFILE)
GITREPOHASH=$(shell git rev-list HEAD -1)
all:
#make -f Makefile-update-oommf get-oommf
#make -f Makefile-update-oommf untar-oommf
#make -f Makefile-update-oommf update-logfile
#make -f Makefile-update-oommf update-oommf-version
#make -f Makefile-update-oommf apply-patches
@echo "things to do now:"
@echo "1. Comment on DMI extension in source in versionlog.txt?"
@echo "2. Run git 'commit -a' or similar to update git repo with new release"
@echo "3. Tag the revisision (conda-forge recipe needs this):"
@# something like: " git tag 1.2b0_20160930b1 d4e20846611d545441c0d71267d8d59f1ea99823"
@echo "git tag $(OOMMFVERSIONCONDA)_$(OOMMFDATE)$(OOMMFBUILD) XXXHASHFROMLASTCOMMITXXX"
get-oommf:
mkdir -p Downloads
cd Downloads && wget $(OOMMFSOURCEURL)
untar-oommf:
tar xfvz Downloads/$(OOMMFSOURCEFILE)
update-logfile:
echo "=======================================================" >> versionlog.txt
echo "date: `date` " >> versionlog.txt
echo " unpacked $(OOMMFSOURCEFILE)" >> versionlog.txt
echo " OOMMF:" >> versionlog.txt
echo " version: $(OOMMFVERSION)" >> versionlog.txt
echo " date: $(OOMMFDATE)" >> versionlog.txt
echo " build: $(OOMMFBUILD)" >> versionlog.txt
echo " source-url: $(OOMMFSOURCEURL)" >> versionlog.txt
echo " github-url: https://github.com/fangohr/oommf" >> versionlog.txt
echo " github version: $(GITREPOHASH)" >> versionlog.txt
update-oommf-version:
echo "$(OOMMFVERSION) $(OOMMFDATE) $(OOMMFBUILD)" > oommf-version
apply-patches:
echo "Applying patches ..."
# patch from Ryan Pepper to allow compilation on OS X 10.11
patch -b oommf/config/platforms/darwin.tcl < patches/darwin.tcl.1.2a6.patch
echo " patch applied: patches/darwin.tcl.1.2a6.patch" >> versionlog.txt
# record original file in repository.
# git add oommf/config/platforms/darwin.tcl.orig
# when this patch is removed, the file above should also be removed from the repo.