librdkafka/Makefile

85 строки
2.3 KiB
Makefile
Исходник Обычный вид История

2014-03-16 11:38:19 +04:00
LIBSUBDIRS= src src-cpp
2014-03-16 11:38:19 +04:00
CHECK_FILES+= CONFIGURATION.md \
examples/rdkafka_example examples/rdkafka_performance \
examples/rdkafka_example_cpp
PACKAGE_NAME?= librdkafka
VERSION?= $(shell python packaging/get_version.py src/rdkafka.h)
2015-04-09 18:30:09 +03:00
# Jenkins CI integration
BUILD_NUMBER ?= 1
# Skip copyright check in the following paths
MKL_COPYRIGHT_SKIP?=^(tests|packaging)
.PHONY:
2014-03-16 11:38:19 +04:00
all: mklove-check libs CONFIGURATION.md check
2014-03-16 11:38:19 +04:00
include mklove/Makefile.base
2014-03-16 11:38:19 +04:00
libs:
@(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d || exit $?; done)
2014-03-16 11:38:19 +04:00
CONFIGURATION.md: src/rdkafka.h examples
@printf "$(MKL_YELLOW)Updating$(MKL_CLR_RESET)\n"
2019-03-14 19:35:07 +03:00
@echo "# Configuration properties" > CONFIGURATION.md.tmp
@(examples/rdkafka_performance -X list | \
sed 's/||/\\|\\|/g' >> \
CONFIGURATION.md.tmp; \
cmp CONFIGURATION.md CONFIGURATION.md.tmp || \
mv CONFIGURATION.md.tmp CONFIGURATION.md; \
rm -f CONFIGURATION.md.tmp)
2017-04-11 14:59:08 +03:00
file-check: CONFIGURATION.md LICENSES.txt examples
2014-03-16 11:38:19 +04:00
check: file-check
@(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ || exit $?; done)
2018-06-19 13:13:37 +03:00
install uninstall:
2014-03-16 11:38:19 +04:00
@(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ || exit $?; done)
examples tests: .PHONY libs
2014-03-16 11:38:19 +04:00
$(MAKE) -C $@
2015-12-07 05:13:32 +03:00
docs:
doxygen Doxyfile
@echo "Documentation generated in staging-docs"
clean-docs:
rm -rf staging-docs
clean:
2014-03-16 11:38:19 +04:00
@$(MAKE) -C tests $@
@$(MAKE) -C examples $@
@(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ ; done)
2015-04-09 18:30:09 +03:00
distclean: clean deps-clean
./configure --clean
rm -f config.log config.log.old
archive:
git archive --prefix=$(PACKAGE_NAME)-$(VERSION)/ \
-o $(PACKAGE_NAME)-$(VERSION).tar.gz HEAD
git archive --prefix=$(PACKAGE_NAME)-$(VERSION)/ \
-o $(PACKAGE_NAME)-$(VERSION).zip HEAD
rpm: distclean
$(MAKE) -C packaging/rpm
2017-04-11 14:59:08 +03:00
LICENSES.txt: .PHONY
2017-05-11 11:56:09 +03:00
@(for i in LICENSE LICENSE.*[^~] ; do (echo "$$i" ; echo "--------------------------------------------------------------" ; cat $$i ; echo "" ; echo "") ; done) > $@.tmp
2017-04-11 14:59:08 +03:00
@cmp $@ $@.tmp || mv $@.tmp $@ ; rm -f $@.tmp
2019-08-21 13:43:11 +03:00
coverity: Makefile.config
@(which cov-build >/dev/null 2>&1 || echo "Make sure coverity../bin is in your PATH")
@(cd src && \
make clean && \
(rm -rf cov-int cov-librdkafka.tgz cov-build || true) && \
cov-build --dir cov-int make -j && \
tar cvzf ../cov-librdkafka.tgz cov-int && \
printf "$(MKL_GREEN)Now upload cov-librdkafka.tgz to Coverity for analysis$(MKL_CLR_RESET)\n")