changeset 27707:b6f26015c51c

merge of '865afa7130542051d98f8e39bf3e0e6d8c70402c' and 'dd1526faf6facf85e95bf0038da0760ffe613d5c'
author Paul Aurich <paul@darkrain42.org>
date Mon, 27 Jul 2009 22:50:34 +0000
parents 12ab4c1112e5 (current diff) bd3cf895e19a (diff)
children b5e52173ef67
files
diffstat 3 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.mingw	Mon Jul 27 22:02:20 2009 +0000
+++ b/Makefile.mingw	Mon Jul 27 22:50:34 2009 +0000
@@ -73,7 +73,7 @@
 
 .PHONY: all docs install installer installer_nogtk installer_debug installers clean uninstall create_release_install_dir
 
-all: $(PIDGIN_CONFIG_H)
+all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H)
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE)
 	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE)
 ifndef DISABLE_NLS
@@ -125,7 +125,7 @@
 	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) clean
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) clean
 	$(MAKE) -C share/ca-certs -f $(MINGW_MAKEFILE) clean
-	rm -f $(PIDGIN_CONFIG_H) ./VERSION pidgin-$(PIDGIN_VERSION)*.exe pidgin-$(PIDGIN_VERSION)-win32-bin.zip
+	rm -f $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT) ./VERSION pidgin-$(PIDGIN_VERSION)*.exe pidgin-$(PIDGIN_VERSION)-win32-bin.zip
 	rm -rf doc/html Doxyfile.mingw
 
 uninstall:
--- a/libpurple/win32/global.mak	Mon Jul 27 22:02:20 2009 +0000
+++ b/libpurple/win32/global.mak	Mon Jul 27 22:50:34 2009 +0000
@@ -47,6 +47,8 @@
 # Locations of important (in-tree) build targets
 PIDGIN_CONFIG_H := $(PIDGIN_TREE_TOP)/config.h
 PURPLE_CONFIG_H := $(PIDGIN_TREE_TOP)/config.h
+PIDGIN_REVISION_H := $(PIDGIN_TREE_TOP)/package_revision.h
+PIDGIN_REVISION_RAW_TXT := $(PIDGIN_TREE_TOP)/package_revision_raw.txt
 PIDGIN_IDLETRACK_DLL := $(PIDGIN_IDLETRACK_TOP)/idletrack.dll
 PURPLE_PURPLE_H := $(PURPLE_TOP)/purple.h
 PURPLE_VERSION_H := $(PURPLE_TOP)/version.h
--- a/libpurple/win32/targets.mak	Mon Jul 27 22:02:20 2009 +0000
+++ b/libpurple/win32/targets.mak	Mon Jul 27 22:50:34 2009 +0000
@@ -17,6 +17,16 @@
 	  /^m4_define..purple_minor_version/ {system("sed -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@ > $@.tmp && mv $@.tmp $@");} \
 	  /^m4_define..purple_micro_version/ {system("sed -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@ > $@.tmp && mv $@.tmp $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
 
+$(PIDGIN_REVISION_RAW_TXT):
+	(cd $(PIDGIN_TREE_TOP) && mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \
+	|| rm -f $@
+
+$(PIDGIN_REVISION_H): $(PIDGIN_REVISION_RAW_TXT)
+	if [ -f $< ]; then \
+		sed 's/^\(.\+\)$$/#define REVISION "\1"/' $< > $@; \
+	fi
+	[ -f $@ ] || echo "#define REVISION \"unknown\"" > $@
+
 $(PURPLE_DLL) $(PURPLE_DLL).a: $(PURPLE_VERSION_H)
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) libpurple.dll