-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·105 lines (87 loc) · 3.85 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#=============================================================================
# File: Simple Makefile for Dissemination Monitoring Toolbox
# author: guillaume.aubert@eumetsat.int
#=============================================================================
BASEDIR=.
# internal dirs
DISTS=$(BASEDIR)/dists
#DissTBDist
DTBDIST=$(DISTS)/disstoolbox-dist
DTBBUILD=$(DTBDIST)/build
DTBBUILDDIST=$(DTBDIST)/build/egg-dist
#DPlayDist
DPLDIST=$(DISTS)/dissplayer-dist
DPLBUILD=$(DPLDIST)/build
DPLBUILDDIST=$(DPLDIST)/build/egg-dist
#ConfDist info
CONFDIST=$(DISTS)/conf-dist
CONFBUILD=$(CONFDIST)/build
CONFBUILDDIST=$(CONFDIST)/build
BUILD=$(BASEDIR)/build
BUILDDIST=$(BUILD)/egg-dist
ETC=$(BASEDIR)/etc
#PYTHONBIN=/homespace/gaubert/python2.7/bin/python
PYTHONBIN=/drives/c/GuillaumeAubertSpecifics/Programs/WinPython-32bit-2.7.6.4/python-2.7.6/python.exe
PYTHONVERSION=2.7
# new version 1.3.3.2 released 270410
DTBVERSION=0.3
DTBDISTNAME=diss-toolbox-$(DTBVERSION)
all: dissplayer-src-dist
init:
mkdir -p $(DTBDIST)
mkdir -p $(DTBBUILDDIST)
mkdir -p $(DPLDIST)
mkdir -p $(DPLBUILDDIST)
#this is the one we use at the moment
# to install with pip: /tmp/python-test/bin/pip install ./dmon-0.5.tar.gz --find-links file:///homespace/gaubert/Dev/projects/rodd/dists/disstoolbox-dist/third-party
disstoolbox-src-dist: clean init
# need to copy sources in distributions as distutils does not always support symbolic links (pity)
mkdir -p $(DTBDIST)/eumetsat
cp $(BASEDIR)/src/eumetsat/__init__.py $(DTBDIST)/eumetsat
cp -R $(BASEDIR)/src/eumetsat/dmon $(DTBDIST)/eumetsat
cd $(DTBDIST); $(PYTHONBIN) setup.py sdist -d ../../$(DTBBUILD)
#remove egg-dist dir
rm -Rf $(DTBBUILD)/egg-dist
#copy third party libs in build dir in order to create one tarball that can be installed with pip
cp $(DTBDIST)/third-party/* $(DTBBUILD)
echo "distribution stored in $(DTBBUILD)"
# to install with pip: /tmp/python-test/bin/pip install ./dmon-0.5.tar.gz --find-links file:///homespace/gaubert/Dev/projects/rodd/dists/disstoolbox-dist/third-party
# create dissemination player to replay from xferlogs files
dissplayer-src-dist: clean init
# need to copy sources in distributions as distutils does not always support symbolic links (pity)
mkdir -p $(DPLDIST)/eumetsat
# copy script
cp -R $(BASEDIR)/etc/diss-player $(DPLDIST)
# dos2unix it
dos2unix $(DPLDIST)/diss-player/diss-player
cp -R $(BASEDIR)/src/eumetsat/__init__.py $(DPLDIST)/eumetsat
cp -R $(BASEDIR)/src/eumetsat/dmon $(DPLDIST)/eumetsat
cd $(DPLDIST); $(PYTHONBIN) setup.py sdist -d ../../$(DPLDIST)
#remove egg-dist dir
rm -Rf $(DPLDIST)/egg-dist
#copy third party libs in build dir in order to create one tarball that can be installed with pip
cp $(DPLDIST)/third-party/* $(DPLBUILD)
echo "distribution stored in $(DPLBUILD)"
disstoolbox-src-egg-dist: clean init
# need to copy sources in distributions as distutils does not always support symbolic links (pity)
mkdir -p $(DTBDIST)/eumetsat
cp $(BASEDIR)/src/eumetsat/__init__.py $(DTBDIST)/eumetsat
mkdir -p $(DTBBUILDDIST)
cp -R $(BASEDIR)/src/eumetsat $(DTBDIST)
echo "distribution stored in $(DTBBUILD)"
disstoolbox-egg-dist: init
cp -R $(BASEDIR)/src/eumetsat/dmon $(DTBDIST)
cd $(DTBDIST); $(PYTHONBIN) setup.py bdist_egg -b /tmp/build -p $(DTBDISTNAME) -d ../../$(DTBBUILDDIST)
echo "distribution stored in $(DTBBUILDDIST)"
clean: clean-build
cd $(DTBDIST); rm -Rf build; rm -Rf *.egg-info; rm -Rf dist; rm -Rf eumetsat
cd $(DPLDIST); rm -Rf build; rm -Rf *.egg-info; rm -Rf dist; rm -Rf eumetsat
clean-build:
cd $(DTBBUILD); rm -Rf egg-dist;
rm -Rf $(DTBDIST)/diss-toolbox-*
cd $(DTBBUILD); rm -Rf egg-dist
# clean dissemination player parts
rm -Rf $(DPLBUILD)/*;
rm -Rf $(DPLDIST)/eumetsat
rm -Rf $(DPLDIST)/diss-player
rm -Rf $(DPLDIST)/diss_player-*.zip