From cbfa0d53440faf299bcbd8462d203aa17a3db805 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Sun, 7 Oct 2012 15:05:00 +0100 Subject: [PATCH] Generate git-rev file at compile time. The file git-rev containing the program's version should be generated at kpdfview compile time rather than package generation time. Conflicts: Makefile --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0f27d4a1a..3789f8461 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,9 @@ POPENNSLIB := $(POPENNSDIR)/libpopen_noshell.a all: kpdfview +VERSION?=$(shell git describe HEAD) kpdfview: kpdfview.o einkfb.o pdf.o blitbuffer.o drawcontext.o input.o $(POPENNSLIB) util.o ft.o lfs.o mupdfimg.o $(MUPDFLIBS) $(THIRDPARTYLIBS) $(LUALIB) djvu.o $(DJVULIBS) cre.o $(CRENGINELIBS) + echo $(VERSION) > git-rev $(CC) \ $(CFLAGS) \ kpdfview.o \ @@ -250,7 +252,6 @@ INSTALL_DIR=kindlepdfviewer LUA_FILES=reader.lua -VERSION?=$(shell git describe HEAD) customupdate: all # ensure that build binary is for ARM file kpdfview | grep ARM || exit 1 @@ -258,12 +259,11 @@ customupdate: all rm -f kindlepdfviewer-$(VERSION).zip rm -rf $(INSTALL_DIR) mkdir -p $(INSTALL_DIR)/{history,screenshots} - echo $(VERSION) > $(INSTALL_DIR)/git-rev cp -p README.md COPYING kpdfview kpdf.sh $(LUA_FILES) $(INSTALL_DIR) mkdir $(INSTALL_DIR)/data cp -rpL data/*.css $(INSTALL_DIR)/data cp -rpL fonts $(INSTALL_DIR) - cp -r resources $(INSTALL_DIR) + cp -r git-rev resources $(INSTALL_DIR) cp -rpL frontend $(INSTALL_DIR) mkdir $(INSTALL_DIR)/fonts/host zip -9 -r kindlepdfviewer-$(VERSION).zip $(INSTALL_DIR) launchpad/ kite/