-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
146 lines (118 loc) · 3.41 KB
/
Makefile.am
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST= \
autogen.sh \
emex \
waveform_resource \
scripts \
Copyright \
debian \
$(PACKAGE).spec.in \
emex/common.proto \
emex/emexd.proto \
emex/emexcontainer.proto \
emex/emexscenario.proto \
setup.py.in \
emex/emexd.xml.in
all-local: setup.py emex/common_pb2.py emex/emexd_pb2.py emex/emexcontainer_pb2.py emex/emexscenario_pb2.py emex/emexd.xml
$(PYTHON) setup.py build
clean-local: setup.py
$(PYTHON) setup.py clean
-rm -rf python*.egg-info
-rm -rf build
-rm -rf dist
-rm -f emex*tar.gz
-rm -f setup.py
-rm -f MANIFEST
-rm -f installed.txt
-rm -f `find . -name "*\.pyc"`
-rm -f `find . -name "*~"`
-rm -f emex/common_pb2.py
-rm -f emex/emexd_pb2.py
-rm -f emex/emexcontainer_pb2.py
-rm -f emex/emexscenario_pb2.py
-rm -f emex/emexd.xml
-rm -f emex*.pdf
-rm -rf .debbuild
-rm -rf .rpmbuild
-rm -rf $(PACKAGE).spec
-rm -rf emex/__pycache__
-rm -rf emex/data/__pycache__
-rm -rf emex/helpers/__pycache__
-rm -rf waveform_resource/__pycache__
-rm -rf waveform_resource/plugins/__pycache__
-rm -rf waveform_resource/plugins/emex/__pycache__
install: setup.py
$(PYTHON) setup.py install \
-O1 \
--record .installedfiles \
--prefix=$(prefix) \
--exec-prefix=$(exec_prefix) \
$(if $(DESTDIR),--root=$(DESTDIR))
uninstall:
if test -f .installedfiles; then xargs -a .installedfiles rm -f; fi
spec: setup.py
$(PYTHON) setup.py bdist_rpm --spec-only
edit = sed \
-e 's|@VERSION[@]|$(VERSION)|g' \
-e 's|@DEBIAN_VERSION[@]|$(DEBIAN_VERSION)|g' \
-e 's|@DATE_RFC2822[@]|$(DATE_RFC2822)|g'
if HAVE_RPMBUILD
RPMARCH=`arch`
RPMBUILD_ARGS=
rpm: $(PACKAGE).spec dist-gzip
mkdir -p .rpmbuild/BUILD \
.rpmbuild/SPECS \
.rpmbuild/SOURCES \
.rpmbuild/SRPMS \
.rpmbuild/RPMS/noarch \
.rpmbuild/tmp
cp -f $(PACKAGE)-$(VERSION).tar.gz .rpmbuild/SOURCES
rpmbuild --clean -ba $(top_srcdir)/$(PACKAGE).spec --target $(RPMARCH) \
--define "_topdir $$PWD/.rpmbuild" \
--define "_tmppath $$PWD/.rpmbuild/tmp" \
$(RPMBUILD_ARGS)
@echo "============================================================"
@echo "RPMs located in .rpmbuild/RPMS and .rpmbuild/SRPMS"
endif
if HAVE_DEB
deb: dist-gzip
rm -rf .debbuild
mkdir -p .debbuild
cp -f $(PACKAGE)-$(VERSION).tar.gz .debbuild
cd .debbuild && tar xzf $(PACKAGE)-$(VERSION).tar.gz
$(edit) .debbuild/$(PACKAGE)-$(VERSION)/debian/changelog.in > \
.debbuild/$(PACKAGE)-$(VERSION)/debian/changelog
cd .debbuild/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -F -us -uc
@echo "============================================================"
@echo "debs located in .debbuild"
cleandeb:
dh_clean
else
cleandeb:
endif
$(PACKAGE).spec: $(PACKAGE).spec.in
if test -f $@; then chmod u+w $@; fi
$(edit) $< > $@
chmod g-w,u-w $@
setup.py: setup.py.in
if test -f $@; then chmod u+w $@; fi
$(edit) $< > $@
chmod g-w,u-w $@
emex/common_pb2.py: emex/common.proto
protoc --python_out=. -I. $<
emex/emexd_pb2.py: emex/emexd.proto
protoc --python_out=. -I. $<
emex/emexcontainer_pb2.py: emex/emexcontainer.proto
protoc --python_out=. -I. $<
emex/emexscenario_pb2.py: emex/emexscenario.proto
protoc --python_out=. -I. $<
emex/emexd.xml: emex/emexd.xml.in
if test -f $@; then chmod u+w $@; fi
$(edit) $< > $@
chmod g-w,u-w $@
if HAVE_PANDOC
emex.pdf: emex.md
pandoc --variable urlcolor=cyan $< -o $@ -f \
markdown+raw_tex+header_attributes+multiline_tables -V colorlinks
pdf: emex.pdf
endif