pidgin: dd1526fa: Fix windows build by adding the necessar...

nosnilmot at pidgin.im nosnilmot at pidgin.im
Mon Jul 27 15:15:31 EDT 2009


-----------------------------------------------------------------
Revision: dd1526faf6facf85e95bf0038da0760ffe613d5c
Ancestor: 9de96edcea00fc0b41b3668bdd9072738cbf149d
Author: nosnilmot at pidgin.im
Date: 2009-07-27T19:11:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/dd1526faf6facf85e95bf0038da0760ffe613d5c

Modified files:
        Makefile.mingw libpurple/win32/global.mak
        libpurple/win32/targets.mak

ChangeLog: 

Fix windows build by adding the necessary bits to define the MTN revision
for the About dialog

-------------- next part --------------
============================================================
--- Makefile.mingw	fe958a1d47db0e8feb0dabdfaa2a1556ff639683
+++ Makefile.mingw	266c544093e1a726e273790f7deeb3d76e0adec3
@@ -73,7 +73,7 @@ EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o
 
 .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 @@ clean:
 	$(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:
============================================================
--- libpurple/win32/global.mak	2f390daed2559442af622b450a3c65f098074cd3
+++ libpurple/win32/global.mak	44519e842cfe2c8d8a9f0ef1af1c8dd73d8e5dfb
@@ -47,6 +47,8 @@ PURPLE_CONFIG_H := $(PIDGIN_TREE_TOP)/co
 # 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
============================================================
--- libpurple/win32/targets.mak	9ab3100c96eeaebb89775db0a11ffb5fab4d2458
+++ libpurple/win32/targets.mak	a35247c1bfef29d3ae1f640770b9cad4c322c395
@@ -17,6 +17,16 @@ $(PURPLE_VERSION_H): $(PURPLE_VERSION_H)
 	  /^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
 


More information about the Commits mailing list