Mercurial > pidgin.yaz
changeset 28039:bd3cf895e19a
Fix windows build by adding the necessary bits to define the MTN revision
for the About dialog
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 27 Jul 2009 19:11:49 +0000 |
parents | 14ce47859540 |
children | b6f26015c51c 60aab59fb35a |
files | Makefile.mingw libpurple/win32/global.mak libpurple/win32/targets.mak |
diffstat | 3 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.mingw Mon Jul 27 05:20:52 2009 +0000 +++ b/Makefile.mingw Mon Jul 27 19:11:49 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 05:20:52 2009 +0000 +++ b/libpurple/win32/global.mak Mon Jul 27 19:11:49 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 05:20:52 2009 +0000 +++ b/libpurple/win32/targets.mak Mon Jul 27 19:11:49 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