forked from kimchi-project/gingers390x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
155 lines (125 loc) · 5.02 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
147
148
149
150
151
152
153
154
155
#
# Project Ginger S390x
#
# Copyright IBM Corp, 2015-2016
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
SUBDIRS = contrib control docs model po tests ui
gingers390x_PYTHON = $(filter-out config.py, $(wildcard *.py))
nodist_gingers390x_PYTHON = config.py
wokdir = $(pythondir)/wok
gingers390xdir = $(pythondir)/wok/plugins/gingers390x
confdir = $(sysconfdir)/wok/plugins.d
dist_conf_DATA = gingers390x.conf
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = --install -I m4
EXTRA_DIST = \
config.rpath \
API.json \
autogen.sh \
COPYING.ASL2 \
COPYING.LGPL \
CONTRIBUTE.md \
VERSION \
build-aux/pkg-version \
config.py.in \
$(NULL)
PEP8_BLACKLIST = *config.py,*i18n.py,*tests/test_config.py,*tests/test_config.py.in
I18N_FILES = ./i18n.py \
$(NULL)
# '4b825dc642cb6eb9a060e54bf8d69288fbee4904' is the hash of an empty
# # Git tree calculated by:
# # $ git hash-object -t tree /dev/null
check-local:
contrib/check_i18n.py $(I18N_FILES)
@if [ -d '.git' ]; then \
find . -path './.git' -prune -o \
-name '*.py' -o -name '*.py.in' | \
xargs $(PYFLAKES) | \
while read LINE; do echo "$$LINE"; false; done \
else \
find . -name '*.py' -o -name '*.py.in' | \
xargs $(PYFLAKES) | \
while read LINE; do echo "$$LINE"; false; done \
fi
$(PEP8) --version
$(PEP8) --filename '*.py,*.py.in' --exclude="$(PEP8_BLACKLIST)" .
@if $(GIT) rev-parse &> /dev/null ; then \
echo "Whitespace verification ..."; \
$(GIT) diff --check ; \
$(GIT) diff-tree --check \
'4b825dc642cb6eb9a060e54bf8d69288fbee4904' HEAD ; \
echo "IBM copyright year verification ..." ; \
./check-IBM-license-header.sh ; \
fi
@echo "Ok"
# Link built mo files in the source tree to enable use of translations from
# within the source tree
all-local:
while read L && test -n "$$L"; do \
dir=mo/$$L/LC_MESSAGES ; \
$(MKDIR_P) $$dir ; \
ln -sf ../../../po/$$L.gmo $$dir/gingers390x.mo ; \
done < po/LINGUAS
do_substitution = \
sed -e 's,[@]prefix[@],$(prefix),g' \
-e 's,[@]datadir[@],$(datadir),g' \
-e 's,[@]sysconfdir[@],$(sysconfdir),g' \
-e 's,[@]localstatedir[@],$(localstatedir),g' \
-e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
-e 's,[@]wokdir[@],$(wokdir),g' \
-e 's,[@]gingers390xdir[@],$(gingers390xdir),g' \
-e 's,[@]gingers390xversion[@],$(PACKAGE_VERSION),g' \
-e 's,[@]gingers390xrelease[@],$(PACKAGE_RELEASE),g' \
-e 's,[@]withspice[@],$(WITH_SPICE),g'
config.py: config.py.in Makefile
$(do_substitution) < $(srcdir)/config.py.in > config.py
#
# Packaging helpers
#
gingers390x.spec: contrib/gingers390x.spec.zkvm
@if test -e /etc/redhat-release; then \
ln -sf contrib/gingers390x.spec.zkvm $@ ; \
else \
echo "Unable to select a spec file for RPM build" ; \
/bin/false ; \
fi
rpm: dist gingers390x.spec
$(MKDIR_P) rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
cp $(top_srcdir)/gingers390x.spec rpm/SPECS/gingers390x.spec
cp $(DIST_ARCHIVES) rpm/SOURCES
rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/gingers390x.spec
zkvm-rpm: contrib/gingers390x.spec.zkvm
ln -sf contrib/gingers390x.spec.zkvm gingers390x.spec
$(MAKE) rpm
ChangeLog:
@if $(GIT) rev-parse &> /dev/null ; then \
$(top_srcdir)/build-aux/genChangelog --release > $@; \
fi
install-data-local:
$(MKDIR_P) $(DESTDIR)$(gingers390xdir)
$(MKDIR_P) $(DESTDIR)/$(localstatedir)/lib/gingers390x/
$(INSTALL_DATA) API.json $(DESTDIR)$(gingers390xdir)/API.json
uninstall-local:
$(RM) $(DESTDIR)$(gingers390xdir)/API.json
VERSION:
@if $(GIT) rev-parse &> /dev/null ; then \
git describe --abbrev=0 > $@; \
fi
.PHONY: rpm zkvm-rpm ChangeLog VERSION
clean-local:
rm -rf mo rpm
BUILT_SOURCES = config.py
CLEANFILES = config.py gingers390x.spec `find "$(top_srcdir)" -type f -name "*.pyc" -print`