2014-03-16 11:38:19 +04:00
|
|
|
LIBSUBDIRS= src src-cpp
|
2012-09-19 14:26:37 +04:00
|
|
|
|
2014-03-16 11:38:19 +04:00
|
|
|
CHECK_FILES+= CONFIGURATION.md \
|
|
|
|
examples/rdkafka_example examples/rdkafka_performance \
|
|
|
|
examples/rdkafka_example_cpp
|
2012-09-19 14:26:37 +04:00
|
|
|
|
2015-04-09 18:30:09 +03:00
|
|
|
VERSION = $(shell python rpm/get_version.py)
|
|
|
|
# Jenkins CI integration
|
|
|
|
BUILD_NUMBER ?= 1
|
|
|
|
|
2012-09-19 14:26:37 +04:00
|
|
|
.PHONY:
|
|
|
|
|
2014-03-16 11:38:19 +04:00
|
|
|
all: mklove-check libs CONFIGURATION.md check
|
2012-09-19 14:26:37 +04:00
|
|
|
|
2014-03-16 11:38:19 +04:00
|
|
|
include mklove/Makefile.base
|
2012-09-19 14:26:37 +04:00
|
|
|
|
2014-03-16 11:38:19 +04:00
|
|
|
libs:
|
|
|
|
@(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d || exit $?; done)
|
2012-09-19 14:26:37 +04:00
|
|
|
|
2014-03-16 11:38:19 +04:00
|
|
|
CONFIGURATION.md: src/rdkafka.h examples
|
2015-04-30 03:00:32 +03:00
|
|
|
@printf "$(MKL_YELLOW)Updating$(MKL_CLR_RESET)\n"
|
2014-02-05 10:11:05 +04:00
|
|
|
@(examples/rdkafka_performance -X list > CONFIGURATION.md.tmp; \
|
2015-04-21 20:12:45 +03:00
|
|
|
cmp CONFIGURATION.md CONFIGURATION.md.tmp || \
|
2014-02-05 10:11:05 +04:00
|
|
|
mv CONFIGURATION.md.tmp CONFIGURATION.md; \
|
2015-04-21 20:12:45 +03:00
|
|
|
rm -f CONFIGURATION.md.tmp)
|
2013-10-04 02:15:59 +04:00
|
|
|
|
2015-01-29 02:05:33 +03:00
|
|
|
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)
|
2013-09-23 18:31:56 +04:00
|
|
|
|
2012-09-19 14:26:37 +04:00
|
|
|
install:
|
2014-03-16 11:38:19 +04:00
|
|
|
@(for d in $(LIBSUBDIRS); do $(MAKE) -C $$d $@ || exit $?; done)
|
2014-02-05 10:11:05 +04:00
|
|
|
|
2015-01-29 02:05:33 +03:00
|
|
|
examples tests: .PHONY libs
|
2014-03-16 11:38:19 +04:00
|
|
|
$(MAKE) -C $@
|
2014-02-05 10:11:05 +04:00
|
|
|
|
2012-09-19 14:26:37 +04:00
|
|
|
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
|