changeset 15082:133af8458cbd

[gaim-migrate @ 17868] wingaim build process no longer needs to re-build everything for the non-debug version. `make -f Makefile.mingw installers` will now produce the "regular", "no-gtk" and "debug" installers. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 01 Dec 2006 20:02:32 +0000
parents bc440018e208
children 8fc4d62b14ad
files Makefile.mingw gaim-installer.nsi
diffstat 2 files changed, 35 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.mingw	Fri Dec 01 09:47:20 2006 +0000
+++ b/Makefile.mingw	Fri Dec 01 20:02:32 2006 +0000
@@ -31,7 +31,27 @@
     exit; \
 }' VERSION)
 
-.PHONY: all install installer installer_nogtk installer_debug installers clean uninstall
+# Any *.dll or *.exe files included in win32-install-dir that we don't compile
+# should be included in this list so they don't get stripped
+NON_GAIM_DLLS = \
+	freebl3.dll \
+	libgtkspell.dll \
+	libmeanwhile-1.dll \
+	libxml2.dll \
+	nspr4.dll \
+	nss3.dll \
+	nssckbi.dll \
+	plc4.dll \
+	plds4.dll \
+	silc.dll \
+	silcclient.dll \
+	softokn3.dll \
+	ssl3.dll
+
+#build an expression for `find` to use to ignore the above files
+NON_GAIM_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(NON_GAIM_DLLS))
+
+.PHONY: all install installer installer_nogtk installer_debug installers clean uninstall create_release_install_dir
 
 all: $(GAIM_CONFIG_H)
 	$(MAKE) -C $(GAIM_LIB_TOP) -f $(GAIM_WIN32_MAKEFILE)
@@ -43,16 +63,22 @@
 	$(MAKE) -C $(GAIM_GTK_TOP) -f $(GAIM_WIN32_MAKEFILE) install
 	$(MAKE) -C $(GAIM_PO_TOP) -f $(GAIM_WIN32_MAKEFILE) install
 
-installer: install
-	$(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DWITH_GTK gaim-installer.nsi
+create_release_install_dir: install
+	rm -rf $(GAIM_INSTALL_DIR).release
+	cp -R $(GAIM_INSTALL_DIR) $(GAIM_INSTALL_DIR).release
+	find $(GAIM_INSTALL_DIR).release \( -name '*.dll' -o -name '*.exe' \) \
+	 -not \( -false $(NON_GAIM_DLLS_FIND_EXP) \) -exec strip --strip-unneeded {} ';'
 
-installer_nogtk: install
-	$(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" gaim-installer.nsi
+installer: create_release_install_dir
+	$(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DWITH_GTK /DGAIM_INSTALL_DIR="$(GAIM_INSTALL_DIR).release" gaim-installer.nsi
+
+installer_nogtk: create_release_install_dir
+	$(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DGAIM_INSTALL_DIR="$(GAIM_INSTALL_DIR).release" gaim-installer.nsi
 
 installer_debug: install
-	$(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DDEBUG gaim-installer.nsi
+	$(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DGAIM_INSTALL_DIR="$(GAIM_INSTALL_DIR)" /DDEBUG gaim-installer.nsi
 
-installers: installer installer_nogtk
+installers: installer installer_nogtk installer_debug
 
 clean:
 	$(MAKE) -C $(GAIM_PO_TOP) -f $(GAIM_WIN32_MAKEFILE) clean
@@ -61,6 +87,6 @@
 	rm -f $(GAIM_CONFIG_H) gaim*.exe
 
 uninstall:
-	rm -rf $(GAIM_INSTALL_PERLMOD_DIR) $(GAIM_INSTALL_PLUGINS_DIR) $(GAIM_INSTALL_PO_DIR) $(GAIM_INSTALL_DIR)
+	rm -rf $(GAIM_INSTALL_PERLMOD_DIR) $(GAIM_INSTALL_PLUGINS_DIR) $(GAIM_INSTALL_PO_DIR) $(GAIM_INSTALL_DIR) $(GAIM_INSTALL_DIR).release
 
 include $(GAIM_COMMON_TARGETS)
--- a/gaim-installer.nsi	Fri Dec 01 09:47:20 2006 +0000
+++ b/gaim-installer.nsi	Fri Dec 01 20:02:32 2006 +0000
@@ -424,7 +424,7 @@
     SetOutPath "$INSTDIR"
     ; Gaim files
     SetOverwrite on
-    File /r .\win32-install-dir\*.*
+    File /r ${GAIM_INSTALL_DIR}\*.*
     !ifdef DEBUG
     File "${GAIM_INSTALLER_DEPS}\exchndl.dll"
     !endif