2008-03-14 16:04:34 +03:00
|
|
|
VERS = hg$$(hg identify -n)
|
2008-11-16 10:50:55 +03:00
|
|
|
VERS = hg$$(hg log -r $$(hg id 2>/dev/null | awk -F'[+ ]' '{print $$1}') --template '{rev}' 2>/dev/null)
|
2008-03-14 16:04:34 +03:00
|
|
|
VERSION = $(VERS)
|
2008-11-16 10:50:55 +03:00
|
|
|
VERSION := $(shell echo $(VERS))
|
|
|
|
VERSION != echo $(VERS)
|
2009-08-04 00:33:23 +04:00
|
|
|
CONFVERSION = -hg
|
2009-09-17 17:27:11 +04:00
|
|
|
COPYRIGHT = ©2009 Kris Maglione
|
2009-09-29 01:24:01 +04:00
|
|
|
|
|
|
|
CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"' \
|
|
|
|
'-DCONFVERSION=\"$(CONFVERSION)\"' '-DCONFPREFIX=\"$(ETC)\"'
|
|
|
|
FILTER = sed "s|@CONFPREFIX@|$(ETC)|g; \
|
|
|
|
s|@CONFVERSION@|$(CONFVERSION)|g; \
|
|
|
|
s|@P9PATHS@|$(P9PATHS)|g; \
|
2009-09-29 04:09:38 +04:00
|
|
|
s|@DOCDIR@|$(DOC)|g; \
|
2009-09-29 01:24:01 +04:00
|
|
|
s|@LIBDIR@|$(LIBDIR)|g; \
|
|
|
|
s|@BINSH@|$(BINSH)|g; \
|
|
|
|
s|@AWKPATH@|$(AWKPATH)|g"
|
2008-06-02 19:58:27 +04:00
|
|
|
|