Commit 66d6b27c authored by Sebastian Ramacher's avatar Sebastian Ramacher

Add girara version check.

parent 45dad09d
......@@ -17,3 +17,4 @@ doc/
*.tmp
zathura.1
zathurarc.5
girara-version-check
......@@ -25,6 +25,12 @@ DOBJECTS = $(patsubst %.c, %.do, $(SOURCE))
all: options ${PROJECT} po build-manpages
girara-version-check:
ifneq ($(GIRARA_VERSION_CHECK), 0)
$(error "The minimum required version of girara is ${GIRARA_MIN_VERSION}")
endif
$(QUIET)touch girara-version-check
options:
@echo ${PROJECT} build options:
@echo "CFLAGS = ${CFLAGS}"
......@@ -48,8 +54,8 @@ version.h: version.h.in config.mk
@mkdir -p .depend
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
${OBJECTS}: config.mk version.h
${DOBJECTS}: config.mk version.h
${OBJECTS}: config.mk version.h girara-version-check
${DOBJECTS}: config.mk version.h girara-version-check
${PROJECT}: ${OBJECTS}
$(ECHO) CC -o $@
......@@ -58,7 +64,8 @@ ${PROJECT}: ${OBJECTS}
clean:
$(QUIET)rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
${DOBJECTS} ${PROJECT}-debug .depend ${PROJECT}.pc doc version.h \
*gcda *gcno $(PROJECT).info gcov *.tmp ${PROJECT}.1 ${PROJECT}rc.5
*gcda *gcno $(PROJECT).info gcov *.tmp ${PROJECT}.1 ${PROJECT}rc.5 \
girara-version-check
$(QUIET)make -C tests clean
$(QUIET)make -C po clean
......
......@@ -11,6 +11,11 @@ VERSION = ${ZATHURA_VERSION_MAJOR}.${ZATHURA_VERSION_MINOR}.${ZATHURA_VERSION_RE
# note: zathura with GTK+ 3 is broken!
ZATHURA_GTK_VERSION ?= 2
# minimum required zathura version
# If you want to disable the check, set GIRARA_VERSION_CHECK to 0.
GIRARA_MIN_VERSION = 0.1.1
GIRARA_VERSION_CHECK ?= $(shell pkg-config --atleast-version=$(GIRARA_MIN_VERSION) girara-gtk${ZATHURA_GTK_VERSION}; echo $$?)
# database
# To disable support for the sqlite backend set WITH_SQLITE to 0.
WITH_SQLITE ?= $(shell (pkg-config --exists sqlite3 && echo 1) || echo 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment