forked from repology/repology-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 1.28 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
FLAKE8?= flake8
CC?= gcc
CFLAGS?= -O3
CFLAGS+= -Wall -Wextra
CPPFLAGS+= `pkg-config --cflags rpm`
LDFLAGS+= `pkg-config --libs rpm`
STATICDIR= repologyapp/static
all: helpers/rpmcat/rpmcat gzip-static
gzip-static:
gzip -9 -f -k -v ${STATICDIR}/*.css ${STATICDIR}/*.js ${STATICDIR}/*.ico ${STATICDIR}/*.svg
helpers/rpmcat/rpmcat: helpers/rpmcat/rpmcat.c
${CC} helpers/rpmcat/rpmcat.c -o helpers/rpmcat/rpmcat ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
clean:
rm -f helpers/rpmcat/rpmcat
rm -f ${STATICDIR}/*.gz
rm -rf build
rm -f repology/version.so
test::
python3 -m unittest discover
profile-dump::
python3 -m cProfile -o _profile ./repology-dump.py --stream >/dev/null 2>&1
python3 -c 'import pstats; stats = pstats.Stats("_profile"); stats.sort_stats("time"); stats.print_stats()' | less
profile-reparse::
python3 -m cProfile -o _profile ./repology-update.py -P >/dev/null 2>&1
python3 -c 'import pstats; stats = pstats.Stats("_profile"); stats.sort_stats("time"); stats.print_stats()' | less
flake8:
${FLAKE8} --ignore=E501,F405,F403,E265,D10,E722,N802 --application-import-names=repology *.py repology repologyapp test
flake8-all:
${FLAKE8} --application-import-names=repology *.py repology repologyapp test
check:
python3 repology-schemacheck.py -s repos $$(find repos.d -name "*.yaml")