dc21bcf31c1cea9773e28c1c19748bab0f7657a4
[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.x \
34         $(wildcard Test/resources/*.as?x) \
35         $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.cs) \
36         $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.as?x) \
37         $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.master)
38
39 CLASSLIB_DIR = $(topdir)/class/lib/$(PROFILE)
40
41 STANDALONE_RUNNER_SUPPORT_ASSEMBLY = $(CLASSLIB_DIR)/standalone-runner-support.dll
42 STANDALONE_TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) -r:$(topdir)/class/lib/$(PROFILE)/System.Web.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Web.Extensions.dll -r:$(topdir)/class/lib/$(PROFILE)/nunit.framework.dll
43 STANDALONE_TEST_ASSEMBLY = System.Web.Extensions_standalone_test_$(PROFILE).dll
44 STANDALONE_TEST_MAKEFRAG = $(depsdir)/$(STANDALONE_TEST_ASSEMBLY).makefrag
45
46 STANDALONE_TEST_RUNNER = ../System.Web/Test/tools/standalone-runner.exe
47 RUN_STANDALONE = $(TEST_RUNTIME) $(STANDALONE_TEST_RUNNER)
48 ifdef TESTNAME
49 RUN_STANDALONE += --test=$(TESTNAME)
50 endif
51
52 LIB_REFS = System System.Core System.Drawing System.Data System.Data.Linq System.Xml System.Web System.Web.Services System.Configuration System.EnterpriseServices System.ServiceModel
53 LIB_MCS_FLAGS = \
54         -unsafe \
55         -define:NET_3_5 -nowarn:436             \
56         -define:SYSTEM_WEB_EXTENSIONS   \
57         $(OTHER_LIB_MCS_FLAGS)          \
58         $(RESOURCE_FILES:%=/resource:%)
59
60 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
61 LIB_REFS += System.Web.ApplicationServices
62 endif
63
64 TEST_LIB_REFS = SystemWebTestShim
65 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 $(NUNIT_RESOURCE_FILES:%=/resource:%) -define:SYSTEM_WEB_EXTENSIONS
66
67 EXTRA_DISTFILES = $(RESOURCE_FILES_DIST) $(NUNIT_RESOURCE_FILES) \
68         System.Web.Extensions_standalone_test.dll.sources \
69         Test/standalone-tests/Consts.cs.in \
70         Test/standalone-tests/DataPager_NumericPagerField_Bug615315.cs
71
72 build-standalone-runner-support:
73         $(MAKE) -C ../System.Web/ standalone-runner-support
74         $(MAKE) -C ../System.Web/Test/tools/ STANDALONE_SUPPORT_BUILT=1 standalone-runner.exe
75
76 run-standalone-test: build-standalone-runner-support $(STANDALONE_RUNNER_SUPPORT_MAKEFRAG) $(STANDALONE_TEST_MAKEFRAG) $(STANDALONE_TEST_ASSEMBLY)
77         $(RUN_STANDALONE) $(STANDALONE_TEST_ASSEMBLY)
78
79 $(STANDALONE_TEST_MAKEFRAG): System.Web.Extensions_standalone_test.dll.sources
80         @echo Creating $@ ...
81         @sed 's,^,$(STANDALONE_TEST_ASSEMBLY): ,' $< > $@
82
83 include $(STANDALONE_TEST_MAKEFRAG)
84
85 $(STANDALONE_TEST_ASSEMBLY): $(the_assembly) Test/standalone-tests/Consts.cs
86         $(CSCOMPILE) $(STANDALONE_TEST_MCS_FLAGS) -out:$@ -target:library @System.Web.Extensions_standalone_test.dll.sources
87
88 Test/standalone-tests/Consts.cs: Test/standalone-tests/Consts.cs.in
89 ifeq ($(PLATFORM), win32)
90         @sed 's,@SystemWebExtensionsClassDir@,$(shell cygpath -a -m .),' $< > $@
91 else
92         @sed 's,@SystemWebExtensionsClassDir@,$(shell pwd),' $< > $@
93 endif
94
95 include ../../build/library.make
96