Skip to content

Commit

Permalink
Check version string
Browse files Browse the repository at this point in the history
  • Loading branch information
thjaeger committed Nov 7, 2008
1 parent 8d44005 commit f2aa921
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ MENU = easystroke.desktop
MANPAGE = easystroke.1

CCFILES = $(wildcard *.cc)
OFILES = $(patsubst %.cc,%.o,$(CCFILES)) gui.o version.o
OFILES = $(patsubst %.cc,%.o,$(CCFILES)) gui.o ver.o
DEPFILES = $(wildcard *.Po)
GENFILES = gui.gb gui.c dbus-server.h

VERSION = $(shell test -e debian/changelog && grep '(.*)' debian/changelog | sed 's/.*(//' | sed 's/).*//' | head -n1 || (test -e version && cat version || git describe))
GIT = $(wildcard .git/index)
GIT = $(wildcard .git/index version)


-include debug.mk

all: $(BINARY)

.PHONY: all clean release
.PHONY: all clean

clean:
$(RM) $(OFILES) $(BINARY) $(GENFILES) $(DEPFILES) $(MANPAGE)
Expand All @@ -58,7 +59,8 @@ stroke.o: stroke.cc
%.o: %.cc
$(CXX) $(CXXFLAGS) $(OFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<

version.o: $(GIT)
ver.o: $(GIT)
echo $(VERSION) | grep "^$(shell test -e version && cat version)" > /dev/null
echo 'const char *version_string = "$(VERSION)";' | $(CXX) -o $@ -c -xc++ -

gui.gb: gui.glade
Expand Down

0 comments on commit f2aa921

Please sign in to comment.