changeset 21045:daf98e539358

Maintain VERSION and DISPLAY_VERSION defines in config.h for the mingw build instead of plopping it on the command line.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 29 Oct 2007 02:46:25 +0000
parents 6b02dba5bf41
children ecaa34fd0473
files config.h.mingw libpurple/win32/global.mak libpurple/win32/targets.mak
diffstat 3 files changed, 9 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/config.h.mingw	Mon Oct 29 00:19:53 2007 +0000
+++ b/config.h.mingw	Mon Oct 29 02:46:25 2007 +0000
@@ -377,7 +377,8 @@
 /* #define USE_SM 1 */
 
 /* Version number of package */
-/* #define VERSION "2.0.0dev" */
+#define VERSION "@VERSION@"
+#define DISPLAY_VERSION "@VERSION@"
 
 /* Define to 1 if your processor stores words with the most significant byte
    first (like Motorola and SPARC, unlike Intel and VAX). */
--- a/libpurple/win32/global.mak	Mon Oct 29 00:19:53 2007 +0000
+++ b/libpurple/win32/global.mak	Mon Oct 29 02:46:25 2007 +0000
@@ -71,9 +71,7 @@
 )
 PURPLE_VERSION := $(PIDGIN_VERSION)
 
-DEFINES += 	-DVERSION=\"$(PIDGIN_VERSION)\" \
-		-DDISPLAY_VERSION=\"$(PIDGIN_VERSION)\" \
-		-DHAVE_CONFIG_H
+DEFINES += -DHAVE_CONFIG_H
 
 # Use -g flag when building debug version of Pidgin (including plugins).
 # Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
--- a/libpurple/win32/targets.mak	Mon Oct 29 00:19:53 2007 +0000
+++ b/libpurple/win32/targets.mak	Mon Oct 29 02:46:25 2007 +0000
@@ -5,15 +5,15 @@
 # files for better handling of cross directory dependencies
 #
 
-$(PIDGIN_CONFIG_H): $(PIDGIN_TREE_TOP)/config.h.mingw
-	cp $(PIDGIN_TREE_TOP)/config.h.mingw $(PIDGIN_CONFIG_H)
+$(PIDGIN_CONFIG_H): $(PIDGIN_CONFIG_H).mingw $(PIDGIN_TREE_TOP)/configure.ac
+	sed -e 's/@VERSION@/$(PIDGIN_VERSION)/' $@.mingw > $@
 
 $(PURPLE_VERSION_H): $(PURPLE_VERSION_H).in $(PIDGIN_TREE_TOP)/configure.ac
-	cp $(PURPLE_VERSION_H).in $(PURPLE_VERSION_H)
+	cp $@.in $@
 	awk 'BEGIN {FS="[\\(\\)\\[\\]]"} \
-	  /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \
-	  /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \
-	  /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $(PURPLE_VERSION_H)"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
+	  /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $@");} \
+	  /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@");} \
+	  /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
 
 $(PURPLE_DLL) $(PURPLE_DLL).a: $(PURPLE_VERSION_H)
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) libpurple.dll
@@ -30,9 +30,6 @@
 $(PIDGIN_EXE):
 	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) pidgin.exe
 
-$(PIDGIN_PORTABLE_EXE):
-	$(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) pidgin-portable.exe
-
 # Installation Directories
 $(PIDGIN_INSTALL_DIR):
 	mkdir -p $(PIDGIN_INSTALL_DIR)