-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile.am
More file actions
81 lines (66 loc) · 1.96 KB
/
Makefile.am
File metadata and controls
81 lines (66 loc) · 1.96 KB
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
RPMBUILD ?= $(abs_builddir)/rpmbuild
TARBALL = $(PACKAGE)-$(VERSION).tar.xz
NULL =
AM_DISTCHECK_CONFIGURE_FLAGS = \
--with-udevrulesdir='$$(prefix)/$(udevrulesdir)' \
$(NULL)
SUBDIRS = data logger admin tests
EXTRA_DIST = \
$(wildcard LICENSE.*) \
$(wildcard COPYING.*)
GENERATED_PYTHON_FILES = \
admin/fleetcommander/constants.py \
$(NULL)
.PHONY: prep_src rpmroot rpmdistdir rpms
prep_src: rpmroot dist-xz
cp "$(top_builddir)/$(TARBALL)" "$(RPMBUILD)/SOURCES/"
rpms: prep_src rpmroot rpmdistdir
rpmbuild \
--define "_topdir $(RPMBUILD)" \
-ba \
"$(top_builddir)/$(PACKAGE).spec"
cp "$(RPMBUILD)"/RPMS/*/*.rpm "$(top_builddir)/dist/rpms/"
cp "$(RPMBUILD)"/SRPMS/*.src.rpm "$(top_builddir)/dist/srpms/"
rpmroot:
mkdir -p "$(RPMBUILD)/BUILD"
mkdir -p "$(RPMBUILD)/RPMS"
mkdir -p "$(RPMBUILD)/SOURCES"
mkdir -p "$(RPMBUILD)/SPECS"
mkdir -p "$(RPMBUILD)/SRPMS"
rpmdistdir:
mkdir -p "$(top_builddir)/dist/rpms"
mkdir -p "$(top_builddir)/dist/srpms"
clean-local:
rm -rf "$(RPMBUILD)"
rm -rf "$(top_builddir)/dist"
rm -f "$(top_builddir)"/$(PACKAGE)-*.tar.gz
.PHONY: pylint
pylint: $(GENERATED_PYTHON_FILES)
FILES=`find $(top_srcdir) \
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
-path './rpmbuild' -prune -o \
-name '*.py' -print | sort`; \
echo -e "Pylinting files:\n$${FILES}\n"; \
$(PYTHON) -m pylint --version; \
PYTHONPATH=$(top_srcdir):$(top_srcdir)/admin $(PYTHON) -m pylint \
--rcfile=$(top_srcdir)/pylintrc \
--load-plugins pylint_plugins \
$${FILES}
.PHONY: black
black: $(GENERATED_PYTHON_FILES)
$(PYTHON) -m black -v \
$(top_srcdir)
.PHONY: blackcheck
blackcheck: $(GENERATED_PYTHON_FILES)
$(PYTHON) -m black -v --check --diff \
$(top_srcdir)
.PHONY: eslint
eslint:
cd admin/cockpit/fleet-commander-admin; \
npm install; \
npm run eslint
.PHONY: eslint-fix
eslint-fix:
cd admin/cockpit/fleet-commander-admin; \
npm install; \
npm run eslint:fix