Commit 722c219f authored by Moritz Lipp's avatar Moritz Lipp

Merge branch 'release/0.3.2'

parents 00f90abb d2c44a14
# build files
*.o *.o
*.do *.do
*~ *.gcda
*.rej *.gcno
*.swp *.info
*.pc
*.sw[a-z]
*.pyc
# generated files
dbus-interface-definitions.c
css-definitions.c
zathura.1
zathurarc.5
# dist files
zathura-*.tar.gz
# patch files
*.diff
*.patch
# build dirs
.depend .depend
.tx
gcov/
doc/_build
# binaries
zathura zathura
zathura-debug zathura-debug
zathura.pc
*.info # version file
*.gcno
*.gcda
gcov/
*.swp
version.h version.h
./doc/_build
*.tmp
zathura.1
zathurarc.5
.version-checks/ .version-checks/
dbus-interface-definitions.c
css-definitions.c # development files
.ycm_extra_conf.py .clang_complete
.lvimrc
.ropeproject .ropeproject
.frama-c
compile_commands.json compile_commands.json
zathura-*.tar.gz *.log
...@@ -27,3 +27,4 @@ Kamil Smardzewski <roderyk197@gmail.com> ...@@ -27,3 +27,4 @@ Kamil Smardzewski <roderyk197@gmail.com>
oblique oblique
Maxime Chéramy <maxime.cheramy@gmail.com> Maxime Chéramy <maxime.cheramy@gmail.com>
Alexander Shabalin <shabalyn.a@gmail.com> Alexander Shabalin <shabalyn.a@gmail.com>
Lingzhu Xiang <lingzhu@lingzhuxiang.com>
...@@ -4,9 +4,7 @@ include config.mk ...@@ -4,9 +4,7 @@ include config.mk
include colors.mk include colors.mk
include common.mk include common.mk
OSOURCE = $(filter-out css-definitions.c, $(filter-out dbus-interface-definitions.c, $(wildcard *.c))) OSOURCE = $(filter-out ${PROJECT}/css-definitions.c, $(filter-out ${PROJECT}/dbus-interface-definitions.c, $(wildcard ${PROJECT}/*.c)))
HEADER = $(wildcard *.h) $(wildcard synctex/*.h)
HEADERINST = version.h document.h macros.h page.h types.h plugin-api.h links.h
ifneq (${WITH_SQLITE},0) ifneq (${WITH_SQLITE},0)
INCS += $(SQLITE_INC) INCS += $(SQLITE_INC)
...@@ -29,10 +27,10 @@ LIBS += $(SYNCTEX_LIB) ...@@ -29,10 +27,10 @@ LIBS += $(SYNCTEX_LIB)
else else
INCS += $(ZLIB_INC) INCS += $(ZLIB_INC)
LIBS += $(ZLIB_LIB) LIBS += $(ZLIB_LIB)
SOURCE += $(wildcard synctex/*.c) SOURCE += $(wildcard ${PROJECT}/synctex/*.c)
ifeq (,$(findstring -Isynctex,${CPPFLAGS})) ifeq (,$(findstring -Isynctex,${CPPFLAGS}))
CPPFLAGS += -Isynctex CPPFLAGS += -I${PROJECT}/synctex
endif endif
ifeq (,$(findstring -DSYNCTEX_VERBOSE=0,${CPPFLAGS})) ifeq (,$(findstring -DSYNCTEX_VERBOSE=0,${CPPFLAGS}))
CPPFLAGS += -DSYNCTEX_VERBOSE=0 CPPFLAGS += -DSYNCTEX_VERBOSE=0
...@@ -53,8 +51,17 @@ ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS})) ...@@ -53,8 +51,17 @@ ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS}))
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\" CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
endif endif
OBJECTS = $(patsubst %.c, %.o, $(SOURCE)) dbus-interface-definitions.o css-definitions.o OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o}) \
DOBJECTS = $(patsubst %.o, %.do, $(OBJECTS)) ${BUILDDIR_RELEASE}/${PROJECT}/css-definitions.o \
${BUILDDIR_RELEASE}/${PROJECT}/dbus-interface-definitions.o
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o}) \
${BUILDDIR_DEBUG}/${PROJECT}/css-definitions.o \
${BUILDDIR_DEBUG}/${PROJECT}/dbus-interface-definitions.o
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o}) \
${BUILDDIR_GCOV}/${PROJECT}/css-definitions.o \
${BUILDDIR_GCOV}/${PROJECT}/dbus-interface-definitions.o
HEADER = $(wildcard ${PROJECT}/*.h) $(wildcard synctex/*.h)
HEADERINST = $(addprefix ${PROJECT}/,version.h document.h macros.h page.h types.h plugin-api.h links.h)
all: options ${PROJECT} po build-manpages all: options ${PROJECT} po build-manpages
...@@ -75,72 +82,125 @@ options: ...@@ -75,72 +82,125 @@ options:
@echo "DFLAGS = ${DFLAGS}" @echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}" @echo "CC = ${CC}"
version.h: version.h.in config.mk ${PROJECT}/version.h: ${PROJECT}/version.h.in config.mk
$(QUIET)sed -e 's/ZVMAJOR/${ZATHURA_VERSION_MAJOR}/' \ $(QUIET)sed -e 's/ZVMAJOR/${ZATHURA_VERSION_MAJOR}/' \
-e 's/ZVMINOR/${ZATHURA_VERSION_MINOR}/' \ -e 's/ZVMINOR/${ZATHURA_VERSION_MINOR}/' \
-e 's/ZVREV/${ZATHURA_VERSION_REV}/' \ -e 's/ZVREV/${ZATHURA_VERSION_REV}/' \
-e 's/ZVAPI/${ZATHURA_API_VERSION}/' \ -e 's/ZVAPI/${ZATHURA_API_VERSION}/' \
-e 's/ZVABI/${ZATHURA_ABI_VERSION}/' version.h.in > version.h.tmp -e 's/ZVABI/${ZATHURA_ABI_VERSION}/' ${PROJECT}/version.h.in > version.h.tmp
$(QUIET)mv version.h.tmp version.h $(QUIET)mv version.h.tmp ${PROJECT}/version.h
dbus-interface-definitions.c: data/org.pwmt.zathura.xml ${PROJECT}/dbus-interface-definitions.c: data/org.pwmt.zathura.xml
$(QUIET)echo '#include "dbus-interface-definitions.h"' > $@.tmp $(QUIET)echo '#include "dbus-interface-definitions.h"' > $@.tmp
$(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> $@.tmp $(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> $@.tmp
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> $@.tmp $(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> $@.tmp
$(QUIET)echo ';' >> $@.tmp $(QUIET)echo ';' >> $@.tmp
$(QUIET)mv $@.tmp $@ $(QUIET)mv $@.tmp $@
css-definitions.c: data/zathura.css_t ${PROJECT}/css-definitions.c: data/zathura.css_t
$(QUIET)echo '#include "css-definitions.h"' > $@.tmp $(QUIET)echo '#include "css-definitions.h"' > $@.tmp
$(QUIET)echo 'const char* CSS_TEMPLATE_INDEX =' >> $@.tmp $(QUIET)echo 'const char* CSS_TEMPLATE_INDEX =' >> $@.tmp
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' $< >> $@.tmp $(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' $< >> $@.tmp
$(QUIET)echo ';' >> $@.tmp $(QUIET)echo ';' >> $@.tmp
$(QUIET)mv $@.tmp $@ $(QUIET)mv $@.tmp $@
%.o: %.c # release build
${OBJECTS}: config.mk ${PROJECT}/version.h \
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
${BUILDDIR_RELEASE}/%.o: %.c
$(call colorecho,CC,$<) $(call colorecho,CC,$<)
$(QUIET) mkdir -p $(shell dirname .depend/$@.dep) @mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep @mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}: ${OBJECTS}
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_RELEASE}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} ${OBJECTS} ${LIBS}
${PROJECT}: ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
release: ${PROJECT}
%.do: %.c run: release
$(QUIET)./${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
# debug build
${OBJECTS_DEBUG}: config.mk ${PROJECT}/version.h \
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
${BUILDDIR_DEBUG}/%.o: %.c
$(call colorecho,CC,$<) $(call colorecho,CC,$<)
$(QUIET) mkdir -p $(shell dirname .depend/$@.dep) @mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep @mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}: ${OBJECTS_DEBUG}
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_DEBUG}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT} ${OBJECTS} ${LIBS}
${OBJECTS} ${DOBJECTS}: config.mk version.h \ debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
run-debug: debug
$(QUIET)./${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
# gcov build
${OBJECTS_GCOV}: config.mk ${PROJECT}/version.h \
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK .version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
${PROJECT}: ${OBJECTS} ${BUILDDIR_GCOV}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
@mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}: ${OBJECTS_GCOV}
$(call colorecho,CC,$@) $(call colorecho,CC,$@)
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS} @mkdir -p ${BUILDDIR_GCOV}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} ${GCOV_CFLAGS} ${GCOV_LDFLAGS} \
-o ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT} ${OBJECTS} ${LIBS}
gcov: options ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
$(QUIET)${MAKE} -C tests run-gcov
$(call colorecho,LCOV,"Analyse data")
$(QUIET)${LCOV_EXEC} ${LCOV_FLAGS}
$(call colorecho,LCOV,"Generate report")
$(QUIET)${GENHTML_EXEC} ${GENHTML_FLAGS}
run-gcov: ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
$(QUIET)./${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
# clean
clean: clean:
$(QUIET)rm -rf ${PROJECT} \ $(QUIET)rm -rf \
${OBJECTS} \ ${BUILDDIR} \
${DEPENDDIR} \
${TARFILE} \ ${TARFILE} \
${TARDIR} \ ${TARDIR} \
${DOBJECTS} \
${PROJECT}-debug \
.depend \
${PROJECT}.pc \ ${PROJECT}.pc \
version.h \ version.h \
version.h.tmp \ version.h.tmp \
dbus-interface-definitions.c \ ${PROJECT}/dbus-interface-definitions.c \
dbus-interface-definitions.c.tmp \ ${PROJECT}/dbus-interface-definitions.c.tmp \
css-definitions.c \ ${PROJECT}/css-definitions.c \
css-definitions.c.tmp \ ${PROJECT}/css-definitions.c.tmp \
*gcda *gcno $(PROJECT).info gcov *.tmp \ $(PROJECT).info \
gcov \
.version-checks .version-checks
$(QUIET)$(MAKE) -C tests clean $(QUIET)$(MAKE) -C tests clean
$(QUIET)$(MAKE) -C po clean $(QUIET)$(MAKE) -C po clean
$(QUIET)$(MAKE) -C doc clean $(QUIET)$(MAKE) -C doc clean
${PROJECT}-debug: ${DOBJECTS}
$(call colorecho,CC,$@)
$(QUIET)${CC} ${LDFLAGS} -o $@ ${DOBJECTS} ${LIBS}
debug: ${PROJECT}-debug
${PROJECT}.pc: ${PROJECT}.pc.in config.mk ${PROJECT}.pc: ${PROJECT}.pc.in config.mk
$(QUIET)echo project=${PROJECT} > ${PROJECT}.pc $(QUIET)echo project=${PROJECT} > ${PROJECT}.pc
$(QUIET)echo version=${VERSION} >> ${PROJECT}.pc $(QUIET)echo version=${VERSION} >> ${PROJECT}.pc
...@@ -170,12 +230,6 @@ dist: clean build-manpages ...@@ -170,12 +230,6 @@ dist: clean build-manpages
doc: doc:
$(QUIET)make -C doc $(QUIET)make -C doc
gcov: clean
$(QUIET)CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" LDFLAGS="${LDFLAGS} -fprofile-arcs" ${MAKE} $(PROJECT)
$(QUIET)CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" LDFLAGS="${LDFLAGS} -fprofile-arcs" ${MAKE} -C tests run
$(QUIET)lcov --directory . --capture --output-file $(PROJECT).info
$(QUIET)genhtml --output-directory gcov $(PROJECT).info
po: po:
$(QUIET)${MAKE} -C po $(QUIET)${MAKE} -C po
...@@ -217,7 +271,7 @@ install-appdata: ...@@ -217,7 +271,7 @@ install-appdata:
install: all install-headers install-manpages install-dbus install-appdata install: all install-headers install-manpages install-dbus install-appdata
$(call colorecho,INSTALL,"executeable file") $(call colorecho,INSTALL,"executeable file")
$(QUIET)mkdir -m 755 -p ${DESTDIR}${PREFIX}/bin $(QUIET)mkdir -m 755 -p ${DESTDIR}${PREFIX}/bin
$(QUIET)install -m 755 ${PROJECT} ${DESTDIR}${PREFIX}/bin $(QUIET)install -m 755 ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} ${DESTDIR}${PREFIX}/bin
$(QUIET)mkdir -m 755 -p ${DESTDIR}${DESKTOPPREFIX} $(QUIET)mkdir -m 755 -p ${DESTDIR}${DESKTOPPREFIX}
$(call colorecho,INSTALL,"desktop file") $(call colorecho,INSTALL,"desktop file")
$(QUIET)install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX} $(QUIET)install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX}
......
...@@ -6,7 +6,7 @@ PROJECT = zathura ...@@ -6,7 +6,7 @@ PROJECT = zathura
ZATHURA_VERSION_MAJOR = 0 ZATHURA_VERSION_MAJOR = 0
ZATHURA_VERSION_MINOR = 3 ZATHURA_VERSION_MINOR = 3
ZATHURA_VERSION_REV = 1 ZATHURA_VERSION_REV = 2
# If the API changes, the API version and the ABI version have to be bumped. # If the API changes, the API version and the ABI version have to be bumped.
ZATHURA_API_VERSION = 2 ZATHURA_API_VERSION = 2
# If the ABI breaks for any reason, this has to be bumped. # If the ABI breaks for any reason, this has to be bumped.
...@@ -50,6 +50,12 @@ LIBDIR ?= ${PREFIX}/lib ...@@ -50,6 +50,12 @@ LIBDIR ?= ${PREFIX}/lib
INCLUDEDIR ?= ${PREFIX}/include INCLUDEDIR ?= ${PREFIX}/include
DBUSINTERFACEDIR ?= ${PREFIX}/share/dbus-1/interfaces DBUSINTERFACEDIR ?= ${PREFIX}/share/dbus-1/interfaces
VIMFTPLUGINDIR ?= ${PREFIX}/share/vim/addons/ftplugin VIMFTPLUGINDIR ?= ${PREFIX}/share/vim/addons/ftplugin
DEPENDDIR ?= .depend
BUILDDIR ?= build
BUILDDIR_RELEASE ?= ${BUILDDIR}/release
BUILDDIR_DEBUG ?= ${BUILDDIR}/debug
BUILDDIR_GCOV ?= ${BUILDDIR}/gcov
BINDIR ?= bin
# plugin directory # plugin directory
PLUGINDIR ?= ${LIBDIR}/zathura PLUGINDIR ?= ${LIBDIR}/zathura
...@@ -111,6 +117,16 @@ SFLAGS ?= -s ...@@ -111,6 +117,16 @@ SFLAGS ?= -s
# msgfmt # msgfmt
MSGFMT ?= msgfmt MSGFMT ?= msgfmt
# gcov & lcov
GCOV_CFLAGS=-fprofile-arcs -ftest-coverage
GCOV_LDFLAGS=-fprofile-arcs
LCOV_OUTPUT=gcov
LCOV_EXEC=lcov
LCOV_FLAGS=--base-directory . --directory ${BUILDDIR_GCOV} --capture --rc \
lcov_branch_coverage=1 --output-file ${BUILDDIR_GCOV}/$(PROJECT).info
GENHTML_EXEC=genhtml
GENHTML_FLAGS=--rc lcov_branch_coverage=1 --output-directory ${LCOV_OUTPUT} ${BUILDDIR_GCOV}/$(PROJECT).info
# valgrind # valgrind
VALGRIND = valgrind VALGRIND = valgrind
VALGRIND_ARGUMENTS = --tool=memcheck --leak-check=yes --leak-resolution=high \ VALGRIND_ARGUMENTS = --tool=memcheck --leak-check=yes --leak-resolution=high \
......
...@@ -7,7 +7,7 @@ include config.mk ...@@ -7,7 +7,7 @@ include config.mk
MAN_SOURCES=$(wildcard man/*.rst) $(wildcard man/*.txt) man/conf.py MAN_SOURCES=$(wildcard man/*.rst) $(wildcard man/*.txt) man/conf.py
DOXYGEN_SOURCES=$(wildcard ../*.h) Doxyfile DOXYGEN_SOURCES=$(wildcard ../*.h) Doxyfile
HTML_SORUCES=$(wildcard *.rst api/*.rst configuration/*.rst installation/*.rst usage/*.rst) conf.py HTML_SOURCES=$(wildcard *.rst api/*.rst configuration/*.rst installation/*.rst usage/*.rst) conf.py
SPHINX_OPTS+=-d $(SPHINX_BUILDDIR)/doctrees SPHINX_OPTS+=-d $(SPHINX_BUILDDIR)/doctrees
......
-x, --reparent=xid -e, --reparent=xid
Reparents to window specified by xid Reparents to window specified by xid
-c, --config-dir=path -c, --config-dir=path
......
zathura [-e XID] [-c PATH] [-d PATH] [-p PATH] [-w PASSWORD] [-p NUMBER] zathura [-e XID] [-c PATH] [-d PATH] [-p PATH] [-w PASSWORD] [-P NUMBER]
[--fork] [-l LEVEL] [-s] [-x CMD] [--synctex-forward INPUT] <files> [--fork] [-l LEVEL] [-s] [-x CMD] [--synctex-forward INPUT] <files>
...@@ -699,6 +699,18 @@ consuming a significant portion of the system memory. ...@@ -699,6 +699,18 @@ consuming a significant portion of the system memory.
* Value type: Integer * Value type: Integer
* Default value: 15 * Default value: 15
page-thumbnail-size
^^^^^^^^^^^^^^^^^^^
Defines the maximum size in pixels of the thumbnail that could be kept in the
thumbnail cache per page. The thumbnail is scaled for a quick preview during
zooming before the page is rendered. When the page is rendered, the result is
saved as the thumbnail only if the size is no more than this value. A larger
value increases quality but introduces longer delay in zooming and uses more
system memory.
* Value type: Integer
* Default value: 4194304 (4M)
pages-per-row pages-per-row
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
Defines the number of pages that are rendered next to each other in a row. Defines the number of pages that are rendered next to each other in a row.
......
.. zathura documentation master file, created by Usage
sphinx-quickstart on Tue Apr 8 18:33:05 2014. ======
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to zathura's documentation!
===================================
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:numbered: :numbered:
installation/index commands
usage/index
configuration/index
api/index
faq
.. toctree::
:hidden:
man/zathura.1
man/zathurarc.5
...@@ -19,10 +19,10 @@ all: ${MOS} ...@@ -19,10 +19,10 @@ all: ${MOS}
clean: clean:
$(QUIET)rm -rf POTFILES.in POTFILES.in.tmp $(patsubst %.po, %, $(CATALOGS)) ${PROJECT}.pot $(QUIET)rm -rf POTFILES.in POTFILES.in.tmp $(patsubst %.po, %, $(CATALOGS)) ${PROJECT}.pot
POTFILES.in: $(wildcard ../*.c) POTFILES.in: $(wildcard ../zathura/*.c)
$(QUIET) set -e && rm -f $@.tmp && touch $@.tmp && \ $(QUIET) set -e && rm -f $@.tmp && touch $@.tmp && \
for f in $(^F) ; do \ for f in $(^F) ; do \
echo $$f >> $@.tmp ; \ echo zathura/$$f >> $@.tmp ; \
done && \ done && \
mv $@.tmp $@ mv $@.tmp $@
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
tests tests
tests-gcov
tests-debug
# See LICENSE file for license and copyright information # See LICENSE file for license and copyright information
include ../config.mk include ../config.mk
include ../colors.mk
include ../common.mk include ../common.mk
include config.mk include config.mk
PROJECT = tests PROJECT = tests
SOURCE = tests.c $(wildcard test_*.c) SOURCE = tests.c $(wildcard test_*.c)
OBJECTS = ${SOURCE:.c=.o} OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o})
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o})
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o})
ZOSOURCE = $(filter-out ../main.c,$(wildcard ../*.c)) ZATHURA_OBJECTS = \
$(filter-out ../${BUILDDIR_RELEASE}/zathura/main.o, $(wildcard ../${BUILDDIR_RELEASE}/zathura/*.o))
ZATHURA_OBJECTS_DEBUG = \
$(filter-out ../${BUILDDIR_DEBUG}/zathura/main.o, $(wildcard ../${BUILDDIR_DEBUG}/zathura/*.o))
ZATHURA_OBJECTS_GCOV= \
$(filter-out ../${BUILDDIR_GCOV}/zathura/main.o, $(wildcard ../${BUILDDIR_GCOV}/zathura/*.o))
ifneq (${WITH_SQLITE},0) ifneq (${WITH_SQLITE},0)
INCS += $(SQLITE_INC) INCS += $(SQLITE_INC)
LIBS += $(SQLITE_LIB) LIBS += $(SQLITE_LIB)
ZSOURCE += $(ZOSOURCE)
ifeq (,$(findstring -DWITH_SQLITE,${CPPFLAGS}))
CPPFLAGS += -DWITH_SQLITE CPPFLAGS += -DWITH_SQLITE
endif
else else
ZSOURCE = $(filter-out ../database-sqlite.c,$(ZOSOURCE)) SOURCE = $(filter-out database-sqlite.c,$(OSOURCE))
endif endif
ifneq ($(WITH_MAGIC),0) ifneq ($(WITH_MAGIC),0)
INCS += $(MAGIC_INC) INCS += $(MAGIC_INC)
LIBS += $(MAGIC_LIB) LIBS += $(MAGIC_LIB)
CPPFLAGS += -DWITH_MAGIC CPPFLAGS += -DWITH_MAGIC
endif endif
ifneq ($(WITH_SYSTEM_SYNCTEX),0) ifneq ($(WITH_SYSTEM_SYNCTEX),0)
INCS += $(SYNCTEX_INC)
LIBS += $(SYNCTEX_LIB)
else else
INCS += $(ZLIB_INC) ZATHURA_OBJECTS += $(wildcard ../${BUILDDIR_RELEASE}/zathura/synctex/*.o)
ZATHURA_OBJECTS_DEBUG += $(wildcard ../${BUILDDIR_DEBUG}/zathura/synctex/*.o)
ZATHURA_OBJECTS_GCOV += $(wildcard ../${BUILDDIR_GCOV}/zathura/synctex/*.o)
LIBS += $(ZLIB_LIB) LIBS += $(ZLIB_LIB)
ZSOURCE += $(wildcard ../synctex/*.c)
CPPFLAGS += -I../synctex
ifeq (,$(findstring -Isynctex,${CPPFLAGS}))
CPPFLAGS += -I../zathura/synctex
endif
ifeq (,$(findstring -DSYNCTEX_VERBOSE=0,${CPPFLAGS})) ifeq (,$(findstring -DSYNCTEX_VERBOSE=0,${CPPFLAGS}))
CPPFLAGS += -DSYNCTEX_VERBOSE=0 CPPFLAGS += -DSYNCTEX_VERBOSE=0
endif endif
endif endif
ifeq (,$(findstring -Isynctex,${CPPFLAGS})) ifneq ($(wildcard ${VALGRIND_SUPPRESSION_FILE}),)
CPPFLAGS += -Isynctex VALGRIND_ARGUMENTS += --suppressions=${VALGRIND_SUPPRESSION_FILE}
endif
ifeq (,$(findstring -DSYNCTEX_VERBOSE=0,${CPPFLAGS}))
CPPFLAGS += -DSYNCTEX_VERBOSE=0
endif endif
ZOBJECTS = ${ZSOURCE:.c=.o} all: release
# release
${OBJECTS}: config.mk ../config.mk ../zathura/version.h
${BUILDDIR_RELEASE}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
@mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}: ${OBJECTS}
$(QUIET)${MAKE} WITH_LIBFIU=1 -C .. ${BUILDDIR_RELEASE}/${BINDIR}/zathura
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_RELEASE}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} \
${OBJECTS} ${ZATHURA_OBJECTS} ${LIBS}
release: ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
run: ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
$(QUIET)${FIU_EXEC} ./${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
# debug
${OBJECTS_DEBUG}: config.mk ../config.mk ../zathura/version.h
${BUILDDIR_DEBUG}/%.o: %.c
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
@mkdir -p $(dir $(abspath $@))
$(call colorecho,CC,$<)
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}: ${OBJECTS_DEBUG}
$(QUIET)${MAKE} WITH_LIBFIU=1 -C .. ${BUILDDIR_DEBUG}/${BINDIR}/zathura
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_DEBUG}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT} \
${OBJECTS} ${ZATHURA_OBJECTS_DEBUG} ${LIBS}
debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
run-debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
$(QUIET)${FIU_EXEC} ./${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
# gcov
${OBJECTS_GCOV}: config.mk ../config.mk ../zathura/version.h
all: ${PROJECT} ${BUILDDIR_GCOV}/%.o: %.c
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
@mkdir -p $(dir $(abspath $@))
$(call colorecho,CC,$<)
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} ${DFLAGS} ${GCOV_DFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
run: ${PROJECT} ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}: ${OBJECTS_GCOV}
$(QUIET)./${PROJECT} $(QUIET)${MAKE} WITH_LIBFIU=1 -C .. ${BUILDDIR_GCOV}/${BINDIR}/zathura
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_GCOV}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} ${GCOV_CFLAGS} ${GCOV_LDFLAGS} \
-o ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT} \
${OBJECTS} ${ZATHURA_OBJECTS_GCOV} ${LIBS}
options: gcov: ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
@echo ${PROJECT} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}"