Merge pull request #301 from directhex/master
[mono.git] / mcs / class / System.Web.Extensions / Makefile
1 thisdir = class/System.Web.Extensions
2 SUBDIRS = Test
3 include ../../build/rules.make
4
5 LIBRARY = System.Web.Extensions.dll
6
7 RESOURCE_FILES= \
8         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjax.debug.js        \
9         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjax.js              \
10         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxTimer.debug.js   \
11         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxTimer.js         \
12         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxWebForms.debug.js\
13         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxWebForms.js
14
15 RESOURCE_FILES_DIST= \
16         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjax.debug.js        \
17         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjax.js              \
18         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxTimer.debug.js   \
19         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxTimer.js         \
20         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxWebForms.debug.js\
21         ../MicrosoftAjaxLibrary/System.Web.Extensions/3.5.0.0/3.5.21022.8/MicrosoftAjaxWebForms.js\
22         ../MicrosoftAjaxLibrary/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.debug.js        \
23         ../MicrosoftAjaxLibrary/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js              \
24         ../MicrosoftAjaxLibrary/System.Web.Extensions/1.0.61025.0/MicrosoftAjaxTimer.debug.js   \
25         ../MicrosoftAjaxLibrary/System.Web.Extensions/1.0.61025.0/MicrosoftAjaxTimer.js         \
26         ../MicrosoftAjaxLibrary/System.Web.Extensions/1.0.61025.0/MicrosoftAjaxWebForms.debug.js\
27         ../MicrosoftAjaxLibrary/System.Web.Extensions/1.0.61025.0/MicrosoftAjaxWebForms.js \
28         Resources/MicrosoftAjaxExtension.js \
29         Resources/MicrosoftAjaxWebFormsExtension.js
30
31 NUNIT_RESOURCE_FILES= \
32         Test/resources/Web.mono.config \
33         Test/resources/profile.config.4.5 \
34         Test/resources/profile.config.4.0 \
35         Test/resources/profile.config.2.0 \
36         $(wildcard Test/resources/*.as?x) \
37         $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.cs) \
38         $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.as?x) \
39         $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.master)
40
41 CLASSLIB_DIR = $(topdir)/class/lib/$(PROFILE)
42
43 STANDALONE_RUNNER_SUPPORT_ASSEMBLY = $(CLASSLIB_DIR)/standalone-runner-support.dll
44 STANDALONE_TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -debug:full -r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) -r:System.Web.dll -r:System.Web.Extensions.dll -r:nunit.framework.dll
45 STANDALONE_TEST_ASSEMBLY = System.Web.Extensions_standalone_test_$(PROFILE).dll
46 STANDALONE_TEST_MAKEFRAG = $(depsdir)/$(STANDALONE_TEST_ASSEMBLY).makefrag
47
48 STANDALONE_TEST_RUNNER = ../System.Web/Test/tools/standalone-runner.exe
49 RUN_STANDALONE = $(TEST_RUNTIME) $(STANDALONE_TEST_RUNNER)
50 ifdef TESTNAME
51 RUN_STANDALONE += --test=$(TESTNAME)
52 endif
53
54 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
55 OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
56 endif
57
58 LIB_MCS_FLAGS = \
59         -unsafe \
60         -define:NET_3_5                 \
61         -define:SYSTEM_WEB_EXTENSIONS   \
62         -r:$(corlib)                    \
63         -r:System.dll                   \
64         -r:System.Core.dll              \
65         -r:System.Drawing.dll           \
66         -r:System.Data.dll              \
67         -r:System.Data.Linq.dll         \
68         -r:System.Xml.dll               \
69         -r:System.Web.dll               \
70         -r:System.Web.Services.dll      \
71         -r:System.Configuration.dll     \
72         -r:System.EnterpriseServices.dll \
73         -r:System.ServiceModel.dll      \
74         $(OTHER_LIB_MCS_FLAGS)          \
75         $(RESOURCE_FILES:%=/resource:%)
76
77 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 $(NUNIT_RESOURCE_FILES:%=/resource:%) -r:SystemWebTestShim.dll -define:SYSTEM_WEB_EXTENSIONS
78
79 EXTRA_DISTFILES = $(RESOURCE_FILES_DIST) $(NUNIT_RESOURCE_FILES) \
80         System.Web.Extensions_standalone_test.dll.sources
81
82 run-standalone-test: $(STANDALONE_TEST_MAKEFRAG) $(STANDALONE_RUNNER_SUPPORT_MAKEFRAG) $(STANDALONE_TEST_ASSEMBLY)
83         $(MAKE) -C ../System.Web/ standalone-runner-support
84         $(MAKE) -C ../System.Web/Test/tools/ STANDALONE_SUPPORT_BUILT=1 standalone-runner.exe
85         $(RUN_STANDALONE) $(STANDALONE_TEST_ASSEMBLY)
86
87 $(STANDALONE_TEST_MAKEFRAG): System.Web.Extensions_standalone_test.dll.sources
88         @echo Creating $@ ...
89         @sed 's,^,$(STANDALONE_TEST_ASSEMBLY): ,' $< > $@
90
91 include $(STANDALONE_TEST_MAKEFRAG)
92
93 $(STANDALONE_TEST_ASSEMBLY): $(the_assembly) Test/standalone-tests/Consts.cs
94         $(CSCOMPILE) $(STANDALONE_TEST_MCS_FLAGS) -out:$@ -target:library @System.Web.Extensions_standalone_test.dll.sources
95
96 Test/standalone-tests/Consts.cs: Test/standalone-tests/Consts.cs.in
97         @sed 's,@SystemWebExtensionsClassDir@,$(shell pwd),' $< > $@
98
99 include ../../build/library.make
100