forked from firewalld/firewalld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
126 lines (106 loc) · 4.24 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
SUBDIRS = config doc po shell-completion src
DIST_TARGETS = dist-gzip
EXTRA_DIST = \
COPYING \
README \
autogen.sh \
${PACKAGE_NAME}.spec
CLEANFILES = *~ *\# .\#* *.tar*
DISTCLEANFILES = config.log intltool-*
DISTCLEANDIRS = autom4te.cache ${PACKAGE_NAME}-*
all: report
tag:
@spec_ver=`awk '/Version:/ { print $$2}' ${PACKAGE_NAME}.spec`; \
if test "$$spec_ver" != "${PACKAGE_VERSION}"; then \
echo "Spec file and package versions differ: $$spec_ver != ${PACKAGE_VERSION}"; \
secs=10; \
echo -n "Using ./autogen.sh in $$secs seconds: "; \
for i in `seq $$secs -1 1`; do echo -n "."; sleep 1; done; echo; \
./autogen.sh; \
echo; \
echo "Please run make again to apply version changes."; \
exit 1; \
fi
@if ! git diff --quiet --exit-code; then \
clear; \
echo -n "========================================"; \
echo "========================================"; \
PAGER= git diff; \
echo -n "========================================"; \
echo "========================================"; \
echo "Do you want to commit these changes? (y/N)"; \
read answer; \
[ "$$answer" == "Y" -o "$$answer" == "y" ] || exit 1; \
git commit -a -m "$(PACKAGE_TAG)"; \
fi
git tag -f $(PACKAGE_TAG)
git push
git push --tags
dist: clean-docs update-docs
dist-check:
@rm -f _dist_check_failed
@(cat config/Makefile.am | sed -n '/^CONFIG_FILES/,/^$$/p' | head -n-1 | tail -n+2) > _config
@(cd config; git ls-files icmptypes helpers ipsets services zones | sort | sed -e 's/^/\t/' | sed ':a;N;$$!ba;s/\n/ \\\n/g') > _provided_config
@diff -u1B _config _provided_config > _missing_config; \
if [ $$? -ne 0 ]; then \
echo; \
echo "============================================================================="; \
echo " Fix config/Makefile.am:"; \
echo "============================================================================="; \
touch _dist_check_failed; \
cat _missing_config | tail -n +3; \
echo; \
fi
@rm -f _config _provided_config _missing_config
@(cat src/Makefile.am | sed -n '/^nobase_dist_python_DATA/,/^$$/p' | head -n-1 | tail -n+2) > _config
@(cd src; git ls-files firewall | sort | sed -e 's/^/\t/' -e "s/.py.in/.py/" | sed ':a;N;$$!ba;s/\n/ \\\n/g') > _provided_config
@diff -u1B _config _provided_config > _missing_config; \
if [ $$? -ne 0 ]; then \
echo; \
echo "============================================================================="; \
echo " Fix src/Makefile.am:"; \
echo "============================================================================="; \
touch _dist_check_failed; \
cat _missing_config | tail -n +3; \
echo; \
fi
@rm -f _config _provided_config _missing_config
@if [ -f "_dist_check_failed" ]; then \
rm -f _dist_check_failed; \
exit 1; \
fi
check-container check-integration installcheck-integration:
$(MAKE) -C src/tests $@
.PHONY: check-container check-integration installcheck-integration
update-docs:
$(MAKE) -C doc/xml
clean-docs:
$(MAKE) -C doc/xml clean
archive: dist-check $(desktop_DATA) tag dist
local: distclean
@rm -rf ${PACKAGE_NAME}-$(PACKAGE_VERSION).tar.gz
@rm -rf /tmp/${PACKAGE_NAME}-$(PACKAGE_VERSION) /tmp/${PACKAGE_NAME}
@dir=$$PWD; cd /tmp; cp -a $$dir ${PACKAGE_NAME}
@mv /tmp/${PACKAGE_NAME} /tmp/${PACKAGE_NAME}-$(PACKAGE_VERSION)
@dir=$$PWD; cd /tmp; tar --gzip -cSpf $$dir/${PACKAGE_NAME}-$(PACKAGE_VERSION).tar.gz ${PACKAGE_NAME}-$(PACKAGE_VERSION)
@rm -rf /tmp/${PACKAGE_NAME}-$(PACKAGE_VERSION)
@echo "The archive is in ${PACKAGE_NAME}-$(PACKAGE_VERSION).tar.gz"
test-rpm: dist
@rpmbuild -ta $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
test-srpm: dist
@rpmbuild -ts $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
update-po:
ls $(top_srcdir)/po/*.po | sed 's/.*\/po\///;s/.po//' > $(top_srcdir)/po/LINGUAS
$(MAKE) -C po update-po ${PACKAGE_NAME}.pot
clean-po:
@for cat in `cat ${top_srcdir}/po/LINGUAS`; do \
msgattrib --translated --no-fuzzy --no-obsolete --force-po --no-location --clear-previous --strict $(top_srcdir)/po/$$cat.po -o $(top_srcdir)/po/$$cat.out; \
mv -f $(top_srcdir)/po/$$cat.out $(top_srcdir)/po/$$cat.po; \
done
report:
@for cat in `cat ${top_srcdir}/po/LINGUAS`; do \
echo -n "$$cat: "; \
$(MSGFMT) --statistics -o /dev/null $(top_srcdir)/po/$$cat.po; \
done
distclean-local:
-test -z "$(DISTCLEANDIRS)" || rm -rf $(DISTCLEANDIRS)