mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:36:00 +01:00
Add girara version check.
This commit is contained in:
parent
45dad09deb
commit
66d6b27c00
3 changed files with 16 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,3 +17,4 @@ doc/
|
||||||
*.tmp
|
*.tmp
|
||||||
zathura.1
|
zathura.1
|
||||||
zathurarc.5
|
zathurarc.5
|
||||||
|
girara-version-check
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -25,6 +25,12 @@ DOBJECTS = $(patsubst %.c, %.do, $(SOURCE))
|
||||||
|
|
||||||
all: options ${PROJECT} po build-manpages
|
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:
|
options:
|
||||||
@echo ${PROJECT} build options:
|
@echo ${PROJECT} build options:
|
||||||
@echo "CFLAGS = ${CFLAGS}"
|
@echo "CFLAGS = ${CFLAGS}"
|
||||||
|
@ -48,8 +54,8 @@ version.h: version.h.in config.mk
|
||||||
@mkdir -p .depend
|
@mkdir -p .depend
|
||||||
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
|
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
|
||||||
|
|
||||||
${OBJECTS}: config.mk version.h
|
${OBJECTS}: config.mk version.h girara-version-check
|
||||||
${DOBJECTS}: config.mk version.h
|
${DOBJECTS}: config.mk version.h girara-version-check
|
||||||
|
|
||||||
${PROJECT}: ${OBJECTS}
|
${PROJECT}: ${OBJECTS}
|
||||||
$(ECHO) CC -o $@
|
$(ECHO) CC -o $@
|
||||||
|
@ -58,7 +64,8 @@ ${PROJECT}: ${OBJECTS}
|
||||||
clean:
|
clean:
|
||||||
$(QUIET)rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
|
$(QUIET)rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
|
||||||
${DOBJECTS} ${PROJECT}-debug .depend ${PROJECT}.pc doc version.h \
|
${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 tests clean
|
||||||
$(QUIET)make -C po 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!
|
# note: zathura with GTK+ 3 is broken!
|
||||||
ZATHURA_GTK_VERSION ?= 2
|
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
|
# database
|
||||||
# To disable support for the sqlite backend set WITH_SQLITE to 0.
|
# To disable support for the sqlite backend set WITH_SQLITE to 0.
|
||||||
WITH_SQLITE ?= $(shell (pkg-config --exists sqlite3 && echo 1) || echo 0)
|
WITH_SQLITE ?= $(shell (pkg-config --exists sqlite3 && echo 1) || echo 0)
|
||||||
|
|
Loading…
Reference in a new issue