aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--uzbl.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 52d96b6..906436f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CPPFLAGS=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -Wall -W
+CPPFLAGS=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -Wall -W -DKERNVER="\"$(shell uname -r)\"" -DARCH="\"$(shell uname -m)\"" -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\""
LDFLAGS=$(shell pkg-config --libs gtk+-2.0 webkit-1.0)
all: uzbl uzblctrl
diff --git a/uzbl.c b/uzbl.c
index 3037484..ae7c755 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -971,6 +971,9 @@ settings_init () {
strcpy(newagent, str_replace("%webkit-major%", itos(WEBKIT_MAJOR_VERSION), useragent));
strcpy(newagent, str_replace("%webkit-minor%", itos(WEBKIT_MINOR_VERSION), newagent));
strcpy(newagent, str_replace("%webkit-micro%", itos(WEBKIT_MICRO_VERSION), newagent));
+ strcpy(newagent, str_replace("%kernver%", KERNVER, newagent));
+ strcpy(newagent, str_replace("%arch%", ARCH, newagent));
+ strcpy(newagent, str_replace("%commit%", COMMIT, newagent));
useragent = malloc(1024);
strcpy(useragent, newagent);