[Messaging] Conditionally drop dependency on Wnforms
authorMarek Habersack <grendel@twistedcode.net>
Sat, 25 Sep 2010 22:14:21 +0000 (00:14 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Sat, 25 Sep 2010 22:14:21 +0000 (00:14 +0200)
If you pass the option MESSAGING_NO_WINFORMS=1 to make, System.Messaging will be compiled
without the dependency to System.Windows.Forms. The dependency is needed just by the
System.Messaging.Design.QueuePathDialog class which is both a stub and not used anywhere
by Mono.

mcs/class/System.Messaging/Makefile
mcs/class/System.Messaging/System.Messaging.Design/QueuePathDialog.cs

index a2eb9935321162c6be4c2b0ab00a71aa49a36dc9..681b8835095a4c8eb8fd6db3b03ce9caf56152e8 100644 (file)
@@ -15,4 +15,8 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 \
 
 EXTRA_DISTFILES = System.Messaging/MessageQueue.resx
 
+ifdef MESSAGING_NO_WINFORMS
+LIB_MCS_FLAGS += -d:NO_WINFORMS_DEPENDENCY
+endif
+
 include ../../build/library.make
index 147a43f51df363acc4e446852c4e8d08a4149ad8..a456f071891f8d1b1f09f4eb4e20f7b571308b40 100644 (file)
@@ -27,7 +27,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-
+#if !NO_WINFORMS_DEPENDENCY
 using System.ComponentModel;
 using System.Drawing.Design;
 using System.Windows.Forms;
@@ -76,3 +76,4 @@ namespace System.Messaging.Design
                }
        }
 }
+#endif