librdkafka/Makefile

61 строка
1.5 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
2015-04-09 18:30:09 +03:00
VERSION = $(shell python rpm/get_version.py)
# Jenkins CI integration
BUILD_NUMBER ?= 1
.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"
@(examples/rdkafka_performance -X list > CONFIGURATION.md.tmp; \
cmp CONFIGURATION.md CONFIGURATION.md.tmp || \
mv CONFIGURATION.md.tmp CONFIGURATION.md; \
rm -f CONFIGURATION.md.tmp)
file-check: CONFIGURATION.md examples
2014-03-16 11:38:19 +04:00
check: file-check
@(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ || exit $?; done)
install:
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 $@
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
build_prepare: clean
mkdir -p SOURCES
git archive --format tar --output SOURCES/librdkafka-$(VERSION).tar HEAD:
srpm: clean build_prepare
/usr/bin/mock \
--define "__version $(VERSION)"\
--define "__release $(BUILD_NUMBER)"\
--resultdir=. \
--buildsrpm \
--spec=rpm/librdkafka.spec \
--sources=SOURCES
rpm: srpm
/usr/bin/mock \
--define "__version $(VERSION)"\
--define "__release $(BUILD_NUMBER)"\
--resultdir=. \
--rebuild *.src.rpm