Bug 980756 - Windows debug build with purplexpcom fails, r=florian.
authorPatrick Cloke <clokep@gmail.com>
Thu, 20 Mar 2014 08:01:09 -0400
changeset 704 ad17398f71313b3e687f3fe3d8ad7008bfe95126
parent 703 ddf4964591d5c2d9d7b97c9698d50f4d96a015e5
child 705 4c4d57a8ca92abc69d44496a632bfc6ce6e7d351
push id5
push userclokep@gmail.com
push dateThu, 20 Mar 2014 12:13:15 +0000
reviewersflorian
bugs980756
Bug 980756 - Windows debug build with purplexpcom fails, r=florian.
libpurple/Makefile.in
--- a/libpurple/Makefile.in
+++ b/libpurple/Makefile.in
@@ -61,16 +61,21 @@ static_proto_init.c: $(GLOBAL_DEPS)
 	echo >  $@ '#include <glib.h>'
 	echo >> $@ '$(foreach proto,$(STATIC_PRPLS),extern gboolean purple_init_$(proto)_plugin();)'
 	echo >> $@ 'void static_proto_init(void) {'
 	echo >> $@ '$(foreach proto,$(STATIC_PRPLS),purple_init_$(proto)_plugin();)'
 	echo >> $@ '}'
 endif
 
 ifeq ($(OS_ARCH),WINNT)
+# This is a dirty hack since EXPORTS_libpurple is now in moz.build land and is
+# not accessible to make anymore. Luckily all the .h files in the moz.build file
+# are part of EXPORTS_libpurple.
+EXPORTS_libpurple := $(shell egrep '.+\.h' '$(srcdir)/moz.build' |egrep -v '^\#' |cut -d "'" -f 2)
+
 purple.def: ../libraries/glib/glib.def $(EXPORTS_libpurple) $(GLOBAL_DEPS)
 	cat ../libraries/glib/glib.def > purple.def
 	(cd $(srcdir); cat $(EXPORTS_libpurple)) |egrep '^[a-zA-Z].* \*?w?purple_[a-z_0-9]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def
 	(cd $(srcdir); cat $(EXPORTS_libpurple)) |egrep '^w?purple_[a-z_0-9]+ ?\(' |sed -e 's/(.*//' |sort |uniq >> purple.def
 	cat $(srcdir)/server.h |egrep '^[a-zA-Z].* \*?serv_[a-z_0-9]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def
 	cat $(srcdir)/signals.h |egrep 'void purple_marshal_[A-Z_]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def
 	cat $(srcdir)/xmlnode.h |egrep '^[a-zA-Z].* \*?xmlnode_[a-z_]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def