One of csc prerequisites because csc uses -lib as path which is considered after
RuntimeEnvironment.GetRuntimeDirectory which makes -lib useless
monoapi.tree monoapi.zip
convert.exe: $(srcdir)/convert.cs AgilityPack.dll
- $(CSCOMPILE) -r:System.Xml.dll -out:$@ $< -r:AgilityPack.dll
+ $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -out:$@ $< -r:AgilityPack.dll
AgilityPack.dll:
- $(CSCOMPILE) -r:System.dll -r:System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
+ $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
monoapi.zip: monoapi.tree
@test -f $@ || { rm -f $< && $(MAKE) $<; }
PROGRAM_config := $(build_libdir)$(PROGRAM).config
endif
+sn = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/sn.exe
+SN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(sn) -q
+
the_lib = $(the_libdir)$(base_prog)
build_lib = $(build_libdir)$(base_prog)
$(the_lib): $(the_libdir)/.stamp
$(build_lib): $(BUILT_SOURCES) $(EXTRA_SOURCES) $(response) $(build_libdir:=/.stamp)
- $(PROGRAM_COMPILE) -target:exe -out:$@ $(BUILT_SOURCES) $(EXTRA_SOURCES) @$(response)
+ $(PROGRAM_COMPILE) $(MCS_REFERENCES) -target:exe -out:$@ $(BUILT_SOURCES) $(EXTRA_SOURCES) @$(response)
+ifdef PROGRAM_SNK
+ $(Q) $(SN) -R $@ $(PROGRAM_SNK)
+endif
ifdef PROGRAM_USE_INTERMEDIATE_FILE
$(the_lib): $(build_lib)
-include $(makefrag)
+MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(LIB_REFS))
+MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.exe,$(EXE_REFS))
+
all-local: $(makefrag) $(extra_targets)
csproj-local:
# Have to rename to handle differences between assembly/directory names
DEP_LIBS=$(patsubst System.Xml,System.XML,$(LIB_REFS))
-LIB_MCS_FLAGS += $(patsubst %,-r:%.dll,$(LIB_REFS))
+_FILTER_OUT = $(foreach x,$(2),$(if $(findstring $(1),$(x)),,$(x)))
+
+LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS))
+LIB_REFS_ALIAS = $(filter-out $(LIB_REFS_FULL),$(LIB_REFS))
+
+LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(LIB_REFS_FULL))
+LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/class/lib/$(PROFILE)/,$(LIB_REFS_ALIAS)))
sourcefile = $(LIBRARY).sources
profile-check:
@:
-DEFAULT_REFERENCES = -r:mscorlib.dll
-PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
+PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
profile-check:
@:
-DEFAULT_REFERENCES = -r:mscorlib.dll
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:DISABLE_CAS_USE \
-nowarn:1699 \
-nostdlib \
- -lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
profile-check:
@:
-DEFAULT_REFERENCES = -r:mscorlib.dll
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:DISABLE_COM \
-nowarn:1699 \
-nostdlib \
- -lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
profile-check:
@:
-DEFAULT_REFERENCES = -r:mscorlib.dll
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:ANDROID \
-nowarn:1699 \
-nostdlib \
- -lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
profile-check:
@:
-DEFAULT_REFERENCES = -r:mscorlib.dll
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
-nowarn:1699 \
-nostdlib \
- -lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
profile-check:
@:
-DEFAULT_REFERENCES = -r:mscorlib.dll
-PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
+PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 4.5
XBUILD_VERSION = 4.0
profile-check:
@:
-DEFAULT_REFERENCES = -r:mscorlib.dll
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:XAMARIN_MODERN \
-nowarn:1699 \
-nostdlib \
- -lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
include $(topdir)/build/profiles/net_4_x.make
-PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12 -d:MONO -d:DISABLE_CAS_USE -lib:$(topdir)/class/lib/net_4_x
+PARENT_PROFILE = ../net_4_x/
+DEFAULT_REFERENCES = -r:$(topdir)/class/lib/net_4_x/mscorlib.dll
+PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12
+
+RESGEN_EXE = $(topdir)/class/lib/net_4_x/resgen.exe
XBUILD_VERSION = 12.0
# -*- makefile -*-
-include $(topdir)/build/profiles/net_4_x.make
+include $(topdir)/build/profiles/xbuild_12.make
-PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12 -d:XBUILD_14 -d:MONO -d:DISABLE_CAS_USE -lib:$(topdir)/class/lib/net_4_x
+PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_14
XBUILD_VERSION = 14.0
INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe
INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mcs.exe
INTERNAL_ILASM = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/ilasm.exe
-corlib = mscorlib.dll
+INTERNAL_CSC = $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
-INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/resgen.exe
+RESGEN_EXE = $(topdir)/class/lib/$(PROFILE)/resgen.exe
+INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(RESGEN_EXE)
RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
test_nunit_lib = nunit.framework.dll nunit.core.dll nunit.util.dll nunit.mocks.dll
endif
-test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/%)
+TEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(TEST_LIB_REFS))
+
+test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%)
test_nunit_ref = $(test_nunit_dep:%=-r:%)
tests_CLEAN_FILES += TestResult*.xml
test_pdb = $(test_lib:.dll=.pdb)
test_response = $(depsdir)/$(test_lib).response
test_makefrag = $(depsdir)/$(test_lib).makefrag
-test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS)
+test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.pdb) $(test_response) $(test_makefrag)
ifndef HAVE_CS_TESTS
ifdef NUNIT_LITE
$(topdir)/build/deps/nunit-$(PROFILE).stamp:
+ifndef PARENT_PROFILE
cd ${topdir}/tools/nunit-lite && $(MAKE)
+endif
echo "stamp" >$@
else
$(topdir)/build/deps/nunit-$(PROFILE).stamp:
+ifndef PARENT_PROFILE
cd ${topdir}/nunit24 && $(MAKE)
+endif
echo "stamp" >$@
endif
include ../../build/rules.make
LIBRARY = Accessibility.dll
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
LIBRARY = Commons.Xml.Relaxng.dll
LIB_REFS = System System.Xml
-LIB_MCS_FLAGS = /r:$(corlib) \
+LIB_MCS_FLAGS = \
$(foreach r, $(OTHER_RES), /resource:$(r),$(notdir $(r)))
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
EXTRA_DISTFILES = \
LIBRARY_SNK = SharpZipLib.key
LIB_REFS = System System.Xml
-LIB_MCS_FLAGS = -r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
EXTRA_DISTFILES = SharpZipLib.pub $(LIBRARY_SNK)
LIBRARY = Cscompmgd.dll
LIB_REFS = System
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
LIBRARY_NAME = cscompmgd.dll
LIBRARY = CustomMarshalers.dll
LIB_REFS = System
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.ComponentModel.DataAnnotations
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Data.dll
+LIB_REFS = System System.Data
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Data.dll /r:System.Xml.dll
+LIB_REFS = System System.Data System.Xml
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Core System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.IO.Compression.FileSystem.dll
+LIB_REFS = System System.IO.Compression.FileSystem
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Core.dll
+LIB_REFS = System System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Core.dll
+LIB_REFS = System System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Net.Http.WebRequest.dll /r:System.Net.Http.dll
+LIB_REFS = System System.Net.Http.WebRequest System.Net.Http
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Numerics
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Runtime.Serialization
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Runtime.Serialization
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Runtime.Serialization System.Xml
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.ComponentModel.Composition System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Core.dll
+LIB_REFS = System System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Core.dll
+LIB_REFS = System System.Core
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Security.dll
+LIB_REFS = System System.Security
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.ServiceModel
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.ServiceModel
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.ServiceModel
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.ServiceModel System.Xml
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.ServiceModel
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.ServiceProcess.dll
+LIB_REFS = System System.ServiceProcess
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.Core
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Xml
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Xml.Linq System.Xml
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Xml.Linq.dll
+LIB_REFS = System System.Xml.Linq
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Xml.dll
+LIB_REFS = System System.Xml
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Xml.dll
+LIB_REFS = System System.Xml
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System.Xml
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
-LIB_REFS = System
-LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib.dll /r:System.Xml.dll
+LIB_REFS = System System.Xml
+LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
include ../../../build/rules.make
LIBRARY = I18N.CJK.dll
-LOCAL_MCS_FLAGS = /unsafe /resource:big5.table /resource:gb2312.table /resource:jis.table /resource:ks.table /resource:gb18030.table /r:$(corlib) /r:I18N.dll /define:DISABLE_UNSAFE
+LIB_REFS = I18N
+LOCAL_MCS_FLAGS = /unsafe /resource:big5.table /resource:gb2312.table /resource:jis.table /resource:ks.table /resource:gb18030.table /define:DISABLE_UNSAFE
+TEST_LIB_REFS = I18N
EXTRA_DISTFILES = big5.table jis.table gb2312.table ks.table gb18030.table \
README.gb18030 \
include ../../../build/rules.make
LIBRARY = I18N.dll
-LOCAL_MCS_FLAGS = /r:$(corlib) /unsafe /define:DISABLE_UNSAFE
+LOCAL_MCS_FLAGS = /unsafe /define:DISABLE_UNSAFE
NO_TEST = yes
include ../../../build/library.make
include ../../../build/rules.make
LIBRARY = I18N.MidEast.dll
-LOCAL_MCS_FLAGS = /r:$(corlib) /r:I18N.dll /unsafe
-#NO_TEST = yes
+LIB_REFS = I18N
+LOCAL_MCS_FLAGS = /unsafe
+TEST_LIB_REFS = I18N
EXTRA_DISTFILES = $(wildcard *.ucm) \
$(wildcard Test/texts/*.txt)
include ../../../build/rules.make
LIBRARY = I18N.Other.dll
-LOCAL_MCS_FLAGS = /r:$(corlib) /r:I18N.dll /unsafe
+LIB_REFS = I18N
+LOCAL_MCS_FLAGS = /unsafe
NO_TEST = yes
EXTRA_DISTFILES = $(wildcard *.ucm)
include ../../../build/rules.make
LIBRARY = I18N.Rare.dll
-LOCAL_MCS_FLAGS = /r:$(corlib) /r:I18N.dll /unsafe
+LIB_REFS = I18N
+LOCAL_MCS_FLAGS = /unsafe
NO_TEST = yes
EXTRA_DISTFILES = $(wildcard *.ucm)
include ../../../build/rules.make
LIBRARY = I18N.West.dll
-LOCAL_MCS_FLAGS = /r:$(corlib) /r:I18N.dll /unsafe
+LIB_REFS = I18N
+LOCAL_MCS_FLAGS = /unsafe
#NO_TEST = yes
EXTRA_DISTFILES = $(wildcard *.ucm) \
LIBRARY = IBM.Data.DB2.dll
LIB_REFS = System System.Xml System.Data
-LIB_MCS_FLAGS = /unsafe /r:$(corlib) -warn:1
+LIB_MCS_FLAGS = /unsafe -warn:1
NO_TEST = yes
EXTRA_DISTFILES = ibm.pub
LIBRARY_SNK = SharpZipLib.key
LIB_REFS = System System.Xml
-LIB_MCS_FLAGS = /r:$(corlib) -warn:1
+LIB_MCS_FLAGS = -warn:1
NO_TEST = yes
EXTRA_DISTFILES = SharpZipLib.pub $(LIBRARY_SNK)
LIBRARY = Microsoft.Build.Engine.dll
-LIB_REFS = System System.Core System.Xml
-LIB_MCS_FLAGS = \
- /r:$(corlib) \
- /r:System.dll \
- /r:System.Core.dll \
- /r:System.Xml.dll \
- /r:$(XBUILD_FRAMEWORK) \
- /r:$(XBUILD_UTILITIES)
-
-TEST_MCS_FLAGS = \
- /r:$(XBUILD_FRAMEWORK) \
- /r:$(XBUILD_UTILITIES) \
- /r:System.Xml.dll
+LIB_REFS = $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core $(PARENT_PROFILE)System.Xml $(XBUILD_FRAMEWORK) $(XBUILD_UTILITIES)
+LIB_MCS_FLAGS =
+
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = $(XBUILD_FRAMEWORK) $(XBUILD_UTILITIES) $(PARENT_PROFILE)System.Xml
EXTRA_DISTFILES = \
Test/resources/TestTasks.cs \
Test/resources/*.csproj
Test/resources/TestTasks-$(PROFILE).dll: Test/resources/TestTasks.cs
- $(CSCOMPILE) /out:$@ Test/resources/TestTasks.cs /r:$(XBUILD_FRAMEWORK) /r:$(XBUILD_UTILITIES) /target:library
+ $(CSCOMPILE) /out:$@ Test/resources/TestTasks.cs /r:$(topdir)/class/lib/$(PROFILE)/$(XBUILD_FRAMEWORK).dll /r:$(topdir)/class/lib/$(PROFILE)/$(XBUILD_UTILITIES).dll /target:library
clean-test-resources:
- rm -f Test/resources/TestTasks*.dll Test/resources/TestTasks*.dll.mdb
+ rm -f Test/resources/TestTasks*.dll Test/resources/TestTasks*.pdb
test-local: compile-resources
compile-resources: Test/resources/TestTasks-$(PROFILE).dll
cp Test/resources/TestTasks-$(PROFILE).dll Test/resources/TestTasks.dll
- cp Test/resources/TestTasks-$(PROFILE).dll.mdb Test/resources/TestTasks.dll.mdb
+ cp Test/resources/TestTasks-$(PROFILE).pdb Test/resources/TestTasks.pdb
clean-local: clean-test-resources
LIBRARY = Microsoft.Build.Framework.dll
-LIB_REFS = System
-LIB_MCS_FLAGS = \
- /r:$(corlib) \
- /r:System.dll
+LIB_REFS = $(PARENT_PROFILE)System
+LIB_MCS_FLAGS =
EXTRA_DISTFILES = \
Mono.XBuild.Framework/AssemblyLoadInfo.cs
LIBRARY_NAME = Microsoft.Build.Tasks$(NAME_SUFFIX).dll
-LIB_REFS = System System.Core System.Xml System.Windows.Forms
-LIB_MCS_FLAGS = \
- /r:$(corlib) \
- /r:System.dll \
- /r:System.Core.dll \
- /r:System.Xml.dll \
- /r:System.Windows.Forms.dll \
- /r:$(XBUILD_UTILITIES) \
- /r:$(XBUILD_FRAMEWORK) \
- /r:$(XBUILD_ENGINE) \
- /r:$(XBUILD_TASKS)
-
-TEST_MCS_FLAGS = \
- /r:System.Xml.dll \
- /r:$(XBUILD_ENGINE) \
- /r:$(XBUILD_FRAMEWORK) \
- /r:$(XBUILD_TASKS) \
- /r:$(XBUILD_UTILITIES) \
- /r:System.Core.dll
+LIB_REFS = $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core $(PARENT_PROFILE)System.Xml $(PARENT_PROFILE)System.Windows.Forms \
+ $(XBUILD_UTILITIES) $(XBUILD_FRAMEWORK) $(XBUILD_ENGINE) $(XBUILD_TASKS)
+
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = $(PARENT_PROFILE)System.Xml $(XBUILD_ENGINE) $(XBUILD_FRAMEWORK) $(XBUILD_TASKS) $(XBUILD_UTILITIES) $(PARENT_PROFILE)System.Core
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
- TEST_MCS_FLAGS += /r:Microsoft.Build.dll
+TEST_LIB_REFS += Microsoft.Build
endif
EXTRA_DISTFILES = \
Test/test-config-file*
Test/resources/test.dll: Test/resources/test.cs
- $(CSCOMPILE) -target:library Test/resources/test.cs
+ $(CSCOMPILE) -target:library /out:$@ $<
clean-test-resources:
rm -f Test/resources/test.dll
LIBRARY = Microsoft.Build.Utilities.dll
LIBRARY_NAME = Microsoft.Build.Utilities$(NAME_SUFFIX).dll
-LIB_REFS = System System.Core System.Xml
-LIB_MCS_FLAGS = \
- /r:$(corlib) \
- /r:System.dll \
- /r:System.Core.dll \
- /r:System.Xml.dll \
- /r:$(XBUILD_FRAMEWORK)
+LIB_REFS = $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core $(PARENT_PROFILE)System.Xml $(XBUILD_FRAMEWORK)
+LIB_MCS_FLAGS =
TEST_RESX_RESOURCES = Test/Microsoft.Build.Utilities/Strings.resources
-TEST_MCS_FLAGS = /r:$(XBUILD_ENGINE) /r:$(XBUILD_FRAMEWORK) -r:System.dll -r:System.Core.dll $(TEST_RESX_RESOURCES:%=-resource:%)
+TEST_LIB_REFS = $(XBUILD_ENGINE) $(XBUILD_FRAMEWORK) $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core
+TEST_MCS_FLAGS = $(TEST_RESX_RESOURCES:%=-resource:%)
include $(XBUILD_DIR)/xbuild_test.make
include ../../build/library.make
LIBRARY = Microsoft.Build.dll
-LIB_REFS = System System.Core System.Xml Microsoft.Build.Engine Microsoft.Build.Framework
+LIB_REFS = $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core $(PARENT_PROFILE)System.Xml Microsoft.Build.Engine Microsoft.Build.Framework
LIB_MCS_FLAGS = \
- /r:$(corlib) \
- /r:System.dll \
- /r:System.Core.dll \
- /r:System.Xml.dll \
- /r:Microsoft.Build.Engine.dll \
- /r:Microsoft.Build.Framework.dll \
/d:MICROSOFT_BUILD_DLL
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) \
- /r:Microsoft.Build.Utilities.v4.0.dll
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+TEST_LIB_REFS = $(XBUILD_UTILITIES)
EXTRA_DISTFILES = \
Microsoft.Build.Internal/ExpressionParser.jay \
LIBRARY = Microsoft.VisualC.dll
LIB_REFS = System
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
LIBRARY = Mono.C5.dll
LIBRARY_SNK = c5.snk
LIB_REFS = System
-LIB_MCS_FLAGS = /r:$(corlib) -nowarn:169,219,414,1030,3001,3005,3006
+LIB_MCS_FLAGS = -nowarn:169,219,414,1030,3001,3005,3006
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
EXTRA_DISTFILES = \
REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
endif
-TEST_MCS_FLAGS = -r:System.Core.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System.Core
LIB_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS)
include ../../build/library.make
+$(topdir)/mcs/cs-parser.cs:
+ $(MAKE) -C $(topdir)/mcs cs-parser.cs
+
+$(the_lib): $(topdir)/mcs/cs-parser.cs
LIBRARY_PACKAGE = none
LIB_REFS = System Mono.Cecil
-LIB_MCS_FLAGS = /r:$(corlib) /d:CECIL -keyfile:$(LIBRARY_SNK)
+LIB_MCS_FLAGS = /d:CECIL -keyfile:$(LIBRARY_SNK) -publicsign
NO_TEST = yes
NO_INSTALL = yes
LIBRARY_PACKAGE = none
LIB_REFS = System.Core
-LIB_MCS_FLAGS = /r:$(corlib) -keyfile:$(LIBRARY_SNK) -d:NET_3_5
+LIB_MCS_FLAGS = -keyfile:$(LIBRARY_SNK) -d:NET_3_5 /publicsign
NO_TEST = yes
LIB_REFS = System System.Core Mono.Cecil Mono.Cecil.Mdb
LIB_MCS_FLAGS =
-#-r:Mono.Cecil.Pdb.dll
-TEST_MCS_FLAGS = -r:System.Core.dll -debug
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System.Core
include ../../build/library.make
LIBRARY = Mono.Data.Tds.dll
LIB_REFS = System System.Xml Mono.Security
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
-TEST_MCS_FLAGS = /r:System.dll /r:System.Net.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System System.Net
include ../../build/library.make
LIBRARY_SNK = ../mono.snk
LIB_REFS = System Mono.Cecil System.Core
-LIB_MCS_FLAGS = /r:$(corlib) /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS -keyfile:$(LIBRARY_SNK)
+LIB_MCS_FLAGS = /unsafe -D:MONO_DATACONVERTER_STATIC_METHODS -keyfile:$(LIBRARY_SNK) /publicsign
-TEST_MCS_FLAGS = /r:Mono.Cecil.dll /r:System.dll /r:System.Core.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = Mono.Cecil System System.Core
VALID_TEST_PROFILE := $(filter net_4_x, $(PROFILE))
test-local: dtest-app.exe dtest-excfilter.exe
dtest-app.exe: Test/dtest-app.cs
- $(CSCOMPILE) -out:$@ -unsafe -debug -optimize- Test/dtest-app.cs
+ $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs
dtest-excfilter.exe: Test/dtest-excfilter.il
MONO_PATH=$(topdir)/class/lib/$(PROFILE) $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
endif
-CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb dtest-excfilter.exe dtest-excfilter.exe.mdb
+CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb dtest-app.pdb dtest-excfilter.exe dtest-excfilter.exe.mdb dtest-excfilter.pdb
EXTRA_DISTFILES = \
Test/dtest-app.cs \
LIBRARY = Mono.Directory.LDAP.dll
LIB_REFS = System System.Data
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
include ../../build/library.make
LIBRARY = Mono.Dynamic.Interpreter.dll
-LIB_REFS = System System.Core
+LIB_REFS = System
LIB_MCS_FLAGS = \
-d:FEATURE_CORE_DLR,FEATURE_DBNULL,FEATURE_DEFAULT_PARAMETER_VALUE,FEATURE_GET_TYPE_INFO,FEATURE_VARIANCE,FEATURE_SERIALIZATION,CLR45 \
-d:MONO_INTERPRETER \
ifdef MOBILE_STATIC
mono_dynamic_interpreter_deps = $(the_libdir_base)plaincore/System.Core.dll
-LIB_MCS_FLAGS += -lib:$(the_libdir_base)plaincore
+LIB_REFS += plaincore/System.Core
+else
+LIB_REFS += System.Core
endif
include ../../build/library.make
LIBRARY = Mono.Http.dll
LIB_REFS = System System.Xml System.Web ICSharpCode.SharpZipLib Mono.Security
-LIB_MCS_FLAGS = -r:$(corlib) \
- -nowarn:618
+LIB_MCS_FLAGS = -nowarn:618
NO_TEST = yes
LIBRARY = Mono.Management.dll
LIB_REFS = System Mono.Posix
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
LIB_REFS = System System.Messaging Mono.Messaging RabbitMQ.Client
LIB_MCS_FLAGS = -nowarn:618
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 \
- /r:nunit.mocks.dll
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
+TEST_LIB_REFS = nunit.mocks
include ../../build/library.make
LIB_REFS = System System.Configuration
LIB_MCS_FLAGS =
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 /r:System.Messaging.dll /r:nunit.mocks.dll
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
+TEST_LIB_REFS = System.Messaging nunit.mocks
include ../../build/library.make
NO_INSTALL = yes
LIB_REFS = System
-LIB_MCS_FLAGS = /r:$(corlib)
-TEST_MCS_FLAGS = /r:Mono.Posix.dll /r:System.dll /r:System.Core.dll
+LIB_MCS_FLAGS =
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = Mono.Posix System System.Core
mono_sourcelibs_DIR = $(DESTDIR)$(mono_libdir)/mono-source-libs
mono_options_DATA = Mono.Options/Options.cs
include ../../build/library.make
-TEST_MCS_FLAGS = /r:System.Core.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System.Core
LIB_REFS += System.Core System
-LIB_MCS_FLAGS += -d:INSIDE_MONO_PARALLEL -r:$(corlib)
+LIB_MCS_FLAGS += -d:INSIDE_MONO_PARALLEL
# Don't warn about [Obsolete] members, as there are now *lots* of [Obsolete]
# members, generating volumes of output.
LIB_REFS = System
-LIB_MCS_FLAGS = /unsafe /r:$(corlib) /nowarn:0618,612
-TEST_MCS_FLAGS = /unsafe /r:Mono.Posix.dll /r:System.dll /nowarn:0219,0618
+LIB_MCS_FLAGS = /unsafe /nowarn:0618,612
+TEST_MCS_FLAGS = /unsafe /nowarn:0219,0618
+TEST_LIB_REFS = Mono.Posix System
LIBRARY_COMPILE = $(BOOT_COMPILE)
include ../../build/rules.make
LIBRARY = Mono.Security.Providers.NewTls.dll
-LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -r:System.dll \
- -r:NewSystemSource=Mono.Security.Providers.NewSystemSource.dll -r:Mono.Security.dll
+LIB_REFS = System NewSystemSource=Mono.Security.Providers.NewSystemSource Mono.Security
+LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign
include ../../build/library.make
LIBRARY = Mono.Security.dll
LOCAL_MCS_FLAGS = -lib:$(the_libdir_base)bare
-LIB_REFS = System
+LIB_REFS = bare/System
LIB_MCS_FLAGS = -unsafe -nowarn:1030,3009
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:169,219,618,672
LIBRARY = Mono.Simd.dll
LIB_REFS = System.Core
-LIB_MCS_FLAGS = -r:$(corlib) /unsafe
-TEST_MCS_FLAGS = -r:Mono.Simd.dll
+LIB_MCS_FLAGS = /unsafe
NO_TEST = yes
LIBRARY = Mono.XBuild.Tasks.dll
-LIB_REFS = System System.Xml
-LIB_MCS_FLAGS = \
- /r:$(corlib) \
- /r:System.dll \
- /r:System.Xml.dll
+LIB_REFS = $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Xml
+LIB_MCS_FLAGS =
include $(XBUILD_DIR)/xbuild_test.make
endif
LIB_REFS = System System.Xml
-LIB_MCS_FLAGS = $(SCARY_LIB) /unsafe /r:$(corlib)
+LIB_MCS_FLAGS = $(SCARY_LIB) /unsafe
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = \
LIB_REFS = System Mono.Security
LIB_MCS_FLAGS = \
-warn:1 -nowarn:612 \
- -r:$(corlib) \
- -r:System.dll \
- -r:Mono.Security.dll \
$(RESX_RES:%=/res:%)
include ../../build/library.make
LIBRARY = PEAPI.dll
LIB_REFS = System
-LIB_MCS_FLAGS = /r:$(corlib) -nowarn:414,618
+LIB_MCS_FLAGS = -nowarn:414,618
NO_TEST = yes
EXTRA_DISTFILES = README.txt
include ../../../../build/rules.make
PROGRAM = RabbitMQ.Client.Apigen.exe
-
-LOCAL_MCS_FLAGS = /r:System.dll \
- /r:System.Xml.dll \
- /main:RabbitMQ.Client.Apigen.Apigen
+LIB_REFS = System System.Xml
+LOCAL_MCS_FLAGS = /main:RabbitMQ.Client.Apigen.Apigen
include ../../../../build/executable.make
LIBRARY = System.Configuration.Install.dll
LIB_REFS = System System.Xml
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
LIBRARY = System.Configuration.dll
-LOCAL_MCS_FLAGS = -lib:$(secxml_libdir) -lib:$(bare_libdir)
-test_remove = $(LOCAL_MCS_FLAGS)
-LIB_REFS = System System.Xml System.Security
-LIB_MCS_FLAGS = -r:$(corlib) -nowarn:618
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+LOCAL_MCS_FLAGS =
+LIB_REFS = secxml/System bare/System.Xml System.Security
+LIB_MCS_FLAGS = -nowarn:618
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System.Xml System
include ../../build/library.make
LIBRARY = System.Data.OracleClient.dll
LIB_REFS = System System.Xml System.Data System.EnterpriseServices System.Drawing
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) /nowarn:618
LIB_REFS += System.ServiceModel.Activation
endif
-TEST_MCS_FLAGS = -r:System.ServiceModel.dll -r:System.Core.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System.ServiceModel System.Core
include ../../build/library.make
TXT_RESOURCE_STRINGS = ../../../external/referencesource/System.Data/system.data.txt
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:System.Core.dll -r:Mono.Data.Sqlite.dll -nowarn:618,169,612,219,168
+TEST_LIB_REFS = System.Core Mono.Data.Sqlite
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:618,169,612,219,168
TEST_MONO_PATH = .
LIBRARY = System.Design.dll
-LIB_REFS = System System.Xml System.Web System.Windows.Forms System.Drawing Accessibility System.Data System.Configuration
-LIB_MCS_FLAGS = -r:$(corlib)
+LIB_REFS = System System.Xml plainweb/System.Web System.Windows.Forms System.Drawing Accessibility System.Data System.Configuration
+LIB_MCS_FLAGS =
-plainweb_dir = $(the_libdir_base)plainweb
-LOCAL_MCS_FLAGS = -lib:$(plainweb_dir)
-
-TEST_MCS_FLAGS = /r:System.dll -r:System.Drawing.dll -r:System.Windows.Forms
+TEST_LIB_REFS = System System.Drawing System.Windows.Forms
+TEST_MCS_FLAGS =
include ../../build/library.make
LIBRARY = System.DirectoryServices.dll
LIB_REFS = System Novell.Directory.Ldap
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
include ../../build/library.make
LIBRARY = System.Drawing.Design.dll
LIB_REFS = System System.Drawing System.Windows.Forms
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
LIBRARY = System.Drawing.dll
LIB_REFS = System
-LIB_MCS_FLAGS = /unsafe /r:$(corlib) \
+LIB_MCS_FLAGS = /unsafe \
-resource:Assembly/Mono.ico,Mono.ico -resource:Assembly/Information.ico,Information.ico \
-resource:Assembly/Error.ico,Error.ico -resource:Assembly/Warning.ico,Warning.ico \
-resource:Assembly/Question.ico,Question.ico -resource:Assembly/Shield.ico,Shield.ico
+TEST_LIB_REFS = System.Drawing System.Runtime.Serialization.Formatters.Soap System.Xml
+
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -define:TEST -resource:Test/resources/indexed.png,indexed.png \
- -r:System.Drawing.dll -r:System.Runtime.Serialization.Formatters.Soap.dll -r:System.Xml.dll \
-nowarn:0618 -nowarn:219 -nowarn:169
include ../../build/library.make
LIBRARY = System.EnterpriseServices.dll
LIB_REFS = System.Transactions
-LIB_MCS_FLAGS = /nowarn:0168 /nowarn:0162 /r:$(corlib)
+LIB_MCS_FLAGS = /nowarn:0168 /nowarn:0162
NO_TEST = yes
include ../../build/library.make
LIBRARY = System.IO.Compression.FileSystem.dll
LIB_REFS = System System.IO.Compression
LIB_MCS_FLAGS =
-TEST_MCS_FLAGS = /r:System.dll /r:System.Core.dll /r:System.IO.Compression.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System System.Core System.IO.Compression
include ../../build/library.make
LIBRARY = System.IO.Compression.dll
LIB_REFS = System System.Core
LIB_MCS_FLAGS = /unsafe
-TEST_MCS_FLAGS = /r:System.dll /r:System.Core.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System System.Core
include ../../build/library.make
SUBDIRS =
include ../../build/rules.make
-ifndef NO_SYSTEM_WEB_APPSERVICES_DEPENDENCY
-ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-OTHER_LIB_MCS_FLAGS = -r:System.Web.ApplicationServices.dll
-endif
-endif
-
LIBRARY = System.IdentityModel.dll
LIB_REFS = System System.Xml System.Security System.Configuration Mono.Security System.Runtime.Serialization
LIB_MCS_FLAGS = \
LIB_REFS += System.Web
endif
+
+ifndef NO_SYSTEM_WEB_APPSERVICES_DEPENDENCY
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+LIB_REFS += System.Web.ApplicationServices
+endif
+endif
+
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = \
LIBRARY = System.Management.dll
LIB_REFS = System System.Configuration.Install
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
endif
LIB_MCS_FLAGS = /resource:System.Messaging/MessageQueue.resx
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 \
- /r:nunit.mocks.dll
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
+TEST_LIB_REFS = nunit.mocks
EXTRA_DISTFILES = System.Messaging/MessageQueue.resx
LIB_REFS = System.Net.Http System
LIB_MCS_FLAGS =
-TEST_MCS_FLAGS = -r:System.Net.Http.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System.Net.Http
include ../../build/library.make
LIB_REFS = System.Core System
LIB_MCS_FLAGS = $(EXTRA_LIB_MCS_FLAGS)
-TEST_MCS_FLAGS = -r:System.dll -r:System.Core.dll
+TEST_LIB_REFS = System System.Core
+TEST_MCS_FLAGS =
include ../../build/library.make
LIBRARY = System.Reactive.Core.dll
LIB_REFS = System System.Core System.Reactive.Interfaces
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:System.Reactive.Interfaces.dll
+ @more_build_args
ifeq (true, $(GENERATE_RESOURCES))
LIB_MCS_FLAGS += /define:GENERATING_RESOURCES
LIBRARY = System.Reactive.Linq.dll
LIB_REFS = System System.Core System.Reactive.Interfaces System.Reactive.Core
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:System.Reactive.Core.dll
+ @more_build_args
ifeq (true, $(GENERATE_RESOURCES))
LIB_MCS_FLAGS += /define:GENERATING_RESOURCES
LIBRARY = System.Reactive.Observable.Aliases.dll
LIB_REFS = System System.Core System.Reactive.Interfaces System.Reactive.Core System.Reactive.Linq System.Reactive.Providers
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:System.Reactive.Providers.dll
+ @more_build_args
ifeq (true, $(GENERATE_RESOURCES))
LIB_MCS_FLAGS += /define:GENERATING_RESOURCES
LIBRARY = System.Reactive.PlatformServices.dll
LIB_REFS = System System.Core System.Reactive.Interfaces System.Reactive.Core System.Reactive.Linq
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:System.Reactive.Linq.dll
+ @more_build_args
ifeq (true, $(GENERATE_RESOURCES))
LIB_MCS_FLAGS += /define:GENERATING_RESOURCES
LIB_MCS_FLAGS += -d:NO_TASK_DELAY
endif
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:Mono.Reactive.Tests.dll
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+TEST_LIB_REFS = Mono.Reactive.Tests
EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
LIBRARY = System.Reactive.Providers.dll
LIB_REFS = System System.Core System.Reactive.Interfaces System.Reactive.Core System.Reactive.Linq
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:System.Reactive.Linq.dll
+ @more_build_args
ifeq (true, $(GENERATE_RESOURCES))
LIB_MCS_FLAGS += /define:GENERATING_RESOURCES
LIBRARY = System.Reactive.Runtime.Remoting.dll
LIB_REFS = System System.Core System.Reactive.Interfaces System.Reactive.Core System.Reactive.Linq
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:System.Reactive.Linq.dll
+ @more_build_args
ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NO_TASK_DELAY
LIBRARY = System.Reactive.Windows.Forms.dll
LIB_REFS = System System.Core System.Reactive.Interfaces System.Reactive.Core System.Reactive.Linq System.Windows.Forms
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:System.Windows.Forms.dll
+ @more_build_args
ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NO_TASK_DELAY -d:HAS_AWAIT
LIBRARY = System.Reactive.Windows.Threading.dll
LIB_REFS = System System.Core System.Reactive.Interfaces System.Reactive.Core System.Reactive.Linq WindowsBase
LIB_MCS_FLAGS = \
- @more_build_args \
- -r:WindowsBase.dll
+ @more_build_args
ifeq (true, $(GENERATE_RESOURCES))
LIB_MCS_FLAGS += /define:GENERATING_RESOURCES
LIBRARY = System.Runtime.Remoting.dll
LIB_REFS = System System.Xml System.Runtime.Serialization.Formatters.Soap
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
ifndef NO_SYSTEM_WEB_DEPENDENCY
LIB_REFS += System.Web
endif
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:618 /r:System.Runtime.Remoting.dll
+TEST_MCS_FLAGS = -nowarn:618
+TEST_LIB_REFS = System System.Xml
TEST_MONO_PATH = .
LIBRARY = System.Runtime.Serialization.Formatters.Soap.dll
LIB_REFS = System.Xml
-LIB_MCS_FLAGS = /r:$(corlib)
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:System.dll -nowarn:0618 -nowarn:219 -nowarn:169
+LIB_MCS_FLAGS =
+
+TEST_LIB_REFS = System
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
EXTRA_DISTFILES = \
README \
Test/Resources/WSDL/collections.wsdl \
Test/Resources/WSDL/custom-collections.wsdl
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) /r:System.ServiceModel.dll /r:System.Web.Services.dll \
- $(TEST_RESOURCE_FILES:%=/resource:%)
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) $(TEST_RESOURCE_FILES:%=/resource:%)
+TEST_LIB_REFS = System.ServiceModel System.Web.Services
EXTRA_DISTFILES = $(RESOURCE_FILES) $(TEST_RESOURCE_FILES) \
Test/Resources/FrameworkTypes/* \
include ../../build/rules.make
LIBRARY = System.Security.dll
-LIB_REFS = System System.Xml Mono.Security
+LIB_REFS = secxml/System bare/System.Xml Mono.Security
LIB_MCS_FLAGS = -nowarn:618 \
-d:SECURITY_DEP \
- -r:$(corlib) \
-nowarn:414
LOCAL_MCS_FLAGS = -lib:$(secxml_libdir) -lib:$(bare_libdir)
LIBRARY = System.ServiceModel.Activation.dll
-LIB_REFS = System.Core System System.ServiceModel
+LIB_REFS = System.Core System plainservice/System.ServiceModel
LIB_MCS_FLAGS =
-TEST_MCS_FLAGS = -r:System.dll -r:System.Core.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System System.Core
-plainservicemodel_dir = $(the_libdir_base)plainservice
-servicemodel = $(plainservicemodel_dir)/System.ServiceModel.dll
-LOCAL_MCS_FLAGS = -lib:$(plainservicemodel_dir)
+servicemodel = $(the_libdir_base)plainservice/System.ServiceModel.dll
include ../../build/library.make
ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_REFS += System.Configuration
-LIB_MCS_FLAGS += -d:NET_3_5 -d:NET_3_0 \
- -r:System.Configuration.dll
+LIB_MCS_FLAGS += -d:NET_3_5 -d:NET_3_0
endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_REFS += System.Configuration
-LIB_MCS_FLAGS += -d:NET_3_5 -d:NET_3_0 \
- -r:System.Configuration.dll
+LIB_MCS_FLAGS += -d:NET_3_5 -d:NET_3_0
endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
servicemodel_deps = $(activation)
ifneq (plainservice/,$(intermediate))
-LIB_MCS_FLAGS += -define:HAS_ACTIVATION -r:System.ServiceModel.Activation.dll
+LIB_REFS += System.ServiceModel.Activation
+LIB_MCS_FLAGS += -define:HAS_ACTIVATION
endif
endif # NO_SYSTEM_SERVICEMODEL_ACTIVATION_DEPENDENCY
include ../../build/library.make
LIB_REFS += System.Core System
-LIB_MCS_FLAGS += -r:$(corlib) -d:CONCURRENT_COLLECTIONS
+LIB_MCS_FLAGS += -d:CONCURRENT_COLLECTIONS
-TEST_MCS_FLAGS = -r:System.Core.dll -r:System.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System.Core System
EXTRA_DISTFILES=README.md
LIBRARY = System.Transactions.dll
ifdef MOBILE_PROFILE
LIB_REFS = System
-LIB_MCS_FLAGS = /r:$(corlib) /define:MOBILE
+LIB_MCS_FLAGS = /define:MOBILE
else
LIB_REFS = System System.Configuration
-LIB_MCS_FLAGS = /r:$(corlib)
+LIB_MCS_FLAGS =
endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
NUNIT_RESOURCE_FILES = $(TEST_RESOURCE_FILES)
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:System.ComponentModel.DataAnnotations.dll -r:System.Configuration.dll \
- $(NUNIT_RESOURCE_FILES:%=/resource:%) -r:SystemWebTestShim.dll -r:System.Xml.dll
+TEST_LIB_REFS = System.ComponentModel.DataAnnotations System.Configuration SystemWebTestShim System.Xml
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) $(NUNIT_RESOURCE_FILES:%=/resource:%)
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-TEST_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
+TEST_LIB_REFS += System.Web.ApplicationServices
endif
EXTRA_DISTFILES = $(foreach resource,$(TEST_RESOURCE_FILES), $(shell echo $(subst \`,\\\`,$(resource)) | cut -d ',' -f 1))
CLASSLIB_DIR = $(topdir)/class/lib/$(PROFILE)
STANDALONE_RUNNER_SUPPORT_ASSEMBLY = $(CLASSLIB_DIR)/standalone-runner-support.dll
-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
+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
STANDALONE_TEST_ASSEMBLY = System.Web.Extensions_standalone_test_$(PROFILE).dll
STANDALONE_TEST_MAKEFRAG = $(depsdir)/$(STANDALONE_TEST_ASSEMBLY).makefrag
RUN_STANDALONE += --test=$(TESTNAME)
endif
-ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
-endif
-
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
LIB_MCS_FLAGS = \
-unsafe \
-define:NET_3_5 \
-define:SYSTEM_WEB_EXTENSIONS \
- -r:$(corlib) \
$(OTHER_LIB_MCS_FLAGS) \
$(RESOURCE_FILES:%=/resource:%)
-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
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+LIB_REFS += System.Web.ApplicationServices
+endif
+
+TEST_LIB_REFS = SystemWebTestShim
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 $(NUNIT_RESOURCE_FILES:%=/resource:%) -define:SYSTEM_WEB_EXTENSIONS
EXTRA_DISTFILES = $(RESOURCE_FILES_DIST) $(NUNIT_RESOURCE_FILES) \
System.Web.Extensions_standalone_test.dll.sources \
LIB_REFS = System System.Xml
LIB_MCS_FLAGS = \
-nowarn:649 -nowarn:169 \
- -r:$(corlib) \
- -r:System.dll \
- -r:System.Xml.dll \
-resource:System.Web.Services.Description/wsdl-1.1.xsd,wsdl-1.1.xsd \
-resource:System.Web.Services.Description/wsdl-1.1-soap.xsd,wsdl-1.1-soap.xsd \
-resource:System.Web.Services.Description/web-reference.xsd,web-reference.xsd
LIB_MCS_FLAGS = -nowarn:168,169,219,414,612,649 -d:MONO_BROKEN_CONFIGURATION_DLL
ifndef NO_SYSTEM_WEB_DEPENDENCY
-LIB_REFS += System.Web
-plainweb_dir = $(the_libdir_base)plainweb
-plainweb = $(plainweb_dir)/System.Web.dll
-system_web_services_deps = $(plainweb)
-LOCAL_MCS_FLAGS += -lib:$(plainweb_dir)
+plainweb = $(the_libdir_base)plainweb/System.Web.dll
+system_web_deps = $(plainweb)
+LIB_REFS += plainweb/System.Web
endif
ifndef NO_SYSTEM_DESIGN_DEPENDENCY
-LIB_REFS += System.Design
-plaindesign_dir = $(the_libdir_base)plaindesign
-plaindesign = $(plaindesign_dir)/System.Design.dll
+plaindesign = $(the_libdir_base)plaindesign/System.Design.dll
system_design_deps = $(plaindesign)
-LOCAL_MCS_FLAGS += -lib:$(plaindesign_dir)
+LIB_REFS += plaindesign/System.Design
endif
ifndef NO_SYSTEM_DIRECTORY_SERVICES_DEPENDENCY
include ../../build/library.make
-$(the_libdir_base)$(LIBRARY): $(system_web_services_deps) $(system_design_deps)
+$(the_libdir_base)$(LIBRARY): $(system_web_deps) $(system_design_deps)
$(plainweb):
(cd ../System.Web; $(MAKE) $@)
NUNIT_APP_GLOBALRESOURCES_FILES = $(TEST_APP_GLOBALRESOURCES_FILES)
OTHER_RES += $(RESOURCE_FILES_2)
-OTHER_LIB_MCS_FLAGS = -d:INSIDE_SYSTEM_WEB -nowarn:618 -r:System.Configuration.dll -r:Mono.Data.Sqlite.dll
+OTHER_LIB_MCS_FLAGS = -d:INSIDE_SYSTEM_WEB -nowarn:618
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
-OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
OTHER_RES += $(RESOURCE_FILES_4)
endif
TXT_RESOURCE_STRINGS = ../../../external/referencesource/System.Web/System.Web.txt
-LIB_REFS = System System.Core System.Drawing System.Data System.Xml System.EnterpriseServices System.Runtime.Serialization.Formatters.Soap System.ComponentModel.DataAnnotations
+LIB_REFS = System System.Core System.Drawing System.Data System.Xml System.EnterpriseServices System.Runtime.Serialization.Formatters.Soap \
+ System.ComponentModel.DataAnnotations System.Web.ApplicationServices System.Configuration Mono.Data.Sqlite
LIB_MCS_FLAGS = \
-unsafe \
-nowarn:612,618 \
- -r:$(corlib) \
$(OTHER_LIB_MCS_FLAGS) \
$(RESX_RES:%=/resource:%) \
$(OTHER_RES:%=/resource:%)
ifneq (plainweb/,$(intermediate))
-LIB_REFS += System.Web.Services System.Design
+LIB_REFS += System.Web.Services plaindesign/System.Design
LIB_MCS_FLAGS += -define:WEBSERVICES_DEP -lib:$(the_libdir_base)plaindesign
all-local: System.Web/UplevelHelper.cs resources/TranslationResources.resources
endif
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 -r:SystemWebTestShim.dll \
+TEST_LIB_REFS = SystemWebTestShim
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 \
$(NUNIT_RESOURCE_FILES:%=/resource:%) \
$(foreach file,$(NUNIT_APP_CODE_FILES),$(shell echo $(file) | sed -e 's;\(.*\)/\(.*\);/resource:\1/\2,App_Code/\2 ;g')) \
$(foreach file,$(NUNIT_APP_GLOBALRESOURCES_FILES),$(shell echo $(file) | sed -e 's;\(.*\)/\(.*\);/resource:\1/\2,App_GlobalResources/\2 ;g'))
CLASSLIB_DIR = $(topdir)/class/lib/$(PROFILE)
-STANDALONE_RUNNER_SUPPORT_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -d:STANDALONE_TEST -debug:full -r:System.Web.dll -r:nunit.framework.dll
+STANDALONE_RUNNER_SUPPORT_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -d:STANDALONE_TEST -r:$(topdir)/class/lib/$(PROFILE)/System.Web.dll -r:$(topdir)/class/lib/$(PROFILE)/nunit.framework.dll
STANDALONE_RUNNER_SUPPORT_ASSEMBLY = $(CLASSLIB_DIR)/standalone-runner-support.dll
STANDALONE_RUNNER_SUPPORT_MAKEFRAG = $(depsdir)/$(PROFILE)_standalone-runner-support.dll.makefrag
-STANDALONE_TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -debug:full -r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) -r:System.Web.dll -r:nunit.framework.dll
+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)/nunit.framework.dll
STANDALONE_TEST_ASSEMBLY = System.Web_standalone_test_$(PROFILE).dll
STANDALONE_TEST_MAKEFRAG = $(depsdir)/$(STANDALONE_TEST_ASSEMBLY).makefrag
../../../Mono.Options/Mono.Options/Options.cs \
STANDALONE_RUNNER_REFERENCES = \
- -lib:$(CLASSLIB_DIR) \
-r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) \
- -r:System.Web.dll
+ -r:$(CLASSLIB_DIR)/System.Web.dll \
+ -r:$(CLASSLIB_DIR)/System.dll
CACHE_PQ_TEST_GENERATOR_SOURCES = \
CachePQTestGenerator/CacheItemComparer.cs \
../System.Web.Caching/CacheItemPriorityQueueTestSupport.cs
CACHE_PQ_TEST_GENERATOR_REFERENCES = \
- -lib:$(CLASSLIB_DIR) \
-pkg:dotnet
CACHE_PQ_TEST_SEQUENCES = $(wildcard ./CachePQTestGenerator/Sequences/*.seq)
all-local: HtmlWriter.dll standalone-runner.exe cache-pq-test-generator.exe
HtmlWriter.dll: HtmlWriter.cs
- $(MCS) -t:library -r:System.Web.dll $<
+ $(CSCOMPILE) -t:library -r:System.Web.dll $<
standalone-runner.exe: deps $(STANDALONE_RUNNER_SOURCES)
- $(MCS) -debug:full $(STANDALONE_RUNNER_REFERENCES) -out:$@ $(STANDALONE_RUNNER_SOURCES)
+ $(CSCOMPILE) $(STANDALONE_RUNNER_REFERENCES) -out:$@ $(STANDALONE_RUNNER_SOURCES)
cache-pq-test-generator.exe: $(CACHE_PQ_TEST_GENERATOR_SOURCES)
- $(MCS) -debug:full -d:DEBUG $(CACHE_PQ_TEST_GENERATOR_REFERENCES) -out:$@ $(CACHE_PQ_TEST_GENERATOR_SOURCES)
+ $(CSCOMPILE) -d:DEBUG $(CACHE_PQ_TEST_GENERATOR_REFERENCES) -out:$@ $(CACHE_PQ_TEST_GENERATOR_SOURCES)
generate-cache-pq-tests: cache-pq-test-generator.exe
for f in $(patsubst %.seq.gz,%.seq,$(CACHE_PQ_TEST_PACKED_SEQUENCES)); do \
LIB_REFS = System System.Xml System.Drawing Accessibility System.Data Mono.Posix Mono.WebBrowser System.Configuration System.Runtime.Serialization.Formatters.Soap
LIB_MCS_FLAGS = /unsafe \
- /r:$(corlib) \
@System.Windows.Forms.dll.resources \
-nowarn:618,612,809
$(IMAGES_RESOURCES) \
$(TEST_DISTFILES)
-TEST_MCS_FLAGS = /r:System.Data.dll /r:System.Drawing.dll /r:Accessibility.dll -r:System.dll -r:System.Xml.dll -r:System.Runtime.Serialization.Formatters.Soap\
+TEST_LIB_REFS = System.Data System.Drawing Accessibility System System.Xml System.Runtime.Serialization.Formatters.Soap
+TEST_MCS_FLAGS = \
-resource:Test/resources/a.cur,a.cur \
-resource:Test/resources/32x32.ico,32x32.ico \
-nowarn:618,612
DummyAssembly.dll:
- $(CSCOMPILE) /target:library /out:$@ Test/DummyAssembly/AnotherSerializable.cs Test/DummyAssembly/Convertable.cs Test/DummyAssembly/Properties/AssemblyInfo.cs
+ $(CSCOMPILE) /target:library /out:$@ Test/DummyAssembly/AnotherSerializable.cs Test/DummyAssembly/Convertable.cs Test/DummyAssembly/Properties/AssemblyInfo.cs \
+ -r:$(topdir)/class/lib/$(PROFILE)/System.dll
test-local: DummyAssembly.dll
../../../external/referencesource/System.Xml/System.Xml.txt \
../../../external/referencesource/System.Data.SqlXml/System.Xml.Utils.txt
-LIB_REFS = System
-LIB_MCS_FLAGS = -r:$(corlib) -nowarn:219,414,649,1717 -unsafe -d:ASYNC
+LIB_MCS_FLAGS = -nowarn:219,414,649,1717 -unsafe -d:ASYNC
ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:AGCLR -d:NET_2_1_HACK -d:DISABLE_XSLT_COMPILER -d:DISABLE_XSLT_SCRIPT,MONO_HYBRID_SYSTEM_XML -d:DISABLE_CAS_USE
endif
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 -r:System.Data.dll -r:System.Core.dll
-ifndef MOBILE_PROFILE
-FINAL_MCS_FLAGS = -r:System.Configuration.dll -d:CONFIGURATION_DEP
-endif
+TEST_LIB_REFS = System.Data System.Core
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
ifneq (bare/,$(intermediate))
-LIB_MCS_FLAGS += $(FINAL_MCS_FLAGS)
+LIB_REFS += secxml/System
+ifndef MOBILE_PROFILE
+LIB_REFS += System.Configuration
+LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
+endif
+else
+LIB_REFS += $(intermediate)System
endif
-
-LOCAL_MCS_FLAGS += -lib:$(bare_libdir)
nist_dom_files = \
ITest.cs readme.txt util.cs \
Test/System/test-uri-props-manual.txt \
Test/System/test-uri-relative-props.txt
-TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -r:System.Data.dll -r:System.Xml.dll -r:System.Core.dll -nowarn:618,672,219,67,169,612 \
+TEST_LIB_REFS = System.Drawing Mono.Security System.Data System.Xml System.Core System.Configuration
+
+TEST_MCS_FLAGS = -nowarn:618,672,219,67,169,612 \
$(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
endif
LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
-TEST_MCS_FLAGS += -r:System.Configuration.dll
ifndef NO_THREAD_ABORT
REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
LIB_MCS_FLAGS += -d:INSIDE_SYSTEM -d:SECURITY_DEP
else
EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS -d:MONO_X509_ALIAS
-FINAL_MCS_FLAGS = -r:System.Configuration.dll -d:CONFIGURATION_DEP
endif
#
#
ifeq (secxml/, $(intermediate))
LOCAL_MCS_FLAGS = -lib:$(bare_libdir)
-LIB_REFS += System.Xml MonoSecurity=Mono.Security
+LIB_REFS += bare/System.Xml MonoSecurity=Mono.Security
LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(bare_libdir)/System.dll $(EXTERN_ALIAS_FLAGS)
endif
#
ifndef intermediate
LIB_REFS += System.Xml MonoSecurity=Mono.Security
-LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(secxml_libdir)/System.dll $(EXTERN_ALIAS_FLAGS) $(FINAL_MCS_FLAGS)
+LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(secxml_libdir)/System.dll $(EXTERN_ALIAS_FLAGS)
+
+ifndef MOBILE_PROFILE
+LIB_REFS += System.Configuration
+LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
+endif
+
endif
EXTRA_DISTFILES = \
LIBRARY = WebMatrix.Data.dll
LIB_REFS = System System.Data System.Core System.Configuration
-LIB_MCS_FLAGS = -r:$(corlib)
-TEST_MCS_FLAGS = -r:System.dll -r:System.Core.dll -r:System.Data.dll -r:Mono.Data.Sqlite.dll -r:Microsoft.CSharp.dll
+LIB_MCS_FLAGS =
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System System.Core System.Data Mono.Data.Sqlite Microsoft.CSharp
include ../../build/library.make
LIB_REFS = System System.Xml
LIB_MCS_FLAGS = -unsafe
-TEST_MCS_FLAGS = -unsafe -r:WindowsBase.dll -r:System.dll -r:System.Xml.dll -r:System.Core.dll
+TEST_MCS_FLAGS = -unsafe
+TEST_LIB_REFS = WindowsBase System System.Xml System.Core
ifeq (2.0, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NET_3_0
endif
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
LIB_REFS += System.Xaml
-TEST_MCS_FLAGS += -r:System.Xaml.dll
+TEST_LIB_REFS += System.Xaml
endif
include ../../build/library.make
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS)
DEFAULT_REFERENCES =
-ifdef MOBILE_STATIC
-CORLIB_MONO_POSIX_REF =
-else
-CORLIB_MONO_POSIX_REF = -r:Mono.Posix.dll
+TEST_LIB_REFS = System.Core System
+
+ifndef MOBILE_STATIC
+TEST_LIB_REFS += Mono.Posix
endif
# System.IO/DirectoryInfoTest.cs needs Mono.Posix
-TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe $(CORLIB_MONO_POSIX_REF) -r:System.Core.dll -r:System.dll \
+TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe \
-define:MONO_DATACONVERTER_STATIC_METHODS $(TEST_RESX_RESOURCES:%=-resource:%)
EXTRA_DISTFILES = \
$(satellite_assembly1): Test/resources/culture-es-ES.cs Test/resources/Resources.es-ES.resources
@mkdir -p es-ES
- $(CSCOMPILE) -target:library -r:$(corlib) Test/resources/culture-es-ES.cs -resource:Test/resources/Resources.es-ES.resources -out:$@
+ $(CSCOMPILE) -target:library -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll Test/resources/culture-es-ES.cs -resource:Test/resources/Resources.es-ES.resources -out:$@
$(satellite_assembly2): Test/resources/culture-nn-NO.cs Test/resources/Resources.nn-NO.resources
@mkdir -p nn-NO
- $(CSCOMPILE) -target:library -r:$(corlib) Test/resources/culture-nn-NO.cs -resource:Test/resources/Resources.nn-NO.resources -out:$@
+ $(CSCOMPILE) -target:library -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll Test/resources/culture-nn-NO.cs -resource:Test/resources/Resources.nn-NO.resources -out:$@
vtsdir = Test/System.Runtime.Serialization.Formatters.Binary/VersionTolerantSerialization
vtslibs = \
$(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializationTestLib/%/Address.cs
@mkdir -p $(dir $@)
- $(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^
+ $(CSCOMPILE) -target:library -warn:0 -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -out:$@ $^
$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(test_nunit_dep)
- $(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \
+ $(CSCOMPILE) $(test_nunit_ref) -warn:0 \
-r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
+ -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll \
+ -r:$(topdir)/class/lib/$(PROFILE)/System.dll \
$(vtsdir)/BinarySerializationOverVersions.cs -out:$@
@cp $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(vtsdir)/$(PROFILE)_TestLib
/resource:Resources/mono-ecma.xsl,mono-ecma.xsl \
/resource:Resources/toc-html.xsl,toc-html.xsl \
$(IMAGE_RESOURCE_COMMAND) \
- /r:$(corlib)
+ /publicsign
CLEAN_FILES += $(the_lib).config
-TEST_MCS_FLAGS = /r:System.dll /r:System.Core.dll /r:System.Xml.dll
+TEST_MCS_FLAGS =
+TEST_LIB_REFS = System System.Core System.Xml
DOC_SOURCE_DIRS = \
../../docs \
LIBRARY = nunit.util.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LOCAL_MCS_FLAGS= \
- /resource:Transform.resources,NUnit.Util.Transform.resources \
- -r:nunit.core.dll -r:nunit.core.interfaces.dll -r:System.dll \
- -r:System.Xml.dll -r:System.Runtime.Remoting.dll \
- /d:MONO /d:StronglyNamedAssembly -warn:1
+LOCAL_MCS_FLAGS= /resource:Transform.resources,NUnit.Util.Transform.resources /d:MONO /d:StronglyNamedAssembly /publicsign -warn:1
+LIB_REFS = nunit.core nunit.core.interfaces System System.Xml System.Runtime.Remoting
NO_TEST = yo
RESX_RES = Transform.resources
include ../../../build/rules.make
PROGRAM = nunit-console.exe
-LOCAL_MCS_FLAGS = \
- /r:nunit.framework.dll /r:nunit.util.dll /r:nunit.core.dll \
- /r:nunit-console-runner.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = nunit.framework nunit.util nunit.core nunit-console-runner
+
EXTRA_DISTFILES = App.ico \
nunit-console.exe.csproj \
nunit-console.exe_VS2005.csproj \
LIBRARY = nunit-console-runner.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LOCAL_MCS_FLAGS= \
- -r:nunit.core.dll -r:nunit.core.interfaces.dll -r:nunit.util.dll \
- -r:System.dll -r:System.Xml.dll \
- /d:MONO /d:StronglyNamedAssembly
+LOCAL_MCS_FLAGS= /d:MONO /d:StronglyNamedAssembly /publicsign
+LIB_REFS = nunit.core nunit.core.interfaces nunit.util System System.Xml
NO_TEST = yo
EXTRA_DISTFILES = nunit-console.csproj nunit-console_VS2005.csproj
LIBRARY = nunit.core.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LOCAL_MCS_FLAGS= -r:nunit.framework.dll -r:nunit.core.interfaces.dll -r:System.dll /d:StronglyNamedAssembly -warn:1
+LOCAL_MCS_FLAGS = /d:StronglyNamedAssembly -warn:1 /publicsign
+LIB_REFS = nunit.framework nunit.core.interfaces System
NO_TEST = yo
EXTRA_DISTFILES = nunit.core.dll.csproj nunit.core.dll_VS2005.csproj
LIBRARY = nunit.core.interfaces.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LOCAL_MCS_FLAGS= -debug -r:nunit.framework.dll -r:System.dll /d:StronglyNamedAssembly
+LOCAL_MCS_FLAGS= /d:StronglyNamedAssembly /publicsign
+LIB_REFS = nunit.framework System
NO_TEST = yo
EXTRA_DISTFILES = nunit.core.interfaces.dll.csproj nunit.core.interfaces.dll_VS2005.csproj
LIBRARY = nunit.core.extensions.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LIB_MCS_FLAGS = \
- -debug \
- /r:nunit.core.dll /r:nunit.core.interfaces.dll \
- /r:System.Xml.dll /r:System.dll /d:StronglyNamedAssembly
+LIB_MCS_FLAGS = /d:StronglyNamedAssembly /publicsign
+LIB_REFS = nunit.core nunit.core.interfaces System.Xml System
NO_TEST = yo
EXTRA_DISTFILES = \
LIBRARY = nunit.framework.extensions.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LIB_MCS_FLAGS = -debug /r:System.Xml.dll /r:System.dll /d:StronglyNamedAssembly
+LIB_MCS_FLAGS = /d:StronglyNamedAssembly /publicsign
+LIB_REFS = System.Xml System
NO_TEST = yo
EXTRA_DISTFILES = \
LIBRARY_NAME = nunit.framework.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LIB_MCS_FLAGS = /r:System.Xml.dll /r:System.dll /d:StronglyNamedAssembly -warn:1
+LIB_MCS_FLAGS = /d:StronglyNamedAssembly -warn:1 /publicsign
+LIB_REFS = System.Xml System
NO_TEST = yo
EXTRA_DISTFILES = \
LIBRARY = nunit.mocks.dll
LIBRARY_SNK = $(topdir)/nunit24/nunit.snk
-LOCAL_MCS_FLAGS= -debug -r:nunit.framework.dll -r:System.dll /d:StronglyNamedAssembly
+LOCAL_MCS_FLAGS= /d:StronglyNamedAssembly /publicsign
+LIB_REFS = nunit.framework System
NO_TEST = yo
EXTRA_DISTFILES = \
xbuild \
csharp \
corcompare \
+ mono-api-html \
compiler-tester \
mono-xmltool \
mono-shlib-cop \
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:Mono.Security.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = Mono.Security
PROGRAM = al.exe
CLEAN_FILES = al.exe al.exe.mdb
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System
PROGRAM = browsercaps-updater.exe
PROGRAM = cccheck.exe
-LOCAL_MCS_FLAGS = -r:Mono.CodeContracts.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = Mono.CodeContracts System
include ../../build/executable.make
PROGRAM = ccrewrite.exe
-LOCAL_MCS_FLAGS = -r:Mono.CodeContracts.dll -r:System.dll -r:System.Core.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = Mono.CodeContracts System System.Core
include ../../build/executable.make
PROGRAM = cil-stringreplacer.exe
NO_INSTALL = yes
-LOCAL_MCS_FLAGS = -r:System.dll -r:Mono.Cecil.dll
+LIB_REFS = System Mono.Cecil
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System
PROGRAM = mono-cil-strip.exe
PROGRAM = compiler-tester.exe
NO_INSTALL = yes
-LOCAL_MCS_FLAGS = -r:System.dll -r:System.Core.dll -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System System.Core System.Xml
include $(topdir)/build/executable.make
SUBDIRS =
include ../../build/rules.make
-ALL_PROGRAMS = mono-api-info.exe mono-api-html.exe
+LIB_REFS = Mono.Cecil System.Xml System.Core System
+LOCAL_MCS_FLAGS =
-PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+PROGRAM = mono-api-info.exe
-APIINFO_SOURCES = \
- mono-api-info.cs \
- AssemblyResolver.cs \
- Util.cs \
- WellFormedXmlWriter.cs \
- ../../class/Mono.Options/Mono.Options/Options.cs
-
-APIHTML_SOURCES = \
- mono-api-html/ApiChange.cs \
- mono-api-html/ApiDiff.cs \
- mono-api-html/AssemblyComparer.cs \
- mono-api-html/ClassComparer.cs \
- mono-api-html/Comparer.cs \
- mono-api-html/ConstructorComparer.cs \
- mono-api-html/EventComparer.cs \
- mono-api-html/FieldComparer.cs \
- mono-api-html/Helpers.cs \
- mono-api-html/InterfaceComparer.cs \
- mono-api-html/MemberComparer.cs \
- mono-api-html/MethodComparer.cs \
- mono-api-html/NamespaceComparer.cs \
- mono-api-html/PropertyComparer.cs \
- ../../class/Mono.Options/Mono.Options/Options.cs
-
-
-DISTFILES= $(APIINFO_SOURCES) $(APIHTML_SOURCES)
-
-all-local: $(ALL_PROGRAMS)
-
-csproj-local doc-update-local:
-
-install-local: $(ALL_PROGRAMS)
- $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
- for i in $(ALL_PROGRAMS) ; do \
- $(INSTALL_BIN) $$i $(DESTDIR)$(PROGRAM_INSTALL_DIR) ; \
- done
-
-uninstall-local:
- for i in $(ALL_PROGRAMS) ; do \
- rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/`basename $$i` ; \
- done
-
-test-local:
-
-run-test-local run-test-ondotnet-local:
-
-clean-local:
- rm -f *.exe *.pdb
-
-dist-local: dist-default
-
-mono-api-info.exe: $(APIINFO_SOURCES)
- $(CSCOMPILE) -r:Mono.Cecil.dll -r:System.Xml.dll -r:System.Core.dll -r:System.dll -out:$@ $^
-
-mono-api-html.exe: $(APIHTML_SOURCES)
- $(CSCOMPILE) -r:Mono.Cecil.dll -r:System.Xml.dll -r:System.Core.dll -r:System.dll -r:System.Xml.Linq.dll -out:$@ $^
+include ../../build/executable.make
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff
-{
- public class ApiChange
- {
- public string Header;
- public StringBuilder Member = new StringBuilder ();
- public bool Breaking;
- public bool AnyChange;
- public bool HasIgnoredChanges;
-
- public ApiChange Append (string text)
- {
- Member.Append (text);
- return this;
- }
-
- public ApiChange AppendAdded (string text, bool breaking = false)
- {
- Member.Append ("<span class='added ").Append (breaking ? "added-breaking-inline" : string.Empty).Append ("'>");
- Member.Append (text);
- Member.Append ("</span>");
- Breaking |= breaking;
- AnyChange = true;
- return this;
- }
-
- public ApiChange AppendRemoved (string text, bool breaking = true)
- {
- Member.Append ("<span class='removed removed-inline ").Append (breaking ? "removed-breaking-inline" : string.Empty).Append ("'>");
- Member.Append (text);
- Member.Append ("</span>");
- Breaking |= breaking;
- AnyChange = true;
- return this;
- }
-
- public ApiChange AppendModified (string old, string @new, bool breaking = true)
- {
- if (old.Length > 0)
- AppendRemoved (old, breaking);
- if (old.Length > 0 && @new.Length > 0)
- Append (" ");
- if (@new.Length > 0)
- AppendAdded (@new);
- Breaking |= breaking;
- AnyChange = true;
- return this;
- }
- }
-
- public class ApiChanges : Dictionary<string, List<ApiChange>> {
- public void Add (XElement source, XElement target, ApiChange change)
- {
- if (!change.AnyChange) {
- // This is most likely because the rendering doesn't take into account something that's different (solution: fix rendering).
- if (!change.HasIgnoredChanges) {
- var isField = source.Name.LocalName == "field";
- if (isField) {
- Console.WriteLine ("Comparison resulting in no changes (src: {2} dst: {3}) :\n{0}\n{1}\n\n", source.ToString (), target.ToString (), source.GetFieldAttributes (), target.GetFieldAttributes ());
- } else {
- Console.WriteLine ("Comparison resulting in no changes (src: {2} dst: {3}) :\n{0}\n{1}\n\n", source.ToString (), target.ToString (), source.GetMethodAttributes (), target.GetMethodAttributes ());
- }
- }
- return;
- }
-
- List<ApiChange> list;
- if (!TryGetValue (change.Header, out list)) {
- list = new List<ApiChange> ();
- base.Add (change.Header, list);
- }
- list.Add (change);
- }
- }
-}
-
+++ /dev/null
-//
-// The main differences with mono-api-diff are:
-// * this tool directly produce HTML similar to gdiff.sh used for Xamarin.iOS
-// * this tool reports changes in an "evolutionary" way, not in a breaking way,
-// i.e. it does not assume the source assembly is right (but simply older)
-// * the diff .xml output was not easy to convert back into the HTML format
-// that gdiff.sh produced
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-
-using Mono.Options;
-
-namespace Xamarin.ApiDiff {
-
- public static class State {
- static TextWriter output;
-
- public static TextWriter Output {
- get {
- if (output == null)
- output = Console.Out;
- return output;
- }
- set { output = value; }
- }
-
- public static string Assembly { get; set; }
- public static string Namespace { get; set; }
- public static string Type { get; set; }
- public static string BaseType { get; set; }
-
- public static int Indent { get; set; }
-
- static List<Regex> ignoreAdded = new List<Regex> ();
- public static List<Regex> IgnoreAdded {
- get { return ignoreAdded; }
- }
-
- static List<Regex> ignoreNew = new List<Regex> ();
- public static List<Regex> IgnoreNew {
- get { return ignoreNew; }
- }
-
- static List<Regex> ignoreRemoved = new List<Regex> ();
- public static List<Regex> IgnoreRemoved {
- get { return ignoreRemoved; }
- }
-
- public static bool IgnoreParameterNameChanges { get; set; }
- public static bool IgnoreVirtualChanges { get; set; }
- public static bool IgnoreAddedPropertySetters { get; set; }
-
- public static bool Lax;
- public static bool Colorize = true;
- }
-
- class Program {
-
- public static int Main (string[] args)
- {
- var showHelp = false;
- string diff = null;
- List<string> extra = null;
-
- var options = new OptionSet {
- { "h|help", "Show this help", v => showHelp = true },
- { "d|diff=", "HTML diff file out output (omit for stdout)", v => diff = v },
- { "i|ignore=", "Ignore new, added, and removed members whose description matches a given C# regular expression (see below).",
- v => {
- var r = new Regex (v);
- State.IgnoreAdded.Add (r);
- State.IgnoreRemoved.Add (r);
- State.IgnoreNew.Add (r);
- }
- },
- { "a|ignore-added=", "Ignore added members whose description matches a given C# regular expression (see below).",
- v => State.IgnoreAdded.Add (new Regex (v))
- },
- { "r|ignore-removed=", "Ignore removed members whose description matches a given C# regular expression (see below).",
- v => State.IgnoreRemoved.Add (new Regex (v))
- },
- { "n|ignore-new=", "Ignore new namespaces and types whose description matches a given C# regular expression (see below).",
- v => State.IgnoreNew.Add (new Regex (v))
- },
- { "ignore-changes-parameter-names", "Ignore changes to parameter names for identically prototyped methods.",
- v => State.IgnoreParameterNameChanges = v != null
- },
- { "ignore-changes-property-setters", "Ignore adding setters to properties.",
- v => State.IgnoreAddedPropertySetters = v != null
- },
- { "ignore-changes-virtual", "Ignore changing non-`virtual` to `virtual` or adding `override`.",
- v => State.IgnoreVirtualChanges = v != null
- },
- { "c|colorize:", "Colorize HTML output", v => State.Colorize = string.IsNullOrEmpty (v) ? true : bool.Parse (v) },
- { "x|lax", "Ignore duplicate XML entries", v => State.Lax = true }
- };
-
- try {
- extra = options.Parse (args);
- } catch (OptionException e) {
- Console.WriteLine ("Option error: {0}", e.Message);
- showHelp = true;
- }
-
- if (showHelp || extra == null || extra.Count < 2 || extra.Count > 3) {
- Console.WriteLine (@"Usage: mono-api-html [options] <reference.xml> <assembly.xml> [diff.html]");
- Console.WriteLine ();
- Console.WriteLine ("Available options:");
- options.WriteOptionDescriptions (Console.Out);
- Console.WriteLine ();
- Console.WriteLine ("Ignoring Members:");
- Console.WriteLine ();
- Console.WriteLine (" Members that were added can be filtered out of the diff by using the");
- Console.WriteLine (" -i, --ignore-added option. The option takes a C# regular expression");
- Console.WriteLine (" to match against member descriptions. For example, to ignore the");
- Console.WriteLine (" introduction of the interfaces 'INSCopying' and 'INSCoding' on types");
- Console.WriteLine (" pass the following to mono-api-html:");
- Console.WriteLine ();
- Console.WriteLine (" mono-api-html ... -i 'INSCopying$' -i 'INSCoding$'");
- Console.WriteLine ();
- Console.WriteLine (" The regular expressions will match any member description ending with");
- Console.WriteLine (" 'INSCopying' or 'INSCoding'.");
- Console.WriteLine ();
- return 1;
- }
-
- var input = extra [0];
- var output = extra [1];
- if (extra.Count == 3 && diff == null)
- diff = extra [2];
-
- try {
- var ac = new AssemblyComparer (input, output);
- if (diff != null) {
- string diffHtml = String.Empty;
- using (var writer = new StringWriter ()) {
- State.Output = writer;
- ac.Compare ();
- diffHtml = State.Output.ToString ();
- }
- if (diffHtml.Length > 0) {
- using (var file = new StreamWriter (diff)) {
- file.WriteLine ("<div>");
- if (State.Colorize) {
- file.WriteLine ("<style scoped>");
- file.WriteLine ("\t.obsolete { color: gray; }");
- file.WriteLine ("\t.added { color: green; }");
- file.WriteLine ("\t.removed-inline { text-decoration: line-through; }");
- file.WriteLine ("\t.removed-breaking-inline { color: red;}");
- file.WriteLine ("\t.added-breaking-inline { text-decoration: underline; }");
- file.WriteLine ("\t.nonbreaking { color: black; }");
- file.WriteLine ("\t.breaking { color: red; }");
- file.WriteLine ("</style>");
- }
- file.WriteLine (
-@"<script type=""text/javascript"">
- // Only some elements have 'data-is-[non-]breaking' attributes. Here we
- // iterate over all descendents elements, and set 'data-is-[non-]breaking'
- // depending on whether there are any descendents with that attribute.
- function propagateDataAttribute (element)
- {
- if (element.hasAttribute ('data-is-propagated'))
- return;
-
- var i;
- var any_breaking = element.hasAttribute ('data-is-breaking');
- var any_non_breaking = element.hasAttribute ('data-is-non-breaking');
- for (i = 0; i < element.children.length; i++) {
- var el = element.children [i];
- propagateDataAttribute (el);
- any_breaking |= el.hasAttribute ('data-is-breaking');
- any_non_breaking |= el.hasAttribute ('data-is-non-breaking');
- }
-
- if (any_breaking)
- element.setAttribute ('data-is-breaking', null);
- else if (any_non_breaking)
- element.setAttribute ('data-is-non-breaking', null);
- element.setAttribute ('data-is-propagated', null);
- }
-
- function hideNonBreakingChanges ()
- {
- var topNodes = document.querySelectorAll ('[data-is-topmost]');
- var n;
- var i;
- for (n = 0; n < topNodes.length; n++) {
- propagateDataAttribute (topNodes [n]);
- var elements = topNodes [n].querySelectorAll ('[data-is-non-breaking]');
- for (i = 0; i < elements.length; i++) {
- var el = elements [i];
- if (!el.hasAttribute ('data-original-display'))
- el.setAttribute ('data-original-display', el.style.display);
- el.style.display = 'none';
- }
- }
-
- var links = document.getElementsByClassName ('hide-nonbreaking');
- for (i = 0; i < links.length; i++)
- links [i].style.display = 'none';
- links = document.getElementsByClassName ('restore-nonbreaking');
- for (i = 0; i < links.length; i++)
- links [i].style.display = '';
- }
-
- function showNonBreakingChanges ()
- {
- var elements = document.querySelectorAll ('[data-original-display]');
- var i;
- for (i = 0; i < elements.length; i++) {
- var el = elements [i];
- el.style.display = el.getAttribute ('data-original-display');
- }
-
- var links = document.getElementsByClassName ('hide-nonbreaking');
- for (i = 0; i < links.length; i++)
- links [i].style.display = '';
- links = document.getElementsByClassName ('restore-nonbreaking');
- for (i = 0; i < links.length; i++)
- links [i].style.display = 'none';
- }
-</script>");
- if (ac.SourceAssembly == ac.TargetAssembly) {
- file.WriteLine ("<h1>{0}.dll</h1>", ac.SourceAssembly);
- } else {
- file.WriteLine ("<h1>{0}.dll vs {1}.dll</h1>", ac.SourceAssembly, ac.TargetAssembly);
- }
- file.WriteLine ("<a href='javascript: hideNonBreakingChanges (); ' class='hide-nonbreaking'>Hide non-breaking changes</a>");
- file.WriteLine ("<a href='javascript: showNonBreakingChanges (); ' class='restore-nonbreaking' style='display: none;'>Show non-breaking changes</a>");
- file.WriteLine ("<br/>");
- file.WriteLine ("<div data-is-topmost>");
- file.Write (diffHtml);
- file.WriteLine ("</div> <!-- end topmost div -->");
- file.WriteLine ("</div>");
- }
- }
- } else {
- State.Output = Console.Out;
- ac.Compare ();
- }
- }
- catch (Exception e) {
- Console.WriteLine (e);
- return 1;
- }
- return 0;
- }
- }
-}
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class AssemblyComparer : Comparer {
-
- XDocument source;
- XDocument target;
- NamespaceComparer comparer;
-
- public AssemblyComparer (string sourceFile, string targetFile)
- {
- source = XDocument.Load (sourceFile);
- target = XDocument.Load (targetFile);
- comparer = new NamespaceComparer ();
- }
-
- public string SourceAssembly { get; private set; }
- public string TargetAssembly { get; private set; }
-
- public void Compare ()
- {
- Compare (source.Element ("assemblies").Elements ("assembly"),
- target.Element ("assemblies").Elements ("assembly"));
- }
-
- public override void SetContext (XElement current)
- {
- State.Assembly = current.GetAttribute ("name");
- }
-
- public override void Added (XElement target, bool wasParentAdded)
- {
- // one assembly per xml file
- }
-
- public override void Modified (XElement source, XElement target, ApiChanges diff)
- {
- SourceAssembly = source.GetAttribute ("name");
- TargetAssembly = target.GetAttribute ("name");
- // TODO: version
- // ? custom attributes ?
- comparer.Compare (source, target);
- }
-
- public override void Removed (XElement source)
- {
- // one assembly per xml file
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class ClassComparer : Comparer {
-
- InterfaceComparer icomparer;
- ConstructorComparer ccomparer;
- FieldComparer fcomparer;
- PropertyComparer pcomparer;
- EventComparer ecomparer;
- MethodComparer mcomparer;
- ClassComparer kcomparer;
-
- public ClassComparer ()
- {
- icomparer = new InterfaceComparer ();
- ccomparer = new ConstructorComparer ();
- fcomparer = new FieldComparer ();
- pcomparer = new PropertyComparer ();
- ecomparer = new EventComparer ();
- mcomparer = new MethodComparer ();
- }
-
- public override void SetContext (XElement current)
- {
- State.Type = current.GetAttribute ("name");
- State.BaseType = current.GetAttribute ("base");
- }
-
- public void Compare (XElement source, XElement target)
- {
- var s = source.Element ("classes");
- var t = target.Element ("classes");
- if (XNode.DeepEquals (s, t))
- return;
- Compare (s.Elements ("class"), t.Elements ("class"));
- }
-
- public override void Added (XElement target, bool wasParentAdded)
- {
- string name = target.Attribute ("name").Value;
- if (State.IgnoreNew.Any (re => re.IsMatch (name)))
- return;
- Output.WriteLine ("<div> <!-- start type {0} -->", name);
- Output.WriteLine ("<h3>New Type {0}.{1}</h3>", State.Namespace, name);
- Output.WriteLine ("<pre class='added' data-is-non-breaking>");
- State.Indent = 0;
- AddedInner (target);
- Output.WriteLine ("</pre>");
- Output.WriteLine ("</div> <!-- end type {0} -->", name);
- }
-
- public void AddedInner (XElement target)
- {
- SetContext (target);
- if (target.IsTrue ("serializable"))
- Indent ().WriteLine ("[Serializable]");
-
- var type = target.Attribute ("type").Value;
-
- if (type == "enum") {
- // check if [Flags] is present
- var cattrs = target.Element ("attributes");
- if (cattrs != null) {
- foreach (var ca in cattrs.Elements ("attribute")) {
- if (ca.GetAttribute ("name") == "System.FlagsAttribute") {
- Indent ().WriteLine ("[Flags]");
- break;
- }
- }
- }
- }
-
- Indent ().Write ("public");
-
- if (type != "enum") {
- bool seal = target.IsTrue ("sealed");
- bool abst = target.IsTrue ("abstract");
- if (seal && abst)
- Output.Write (" static");
- else if (seal && type != "struct")
- Output.Write (" sealed");
- else if (abst && type != "interface")
- Output.Write (" abstract");
- }
-
- Output.Write (' ');
- Output.Write (type);
- Output.Write (' ');
- Output.Write (target.GetAttribute ("name"));
-
- var baseclass = target.GetAttribute ("base");
- if ((type != "enum") && (type != "struct")) {
- if (baseclass != null) {
- if (baseclass == "System.Object") {
- // while true we do not need to be reminded every time...
- baseclass = null;
- } else {
- Output.Write (" : ");
- Output.Write (baseclass);
- }
- }
- }
-
- // interfaces on enums are "standard" not user provided - so we do not want to show them
- if (type != "enum") {
- var i = target.Element ("interfaces");
- if (i != null) {
- var interfaces = new List<string> ();
- foreach (var iface in i.Elements ("interface"))
- interfaces.Add (icomparer.GetDescription (iface));
- Output.Write ((baseclass == null) ? " : " : ", ");
- Output.Write (String.Join (", ", interfaces));
- }
- }
-
- Output.WriteLine (" {");
-
- var t = target.Element ("constructors");
- if (t != null) {
- Indent ().WriteLine ("\t// constructors");
- foreach (var ctor in t.Elements ("constructor"))
- ccomparer.Added (ctor, true);
- }
-
- t = target.Element ("fields");
- if (t != null) {
- if (type != "enum")
- Indent ().WriteLine ("\t// fields");
- else
- SetContext (target);
- foreach (var field in t.Elements ("field"))
- fcomparer.Added (field, true);
- }
-
- t = target.Element ("properties");
- if (t != null) {
- Indent ().WriteLine ("\t// properties");
- foreach (var property in t.Elements ("property"))
- pcomparer.Added (property, true);
- }
-
- t = target.Element ("events");
- if (t != null) {
- Indent ().WriteLine ("\t// events");
- foreach (var evnt in t.Elements ("event"))
- ecomparer.Added (evnt, true);
- }
-
- t = target.Element ("methods");
- if (t != null) {
- Indent ().WriteLine ("\t// methods");
- foreach (var method in t.Elements ("method"))
- mcomparer.Added (method, true);
- }
-
- t = target.Element ("classes");
- if (t != null) {
- Output.WriteLine ();
- Indent ().WriteLine ("\t// inner types");
- kcomparer = new NestedClassComparer ();
- State.Indent++;
- foreach (var inner in t.Elements ("class"))
- kcomparer.AddedInner (inner);
- State.Indent--;
- }
- Indent ().WriteLine ("}");
- }
-
- public override void Modified (XElement source, XElement target, ApiChanges diff)
- {
- // hack - there could be changes that we're not monitoring (e.g. attributes properties)
- var output = Output;
- State.Output = new StringWriter ();
-
- var sb = source.GetAttribute ("base");
- var tb = target.GetAttribute ("base");
- if (sb != tb) {
- Output.Write ("Modified base type: ");
- Output.WriteLine (new ApiChange ().AppendModified (sb, tb, true).Member.ToString ());
- }
-
- ccomparer.Compare (source, target);
- icomparer.Compare (source, target);
- fcomparer.Compare (source, target);
- pcomparer.Compare (source, target);
- ecomparer.Compare (source, target);
- mcomparer.Compare (source, target);
-
- var si = source.Element ("classes");
- if (si != null) {
- var ti = target.Element ("classes");
- kcomparer = new NestedClassComparer ();
- kcomparer.Compare (si.Elements ("class"), ti == null ? null : ti.Elements ("class"));
- }
-
- var s = (Output as StringWriter).ToString ();
- State.Output = output;
- if (s.Length > 0) {
- var tn = GetTypeName (target);
- Output.WriteLine ("<!-- start type {0} --> <div>", tn);
- Output.WriteLine ("<h3>Type Changed: {0}.{1}</h3>", State.Namespace, GetTypeName (target));
- Output.WriteLine (s);
- Output.WriteLine ("</div> <!-- end type {0} -->", tn);
- }
- }
-
- public override void Removed (XElement source)
- {
- Output.Write ("<h3>Removed Type <span class='breaking' data-is-breaking>{0}.{1}</span></h3>", State.Namespace, GetTypeName (source));
- }
-
- public virtual string GetTypeName (XElement type)
- {
- return type.GetAttribute ("name");
- }
- }
-
- public class NestedClassComparer : ClassComparer {
-
- public override void SetContext (XElement current)
- {
- }
-
- public override string GetTypeName (XElement type)
- {
- return State.Type + "." + base.GetTypeName (type);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public abstract class Comparer {
-
- protected List<XElement> removed = new List<XElement> ();
- protected ApiChanges modified = new ApiChanges ();
-
- public TextWriter Output {
- get { return State.Output; }
- }
-
- protected TextWriter Indent ()
- {
- for (int i = 0; i < State.Indent; i++)
- State.Output.Write ("\t");
- return State.Output;
- }
-
- public abstract void Added (XElement target, bool wasParentAdded);
- public abstract void Modified (XElement source, XElement target, ApiChanges changes);
- public abstract void Removed (XElement source);
-
- public virtual bool Equals (XElement source, XElement target, ApiChanges changes)
- {
- return XNode.DeepEquals (source, target);
- }
-
- public abstract void SetContext (XElement current);
-
- public virtual void Compare (IEnumerable<XElement> source, IEnumerable<XElement> target)
- {
- removed.Clear ();
- modified.Clear ();
-
- foreach (var s in source) {
- SetContext (s);
- string sn = s.GetAttribute ("name");
- var t = target == null ? null : target.SingleOrDefault (x => x.GetAttribute ("name") == sn);
- if (t == null) {
- // not in target, it was removed
- removed.Add (s);
- } else {
- t.Remove ();
- // possibly modified
- if (Equals (s, t, modified))
- continue;
-
- // still in target so will be part of Added
- Modified (s, t, modified);
- }
- }
- // delayed, that way we show "Modified", "Added" and then "Removed"
- foreach (var item in removed) {
- SetContext (item);
- Removed (item);
- }
- // remaining == newly added in target
- if (target != null) {
- foreach (var item in target) {
- SetContext (item);
- Added (item, false);
- }
- }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- // MethodComparer inherits from this one
- public class ConstructorComparer : MemberComparer {
-
- public override string GroupName {
- get { return "constructors"; }
- }
-
- public override string ElementName {
- get { return "constructor"; }
- }
-
- public override bool Find (XElement e)
- {
- return (e.Attribute ("name").Value == Source.Attribute ("name").Value);
- }
-
- void RenderReturnType (XElement source, XElement target, ApiChange change)
- {
- var srcType = source.GetTypeName ("returntype");
- var tgtType = target.GetTypeName ("returntype");
-
- if (srcType != tgtType) {
- change.AppendModified (srcType, tgtType, true);
- change.Append (" ");
- } else if (srcType != null) {
- // ctor don't have a return type
- change.Append (srcType);
- change.Append (" ");
- }
- }
-
- public override bool Equals (XElement source, XElement target, ApiChanges changes)
- {
- if (base.Equals (source, target, changes))
- return true;
-
- var change = new ApiChange ();
- change.Header = "Modified " + GroupName;
- RenderMethodAttributes (source, target, change);
- RenderReturnType (source, target, change);
- RenderName (source, target, change);
- RenderGenericParameters (source, target, change);
- RenderParameters (source, target, change);
-
- changes.Add (source, target, change);
-
- return false;
- }
-
- public override string GetDescription (XElement e)
- {
- var sb = new StringBuilder ();
-
- var attribs = e.Attribute ("attrib");
- if (attribs != null) {
- var attr = (MethodAttributes) Int32.Parse (attribs.Value);
- if ((attr & MethodAttributes.Public) != MethodAttributes.Public) {
- sb.Append ("protected ");
- } else {
- sb.Append ("public ");
- }
-
- if ((attr & MethodAttributes.Static) != 0) {
- sb.Append ("static ");
- } else if ((attr & MethodAttributes.Virtual) != 0) {
- if ((attr & MethodAttributes.VtableLayoutMask) == 0)
- sb.Append ("override ");
- else
- sb.Append ("virtual ");
- }
- }
-
- string name = e.GetAttribute ("name");
-
- var r = e.GetTypeName ("returntype");
- if (r != null) {
- // ctor dont' have a return type
- sb.Append (r).Append (' ');
- } else {
- // show the constructor as it would be defined in C#
- name = name.Replace (".ctor", State.Type);
- }
-
- // the XML file `name` does not contain parameter names, so we must process them ourselves
- // which gives us the opportunity to simplify type names
- sb.Append (name.Substring (0, name.IndexOf ('(')));
-
- var genericp = e.Element ("generic-parameters");
- if (genericp != null) {
- var list = new List<string> ();
- foreach (var p in genericp.Elements ("generic-parameter")) {
- list.Add (p.GetTypeName ("name"));
- }
- sb.Append ("<").Append (String.Join (", ", list)).Append (">");
- }
-
- sb.Append (" (");
- var parameters = e.Element ("parameters");
- if (parameters != null) {
- var list = new List<string> ();
- foreach (var p in parameters.Elements ("parameter")) {
- var pTypeName = p.GetTypeName ("type");
- list.Add (State.IgnoreParameterNameChanges
- ? pTypeName
- : pTypeName + " " + p.GetAttribute ("name"));
- }
- sb.Append (String.Join (", ", list));
- }
- sb.Append (");");
-
- return sb.ToString ();
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class EventComparer : MemberComparer {
-
- public override string GroupName {
- get { return "events"; }
- }
-
- public override string ElementName {
- get { return "event"; }
- }
-
- public override bool Equals (XElement source, XElement target, ApiChanges changes)
- {
- if (base.Equals (source, target, changes))
- return true;
-
- var change = new ApiChange ();
- change.Header = "Modified " + GroupName;
- change.Append ("public event ");
-
- var srcEventType = source.GetTypeName ("eventtype");
- var tgtEventType = target.GetTypeName ("eventtype");
-
- if (srcEventType != tgtEventType) {
- change.AppendModified (srcEventType, tgtEventType, true);
- } else {
- change.Append (srcEventType);
- }
- change.Append (" ");
- change.Append (source.GetAttribute ("name")).Append (";");
- return false;
- }
-
- public override string GetDescription (XElement e)
- {
- StringBuilder sb = new StringBuilder ();
- // TODO: attribs
- sb.Append ("public event ");
- sb.Append (e.GetTypeName ("eventtype")).Append (' ');
- sb.Append (e.GetAttribute ("name")).Append (';');
- return sb.ToString ();
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class FieldComparer : MemberComparer {
-
- public override string GroupName {
- get { return "fields"; }
- }
-
- public override string ElementName {
- get { return "field"; }
- }
-
- void RenderFieldAttributes (FieldAttributes source, FieldAttributes target, ApiChange change)
- {
- var srcNotSerialized = (source & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
- var tgtNotSerialized = (target & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
- if (srcNotSerialized != tgtNotSerialized) {
- // this is not a breaking change, so only render it if it changed.
- if (srcNotSerialized) {
- change.AppendRemoved ("[NonSerialized]\n");
- } else {
- change.AppendAdded ("[NonSerialized]\n");
- }
- }
-
- // the visibility values are the same for MethodAttributes and FieldAttributes, so just use the same method.
- RenderVisibility ((MethodAttributes) source, (MethodAttributes) target, change);
- // same for the static flag
- RenderStatic ((MethodAttributes) source, (MethodAttributes) target, change);
-
- var srcLiteral = (source & FieldAttributes.Literal) != 0;
- var tgtLiteral = (target & FieldAttributes.Literal) != 0;
-
- if (srcLiteral) {
- if (tgtLiteral) {
- change.Append ("const ");
- } else {
- change.AppendRemoved ("const", true).Append (" ");
- }
- } else if (tgtLiteral) {
- change.AppendAdded ("const", true).Append (" ");
- }
-
- var srcInitOnly = (source & FieldAttributes.InitOnly) != 0;
- var tgtInitOnly = (target & FieldAttributes.InitOnly) != 0;
- if (srcInitOnly) {
- if (tgtInitOnly) {
- change.Append ("readonly ");
- } else {
- change.AppendRemoved ("readonly", false).Append (" ");
- }
- } else if (tgtInitOnly) {
- change.AppendAdded ("readonly", true).Append (" ");
- }
- }
-
- public override bool Equals (XElement source, XElement target, ApiChanges changes)
- {
- if (base.Equals (source, target, changes))
- return true;
-
- var name = source.GetAttribute ("name");
- var srcValue = source.GetAttribute ("value");
- var tgtValue = target.GetAttribute ("value");
- var change = new ApiChange ();
- change.Header = "Modified " + GroupName;
-
- if (State.BaseType == "System.Enum") {
- change.Append (name).Append (" = ");
- if (srcValue != tgtValue) {
- change.AppendModified (srcValue, tgtValue, true);
- } else {
- change.Append (srcValue);
- }
- } else {
- RenderFieldAttributes (source.GetFieldAttributes (), target.GetFieldAttributes (), change);
-
- var srcType = source.GetTypeName ("fieldtype");
- var tgtType = target.GetTypeName ("fieldtype");
-
- if (srcType != tgtType) {
- change.AppendModified (srcType, tgtType, true);
- } else {
- change.Append (srcType);
- }
- change.Append (" ");
- change.Append (name);
-
- if (srcType == "string" && srcValue != null)
- srcValue = "\"" + srcValue + "\"";
-
- if (tgtType == "string" && tgtValue != null)
- tgtValue = "\"" + tgtValue + "\"";
-
- if (srcValue != tgtValue) {
- change.Append (" = ");
- if (srcValue == null)
- srcValue = "null";
- if (tgtValue == null)
- tgtValue = "null";
- change.AppendModified (srcValue, tgtValue, true);
- } else if (srcValue != null) {
- change.Append (" = ");
- change.Append (srcValue);
- }
- change.Append (";");
- }
-
- changes.Add (source, target, change);
-
- return false;
- }
-
- public override string GetDescription (XElement e)
- {
- var sb = new StringBuilder ();
-
- string name = e.GetAttribute ("name");
- string value = e.GetAttribute ("value");
-
- if (State.BaseType == "System.Enum") {
- sb.Append (name).Append (" = ").Append (value).Append (',');
- } else {
- var attribs = e.Attribute ("attrib");
- if (attribs != null) {
- var attr = (FieldAttributes)Int32.Parse (attribs.Value);
- if ((attr & FieldAttributes.Public) != FieldAttributes.Public) {
- sb.Append ("protected ");
- } else {
- sb.Append ("public ");
- }
-
- if ((attr & FieldAttributes.Static) != 0)
- sb.Append ("static ");
-
- if ((attr & FieldAttributes.Literal) != 0)
- sb.Append ("const ");
- }
-
- string ftype = e.GetTypeName ("fieldtype");
- sb.Append (ftype).Append (' ');
- sb.Append (name);
- if (ftype == "string" && e.Attribute ("value") != null) {
- if (value == null)
- sb.Append (" = null");
- else
- sb.Append (" = \"").Append (value).Append ('"');
- }
- sb.Append (';');
- }
-
- return sb.ToString ();
- }
-
- public override void BeforeAdding (IEnumerable<XElement> list)
- {
- first = true;
- if (State.BaseType == "System.Enum") {
- Output.WriteLine ("<div>");
- Output.WriteLine ("<p>Added value{0}:</p>", list.Count () > 1 ? "s" : String.Empty);
- Output.WriteLine ("<pre class='added' data-is-non-breaking>");
- } else {
- base.BeforeAdding (list);
- }
- }
-
- public override void BeforeRemoving (IEnumerable<XElement> list)
- {
- first = true;
- if (State.BaseType == "System.Enum") {
- Output.WriteLine ("<p>Removed value{0}:</p>", list.Count () > 1 ? "s" : String.Empty);
- Output.WriteLine ("<pre class='removed' data-is-breaking>");
- } else {
- base.BeforeRemoving (list);
- }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public static class Helper {
- public static bool IsTrue (this XElement self, string name)
- {
- return (self.GetAttribute (name) == "true");
- }
-
- public static string GetAttribute (this XElement self, string name)
- {
- var n = self.Attribute (name);
- if (n == null)
- return null;
- return n.Value;
- }
-
- // null == no obsolete, String.Empty == no description
- public static string GetObsoleteMessage (this XElement self)
- {
- var cattrs = self.Element ("attributes");
- if (cattrs == null)
- return null;
-
- foreach (var ca in cattrs.Elements ("attribute")) {
- if (ca.GetAttribute ("name") != "System.ObsoleteAttribute")
- continue;
- var props = ca.Element ("properties");
- if (props == null)
- return String.Empty; // no description
- foreach (var p in props.Elements ("property")) {
- if (p.GetAttribute ("name") != "Message")
- continue;
- return p.GetAttribute ("value");
- }
- }
- return null;
- }
-
- public static IEnumerable<XElement> Descendants (this XElement self, params string[] names)
- {
- XElement el = self;
- if (el == null)
- return null;
-
- for (int i = 0; i < names.Length - 1; i++) {
- el = el.Element (names [i]);
- if (el == null)
- return null;
- }
- return el.Elements (names [names.Length - 1]);
- }
-
- public static List<XElement> DescendantList (this XElement self, params string[] names)
- {
- var descendants = self.Descendants (names);
- if (descendants == null)
- return null;
- return descendants.ToList ();
- }
-
- // make it beautiful (.NET -> C#)
- public static string GetTypeName (this XElement self, string name)
- {
- string type = self.GetAttribute (name);
- if (type == null)
- return null;
-
- StringBuilder sb = null;
- bool is_nullable = false;
- if (type.StartsWith ("System.Nullable`1[", StringComparison.Ordinal)) {
- is_nullable = true;
- sb = new StringBuilder (type, 18, type.Length - 19, 1024);
- } else {
- sb = new StringBuilder (type);
- }
-
- bool is_ref = (sb [sb.Length - 1] == '&');
- if (is_ref)
- sb.Remove (sb.Length - 1, 1);
-
- int array = 0;
- while ((sb [sb.Length - 1] == ']') && (sb [sb.Length - 2] == '[')) {
- sb.Remove (sb.Length - 2, 2);
- array++;
- }
-
- bool is_pointer = (sb [sb.Length - 1] == '*');
- if (is_pointer)
- sb.Remove (sb.Length - 1, 1);
-
- type = GetTypeName (sb.Replace ('+', '.').ToString ());
- sb.Length = 0;
- if (is_ref)
- sb.Append (self.GetAttribute ("direction")).Append (' ');
-
- sb.Append (type);
-
- while (array-- > 0)
- sb.Append ("[]");
- if (is_nullable)
- sb.Append ('?');
- if (is_pointer)
- sb.Append ('*');
- return sb.ToString ();
- }
-
- static string GetTypeName (string type)
- {
- int pos = type.IndexOf ('`');
- if (pos >= 0) {
- int end = type.LastIndexOf (']');
- string subtype = type.Substring (pos + 3, end - pos - 3);
- return type.Substring (0, pos) + "<" + GetTypeName (subtype) + ">";
- }
-
- switch (type) {
- case "System.String":
- return "string";
- case "System.Int32":
- return "int";
- case "System.UInt32":
- return "uint";
- case "System.Int64":
- return "long";
- case "System.UInt64":
- return "ulong";
- case "System.Void":
- return "void";
- case "System.Boolean":
- return "bool";
- case "System.Object":
- return "object";
- case "System.Single":
- return "float";
- case "System.Double":
- return "double";
- case "System.Byte":
- return "byte";
- case "System.SByte":
- return "sbyte";
- case "System.Int16":
- return "short";
- case "System.UInt16":
- return "ushort";
- case "System.Char":
- return "char";
- case "System.nint":
- return "nint";
- case "System.nuint":
- return "uint";
- case "System.nfloat":
- return "nfloat";
- case "System.IntPtr":
- return "IntPtr";
- default:
- if (type.StartsWith (State.Namespace, StringComparison.Ordinal))
- type = type.Substring (State.Namespace.Length + 1);
- return type;
- }
- }
-
- public static MethodAttributes GetMethodAttributes (this XElement element)
- {
- var srcAttribs = element.Attribute ("attrib");
- return (MethodAttributes) (srcAttribs != null ? Int32.Parse (srcAttribs.Value) : 0);
- }
-
- public static FieldAttributes GetFieldAttributes (this XElement element)
- {
- var srcAttribs = element.Attribute ("attrib");
- return (FieldAttributes) (srcAttribs != null ? Int32.Parse (srcAttribs.Value) : 0);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class InterfaceComparer : MemberComparer {
-
- public override string GroupName {
- get { return "interfaces"; }
- }
-
- public override string ElementName {
- get { return "interface"; }
- }
-
- public override string GetDescription (XElement e)
- {
- return e.GetTypeName ("name");
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public abstract class MemberComparer : Comparer {
-
- // true if this is the first element being added or removed in the group being rendered
- protected bool first;
-
- public abstract string GroupName { get; }
- public abstract string ElementName { get; }
-
- protected virtual bool IsBreakingRemoval (XElement e)
- {
- return true;
- }
-
- public void Compare (XElement source, XElement target)
- {
- var s = source.Element (GroupName);
- var t = target.Element (GroupName);
- if (XNode.DeepEquals (s, t))
- return;
-
- if (s == null) {
- Add (t.Elements (ElementName));
- } else if (t == null) {
- Remove (s.Elements (ElementName));
- } else {
- Compare (s.Elements (ElementName), t.Elements (ElementName));
- }
- }
-
- public override void SetContext (XElement current)
- {
- }
-
- string GetContainingType (XElement el)
- {
- return el.Ancestors ("class").First ().Attribute ("type").Value;
- }
-
- bool IsInInterface (XElement el)
- {
- return GetContainingType (el) == "interface";
- }
-
- public XElement Source { get; set; }
-
- public virtual bool Find (XElement e)
- {
- return e.GetAttribute ("name") == Source.GetAttribute ("name");
- }
-
- XElement Find (IEnumerable<XElement> target)
- {
- return State.Lax ? target.FirstOrDefault (Find) : target.SingleOrDefault (Find);
- }
-
- public override void Compare (IEnumerable<XElement> source, IEnumerable<XElement> target)
- {
- removed.Clear ();
- modified.Clear ();
-
- foreach (var s in source) {
- SetContext (s);
- Source = s;
- var t = Find (target);
- if (t == null) {
- // not in target, it was removed
- removed.Add (s);
- } else {
- t.Remove ();
- // possibly modified
- if (Equals (s, t, modified))
- continue;
-
- Modified (s, t, modified);
- }
- }
- // delayed, that way we show "Modified", "Added" and then "Removed"
- Remove (removed);
-
- Modify (modified);
-
- // remaining == newly added in target
- Add (target);
- }
-
- void Add (IEnumerable<XElement> elements)
- {
- bool a = false;
- foreach (var item in elements) {
- SetContext (item);
- if (State.IgnoreAdded.Any (re => re.IsMatch (GetDescription (item))))
- continue;
- if (!a) {
- BeforeAdding (elements);
- a = true;
- }
- Added (item, false);
- }
- if (a)
- AfterAdding ();
- }
-
- void Modify (ApiChanges modified)
- {
- foreach (var changes in modified) {
- Output.WriteLine ("<p>{0}:</p>", changes.Key);
- Output.WriteLine ("<pre>");
- foreach (var element in changes.Value) {
- Output.Write ("<div {0}>", element.Breaking ? "data-is-breaking" : "data-is-non-breaking");
- foreach (var line in element.Member.ToString ().Split ('\n'))
- Output.WriteLine ("\t{0}", line);
- Output.Write ("</div>");
-
- }
- Output.WriteLine ("</pre>");
- }
- }
-
- void Remove (IEnumerable<XElement> elements)
- {
- bool r = false;
- foreach (var item in elements) {
- if (State.IgnoreRemoved.Any (re => re.IsMatch (GetDescription (item))))
- continue;
- SetContext (item);
- if (!r) {
- BeforeRemoving (elements);
- r = true;
- }
- Removed (item);
- }
- if (r)
- AfterRemoving ();
- }
-
- public abstract string GetDescription (XElement e);
-
- protected StringBuilder GetObsoleteMessage (XElement e)
- {
- var sb = new StringBuilder ();
- string o = e.GetObsoleteMessage ();
- if (o != null) {
- sb.Append ("[Obsolete");
- if (o.Length > 0)
- sb.Append (" (\"").Append (o).Append ("\")");
- sb.AppendLine ("]");
- for (int i = 0; i < State.Indent + 1; i++)
- sb.Append ('\t');
- }
- return sb;
- }
-
- public override bool Equals (XElement source, XElement target, ApiChanges changes)
- {
- RenderAttributes (source, target, changes);
-
- // We don't want to compare attributes.
- RemoveAttributes (source);
- RemoveAttributes (target);
-
- return base.Equals (source, target, changes);
- }
-
- public virtual void BeforeAdding (IEnumerable<XElement> list)
- {
- first = true;
- Output.WriteLine ("<div>");
- Output.WriteLine ("<p>Added {0}:</p>", list.Count () > 1 ? GroupName : ElementName);
- Output.WriteLine ("<pre>");
- }
-
- public override void Added (XElement target, bool wasParentAdded)
- {
- var o = GetObsoleteMessage (target);
- if (!first && (o.Length > 0))
- Output.WriteLine ();
- Indent ();
- bool isInterfaceBreakingChange = !wasParentAdded && IsInInterface (target);
- Output.Write ("\t<span class='added added-{0} {1}' {2}>", ElementName, isInterfaceBreakingChange ? "breaking" : string.Empty, isInterfaceBreakingChange ? "data-is-breaking" : "data-is-non-breaking");
- Output.Write ("{0}{1}", o, GetDescription (target));
- Output.WriteLine ("</span>");
- first = false;
- }
-
- public virtual void AfterAdding ()
- {
- Output.WriteLine ("</pre>");
- Output.WriteLine ("</div>");
- }
-
- public override void Modified (XElement source, XElement target, ApiChanges change)
- {
- }
-
- public virtual void BeforeRemoving (IEnumerable<XElement> list)
- {
- first = true;
- Output.WriteLine ("<p>Removed {0}:</p>\n", list.Count () > 1 ? GroupName : ElementName);
- Output.WriteLine ("<pre>");
- }
-
- public override void Removed (XElement source)
- {
- var o = GetObsoleteMessage (source);
- if (!first && (o.Length > 0))
- Output.WriteLine ();
-
- bool is_breaking = IsBreakingRemoval (source);
-
- Indent ();
- Output.Write ("\t<span class='removed removed-{0} {2}' {1}>", ElementName, is_breaking ? "data-is-breaking" : "data-is-non-breaking", is_breaking ? "breaking" : string.Empty);
- Output.Write ("{0}{1}", o, GetDescription (source));
- Output.WriteLine ("</span>");
- first = false;
- }
-
- public virtual void AfterRemoving ()
- {
- Output.WriteLine ("</pre>");;
- }
-
- string RenderGenericParameter (XElement gp)
- {
- var sb = new StringBuilder ();
- sb.Append (gp.GetTypeName ("name"));
-
- var constraints = gp.DescendantList ("generic-parameter-constraints", "generic-parameter-constraint");
- if (constraints != null && constraints.Count > 0) {
- sb.Append (" : ");
- for (int i = 0; i < constraints.Count; i++) {
- if (i > 0)
- sb.Append (", ");
- sb.Append (constraints [i].GetTypeName ("name"));
- }
- }
- return sb.ToString ();
- }
-
- protected void RenderGenericParameters (XElement source, XElement target, ApiChange change)
- {
- var src = source.DescendantList ("generic-parameters", "generic-parameter");
- var tgt = target.DescendantList ("generic-parameters", "generic-parameter");
- var srcCount = src == null ? 0 : src.Count;
- var tgtCount = tgt == null ? 0 : tgt.Count;
-
- if (srcCount == 0 && tgtCount == 0)
- return;
-
- change.Append ("<");
- for (int i = 0; i < Math.Max (srcCount, tgtCount); i++) {
- if (i > 0)
- change.Append (", ");
- if (i >= srcCount) {
- change.AppendAdded (RenderGenericParameter (tgt [i]), true);
- } else if (i >= tgtCount) {
- change.AppendRemoved (RenderGenericParameter (src [i]), true);
- } else {
- var srcName = RenderGenericParameter (src [i]);
- var tgtName = RenderGenericParameter (tgt [i]);
-
- if (srcName != tgtName) {
- change.AppendModified (srcName, tgtName, true);
- } else {
- change.Append (srcName);
- }
- }
- }
- change.Append (">");
- }
-
- protected string FormatValue (string type, string value)
- {
- if (value == null)
- return "null";
-
- if (type == "string")
- return "\"" + value + "\"";
- else if (type == "bool") {
- switch (value) {
- case "True":
- return "true";
- case "False":
- return "false";
- default:
- return value;
- }
- }
-
- return value;
- }
-
- protected void RenderParameters (XElement source, XElement target, ApiChange change)
- {
- var src = source.DescendantList ("parameters", "parameter");
- var tgt = target.DescendantList ("parameters", "parameter");
- var srcCount = src == null ? 0 : src.Count;
- var tgtCount = tgt == null ? 0 : tgt.Count;
-
- change.Append (" (");
- for (int i = 0; i < Math.Max (srcCount, tgtCount); i++) {
- if (i > 0)
- change.Append (", ");
-
- if (i >= srcCount) {
- change.AppendAdded (tgt [i].GetTypeName ("type") + " " + tgt [i].GetAttribute ("name"), true);
- } else if (i >= tgtCount) {
- change.AppendRemoved (src [i].GetTypeName ("type") + " " + src [i].GetAttribute ("name"), true);
- } else {
- var paramSourceType = src [i].GetTypeName ("type");
- var paramTargetType = tgt [i].GetTypeName ("type");
-
- var paramSourceName = src [i].GetAttribute ("name");
- var paramTargetName = tgt [i].GetAttribute ("name");
-
- if (paramSourceType != paramTargetType) {
- change.AppendModified (paramSourceType, paramTargetType, true);
- } else {
- change.Append (paramSourceType);
- }
- change.Append (" ");
- if (paramSourceName != paramTargetName) {
- change.AppendModified (paramSourceName, paramTargetName, false);
- } else {
- change.Append (paramSourceName);
- }
-
- var optSource = src [i].Attribute ("optional");
- var optTarget = tgt [i].Attribute ("optional");
- var srcValue = FormatValue (paramSourceType, src [i].GetAttribute ("defaultValue"));
- var tgtValue = FormatValue (paramTargetType, tgt [i].GetAttribute ("defaultValue"));
-
- if (optSource != null) {
- if (optTarget != null) {
- change.Append (" = ");
- if (srcValue != tgtValue) {
- change.AppendModified (srcValue, tgtValue, false);
- } else {
- change.Append (tgtValue);
- }
- } else {
- change.AppendRemoved (" = " + srcValue);
- }
- } else {
- if (optTarget != null)
- change.AppendAdded (" = " + tgtValue);
- }
- }
- }
-
- change.Append (")");
-
- // Ignore any parameter name changes if requested.
- if (State.IgnoreParameterNameChanges && !change.Breaking) {
- change.AnyChange = false;
- change.HasIgnoredChanges = true;
- }
- }
-
- void RenderVTable (MethodAttributes source, MethodAttributes target, ApiChange change)
- {
- var srcAbstract = (source & MethodAttributes.Abstract) == MethodAttributes.Abstract;
- var tgtAbstract = (target & MethodAttributes.Abstract) == MethodAttributes.Abstract;
- var srcFinal = (source & MethodAttributes.Final) == MethodAttributes.Final;
- var tgtFinal = (target & MethodAttributes.Final) == MethodAttributes.Final;
- var srcVirtual = (source & MethodAttributes.Virtual) == MethodAttributes.Virtual;
- var tgtVirtual = (target & MethodAttributes.Virtual) == MethodAttributes.Virtual;
- var srcOverride = (source & MethodAttributes.VtableLayoutMask) != MethodAttributes.NewSlot;
- var tgtOverride = (target & MethodAttributes.VtableLayoutMask) != MethodAttributes.NewSlot;
-
- var srcWord = srcVirtual ? (srcOverride ? "override" : "virtual") : string.Empty;
- var tgtWord = tgtVirtual ? (tgtOverride ? "override" : "virtual") : string.Empty;
- var breaking = srcWord.Length > 0 && tgtWord.Length == 0;
-
- if (srcAbstract) {
- if (tgtAbstract) {
- change.Append ("abstract ");
- } else if (tgtVirtual) {
- change.AppendModified ("abstract", tgtWord, false).Append (" ");
- } else {
- change.AppendRemoved ("abstract").Append (" ");
- }
- } else {
- if (tgtAbstract) {
- change.AppendAdded ("abstract", true).Append (" ");
- } else if (srcWord != tgtWord) {
- if (!tgtFinal)
- change.AppendModified (srcWord, tgtWord, breaking).Append (" ");
- } else if (tgtWord.Length > 0) {
- change.Append (tgtWord).Append (" ");
- } else if (srcWord.Length > 0) {
- change.AppendRemoved (srcWord, breaking).Append (" ");
- }
- }
-
- if (srcFinal) {
- if (tgtFinal) {
- change.Append ("final ");
- } else {
- change.AppendRemoved ("final", false).Append (" "); // removing 'final' is not a breaking change.
- }
- } else {
- if (tgtFinal && srcVirtual) {
- change.AppendModified ("virtual", "final", true).Append (" "); // adding 'final' is a breaking change if the member was virtual
- }
- }
-
- if (!srcVirtual && !srcFinal && tgtVirtual && tgtFinal) {
- // existing member implements a member from a new interface
- // this would show up as 'virtual final', which is redundant, so show nothing at all.
- change.HasIgnoredChanges = true;
- }
-
- // Ignore non-breaking virtual changes.
- if (State.IgnoreVirtualChanges && !change.Breaking) {
- change.AnyChange = false;
- change.HasIgnoredChanges = true;
- }
-
- var tgtSecurity = (source & MethodAttributes.HasSecurity) == MethodAttributes.HasSecurity;
- var srcSecurity = (target & MethodAttributes.HasSecurity) == MethodAttributes.HasSecurity;
-
- if (tgtSecurity != srcSecurity)
- change.HasIgnoredChanges = true;
-
- var srcPInvoke = (source & MethodAttributes.PinvokeImpl) == MethodAttributes.PinvokeImpl;
- var tgtPInvoke = (target & MethodAttributes.PinvokeImpl) == MethodAttributes.PinvokeImpl;
- if (srcPInvoke != tgtPInvoke)
- change.HasIgnoredChanges = true;
- }
-
- protected string GetVisibility (MethodAttributes attr)
- {
- switch (attr) {
- case MethodAttributes.Private:
- case MethodAttributes.PrivateScope:
- return "private";
- case MethodAttributes.Assembly:
- return "internal";
- case MethodAttributes.FamANDAssem:
- return "private internal";
- case MethodAttributes.FamORAssem:
- return "protected"; // customers don't care about 'internal';
- case MethodAttributes.Family:
- return "protected";
- case MethodAttributes.Public:
- return "public";
- default:
- throw new NotImplementedException ();
- }
- }
-
- protected void RenderVisibility (MethodAttributes source, MethodAttributes target, ApiChange diff)
- {
- source = source & MethodAttributes.MemberAccessMask;
- target = target & MethodAttributes.MemberAccessMask;
-
- if (source == target) {
- diff.Append (GetVisibility (target));
- } else {
- var breaking = false;
- switch (source) {
- case MethodAttributes.Private:
- case MethodAttributes.Assembly:
- case MethodAttributes.FamANDAssem:
- break; // these are not publicly visible, thus not breaking
- case MethodAttributes.FamORAssem:
- case MethodAttributes.Family:
- switch (target) {
- case MethodAttributes.Public:
- // to public is not a breaking change
- break;
- case MethodAttributes.Family:
- case MethodAttributes.FamORAssem:
- // not a breaking change, but should still show up in diff
- break;
- default:
- // anything else is a breaking change
- breaking = true;
- break;
- }
- break;
- case MethodAttributes.Public:
- default:
- // any change from public is breaking.
- breaking = true;
- break;
- }
-
- diff.AppendModified (GetVisibility (source), GetVisibility (target), breaking);
- }
- diff.Append (" ");
- }
-
- protected void RenderStatic (MethodAttributes src, MethodAttributes tgt, ApiChange diff)
- {
- var srcStatic = (src & MethodAttributes.Static) == MethodAttributes.Static;
- var tgtStatic = (tgt & MethodAttributes.Static) == MethodAttributes.Static;
-
- if (srcStatic != tgtStatic) {
- if (srcStatic) {
- diff.AppendRemoved ("static", true).Append (" ");
- } else {
- diff.AppendAdded ("static", true).Append (" ");
- }
- }
- }
-
- protected void RenderMethodAttributes (MethodAttributes src, MethodAttributes tgt, ApiChange diff)
- {
- RenderStatic (src, tgt, diff);
- RenderVisibility (src & MethodAttributes.MemberAccessMask, tgt & MethodAttributes.MemberAccessMask, diff);
- RenderVTable (src, tgt, diff);
- }
-
- protected void RenderMethodAttributes (XElement source, XElement target, ApiChange diff)
- {
- RenderMethodAttributes (source.GetMethodAttributes (), target.GetMethodAttributes (), diff);
- }
-
- protected void RemoveAttributes (XElement element)
- {
- var srcAttributes = element.Element ("attributes");
- if (srcAttributes != null)
- srcAttributes.Remove ();
-
- foreach (var el in element.Elements ())
- RemoveAttributes (el);
- }
-
- protected void RenderAttributes (XElement source, XElement target, ApiChanges changes)
- {
- var srcObsolete = source.GetObsoleteMessage ();
- var tgtObsolete = target.GetObsoleteMessage ();
-
- if (srcObsolete == tgtObsolete)
- return; // nothing changed
-
- if (srcObsolete == null) {
- if (tgtObsolete == null)
- return; // neither is obsolete
- var change = new ApiChange ();
- change.Header = "Obsoleted " + GroupName;
- change.Append (string.Format ("<span class='obsolete obsolete-{0}' data-is-non-breaking>", ElementName));
- change.Append ("[Obsolete (");
- if (tgtObsolete != string.Empty)
- change.Append ("\"").Append (tgtObsolete).Append ("\"");
- change.Append (")]\n");
- change.Append (GetDescription (target));
- change.Append ("</span>");
- change.AnyChange = true;
- changes.Add (source, target, change);
- } else if (tgtObsolete == null) {
- // Made non-obsolete. Do we care to report this?
- } else {
- // Obsolete message changed. Do we care to report this?
- }
- }
-
- protected void RenderName (XElement source, XElement target, ApiChange change)
- {
- var name = target.GetAttribute ("name");
- // show the constructor as it would be defined in C#
- name = name.Replace (".ctor", State.Type);
-
- var p = name.IndexOf ('(');
- if (p >= 0)
- name = name.Substring (0, p);
-
- change.Append (name);
- }
-
- }
-}
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Linq;
-using System.Reflection;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class MethodComparer : ConstructorComparer {
-
- public override string GroupName {
- get { return "methods"; }
- }
-
- public override string ElementName {
- get { return "method"; }
- }
-
- // operators have identical names but vary by return types
- public override bool Find (XElement e)
- {
- if (e.GetAttribute ("name") != Source.GetAttribute ("name"))
- return false;
-
- if (e.GetAttribute ("returntype") != Source.GetAttribute ("returntype"))
- return false;
-
- var eGP = e.Element ("generic-parameters");
- var sGP = Source.Element ("generic-parameters");
-
- if (eGP == null && sGP == null)
- return true;
- else if (eGP == null ^ sGP == null)
- return false;
- else {
- var eGPs = eGP.Elements ("generic-parameter");
- var sGPs = sGP.Elements ("generic-parameter");
- return eGPs.Count () == sGPs.Count ();
- }
- }
-
- protected override bool IsBreakingRemoval (XElement e)
- {
- // Removing virtual methods that override another method is not a breaking change.
- var is_override = e.Attribute ("is-override");
- if (is_override != null)
- return is_override.Value != "true";
-
- return true; // all other removals are breaking changes
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class NamespaceComparer : Comparer {
-
- ClassComparer comparer;
-
- public NamespaceComparer ()
- {
- comparer = new ClassComparer ();
- }
-
- public void Compare (XElement source, XElement target)
- {
- var s = source.Element ("namespaces");
- var t = target.Element ("namespaces");
- if (XNode.DeepEquals (s, t))
- return;
- Compare (s.Elements ("namespace"), t.Elements ("namespace"));
- }
-
- public override void SetContext (XElement current)
- {
- State.Namespace = current.Attribute ("name").Value;
- }
-
- public override void Added (XElement target, bool wasParentAdded)
- {
- string name = target.Attribute ("name").Value;
- if (State.IgnoreNew.Any (re => re.IsMatch (name)))
- return;
-
- Output.WriteLine ("<!-- start namespace {0} --> <div> ", name);
- Output.WriteLine ("<h2>New Namespace {0}</h2>", name);
- Output.WriteLine ();
- // list all new types
- foreach (var addedType in target.Element ("classes").Elements ("class"))
- comparer.Added (addedType, true);
- Output.WriteLine ("</div> <!-- end namespace {0} -->", name);
- Output.WriteLine ();
- }
-
- public override void Modified (XElement source, XElement target, ApiChanges differences)
- {
- var output = Output;
- State.Output = new StringWriter ();
- comparer.Compare (source, target);
-
- var s = Output.ToString ();
- State.Output = output;
- if (s.Length > 0) {
- var name = target.Attribute ("name").Value;
- Output.WriteLine ("<!-- start namespace {0} --> <div> ", name);
- Output.WriteLine ("<h2>Namespace {0}</h2>", name);
- Output.WriteLine (s);
- Output.WriteLine ("</div> <!-- end namespace {0} -->", name);
- }
- }
-
- public override void Removed (XElement source)
- {
- var name = source.Attribute ("name").Value;
- Output.WriteLine ("<!-- start namespace {0} --> <div>", name);
- Output.WriteLine ("<h2>Removed Namespace {0}</h2>", name);
- Output.WriteLine ();
- // list all removed types
- foreach (var removedType in source.Element ("classes").Elements ("class"))
- comparer.Removed (removedType);
- Output.WriteLine ("</div> <!-- end namespace {0} -->", name);
- Output.WriteLine ();
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-//
-// Authors
-// Sebastien Pouliot <sebastien@xamarin.com>
-//
-// Copyright 2013 Xamarin Inc. http://www.xamarin.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Xamarin.ApiDiff {
-
- public class PropertyComparer : MemberComparer {
-
- public override string GroupName {
- get { return "properties"; }
- }
-
- public override string ElementName {
- get { return "property"; }
- }
-
- public override bool Find (XElement e)
- {
- if (!base.Find (e))
- return false;
- // the same Item (indexer) property can have different parameters
- return e.GetAttribute ("params") == Source.GetAttribute ("params");
- }
-
- void GetAccessors (XElement element, out XElement getter, out XElement setter)
- {
- var methods = element.Element ("methods");
-
- getter = null;
- setter = null;
-
- if (methods == null)
- return;
-
- foreach (var m in methods.Elements ("method")) {
- var n = m.GetAttribute ("name");
- if (n.StartsWith ("get_", StringComparison.Ordinal)) {
- getter = m;
- } else if (n.StartsWith ("set_", StringComparison.Ordinal)) {
- setter = m;
- }
- }
- }
-
- MethodAttributes GetMethodAttributes (XElement getter, XElement setter)
- {
- if (getter == null)
- return setter.GetMethodAttributes ();
- else if (setter == null)
- return getter.GetMethodAttributes ();
-
- var gAttr = getter.GetMethodAttributes ();
- var sAttr = setter.GetMethodAttributes ();
- var g = gAttr & MethodAttributes.MemberAccessMask;
- var s = sAttr & MethodAttributes.MemberAccessMask;
- // Visibility is ordered numerically (higher value = more visible).
- // We want the most visible.
- var visibility = (MethodAttributes) Math.Max ((int) g, (int) s);
- // Do a bitwise or with the rest of the flags
- var g_no_visibility = gAttr & ~MethodAttributes.MemberAccessMask;
- var s_no_visibility = sAttr & ~MethodAttributes.MemberAccessMask;
- return g_no_visibility | s_no_visibility | visibility;
- }
-
- void RenderPropertyType (XElement source, XElement target, ApiChange change)
- {
- var srcType = source.GetTypeName ("ptype");
- var tgtType = target.GetTypeName ("ptype");
-
- if (srcType == tgtType) {
- change.Append (tgtType);
- } else {
- change.AppendModified (srcType, tgtType, true);
- }
- change.Append (" ");
- }
-
- void RenderAccessors (XElement srcGetter, XElement tgtGetter, XElement srcSetter, XElement tgtSetter, ApiChange change)
- {
- // FIXME: this doesn't render changes in the accessor visibility (a protected setter can become public for instance).
- change.Append (" {");
- if (tgtGetter != null) {
- if (srcGetter != null) {
- change.Append (" ").Append ("get;");
- } else {
- change.Append (" ").AppendAdded ("get;");
- }
- } else if (srcGetter != null) {
- change.Append (" ").AppendRemoved ("get;");
- }
-
- if (tgtSetter != null) {
- if (srcSetter != null) {
- change.Append (" ").Append ("set;");
- } else {
- change.Append (" ").AppendAdded ("set;");
- }
- } else if (srcSetter != null) {
- change.Append (" ").AppendRemoved ("set;");
- }
-
- change.Append (" }");
-
- // Ignore added property setters if asked to
- if (srcSetter == null && tgtSetter != null && State.IgnoreAddedPropertySetters && !change.Breaking) {
- change.AnyChange = false;
- change.HasIgnoredChanges = true;
- }
- }
-
- void RenderIndexers (List<XElement> srcIndexers, List<XElement> tgtIndexers, ApiChange change)
- {
- change.Append ("this [");
- for (int i = 0; i < srcIndexers.Count; i++) {
- var source = srcIndexers [i];
- var target = tgtIndexers [i];
-
- if (i > 0)
- change.Append (", ");
-
- var srcType = source.GetTypeName ("type");
- var tgtType = target.GetTypeName ("type");
- if (srcType == tgtType) {
- change.Append (tgtType);
- } else {
- change.AppendModified (srcType, tgtType, true);
- }
- change.Append (" ");
-
- var srcName = source.GetAttribute ("name");
- var tgtName = target.GetAttribute ("name");
- if (srcName == tgtName) {
- change.Append (tgtName);
- } else {
- change.AppendModified (srcName, tgtName, true);
- }
- }
- change.Append ("]");
- }
-
- public override bool Equals (XElement source, XElement target, ApiChanges changes)
- {
- if (base.Equals (source, target, changes))
- return true;
-
- XElement srcGetter, srcSetter;
- XElement tgtGetter, tgtSetter;
- GetAccessors (source, out srcGetter, out srcSetter);
- GetAccessors (target, out tgtGetter, out tgtSetter);
-
- List<XElement> srcIndexers = null;
- List<XElement> tgtIndexers = null;
- bool isIndexer = false;
- if (srcGetter != null) {
- srcIndexers = srcGetter.DescendantList ("parameters", "parameter");
- tgtIndexers = tgtGetter.DescendantList ("parameters", "parameter");
- isIndexer = srcIndexers != null && srcIndexers.Count > 0;
- }
-
- var change = new ApiChange ();
- change.Header = "Modified " + GroupName;
- RenderMethodAttributes (GetMethodAttributes (srcGetter, srcSetter), GetMethodAttributes (tgtGetter, tgtSetter), change);
- RenderPropertyType (source, target, change);
- if (isIndexer) {
- RenderIndexers (srcIndexers, tgtIndexers, change);
- } else {
- RenderName (source, target, change);
- }
- RenderGenericParameters (source, target, change);
- RenderAccessors (srcGetter, tgtGetter, srcSetter, tgtSetter, change);
-
- changes.Add (source, target, change);
-
- return false;
- }
-
- void GetProperties (XElement e, out bool @virtual, out bool @override, out bool @static, out bool getter, out bool setter, out bool family)
- {
- @virtual = @override = @static = getter = setter = family = false;
-
- var methods = e.Element ("methods");
- if (methods != null) {
- foreach (var m in methods.Elements ("method")) {
- @virtual |= m.IsTrue ("virtual");
- @static |= m.IsTrue ("static");
- var n = m.GetAttribute ("name");
- getter |= n.StartsWith ("get_", StringComparison.Ordinal);
- setter |= n.StartsWith ("set_", StringComparison.Ordinal);
- var attribs = (MethodAttributes) Int32.Parse (m.GetAttribute ("attrib"));
- family = ((attribs & MethodAttributes.Public) != MethodAttributes.Public);
- @override |= (attribs & MethodAttributes.NewSlot) == 0;
- }
- }
- }
-
- public override string GetDescription (XElement e)
- {
- string name = e.Attribute ("name").Value;
- string ptype = e.GetTypeName ("ptype");
-
- bool virt = false;
- bool over = false;
- bool stat = false;
- bool getter = false;
- bool setter = false;
- bool family = false;
- GetProperties (e, out virt, out over, out stat, out getter, out setter, out family);
-
- var sb = new StringBuilder ();
-
- sb.Append (family ? "protected " : "public ");
- if (virt && !State.IgnoreVirtualChanges)
- sb.Append (over ? "override " : "virtual ");
- else if (stat)
- sb.Append ("static ");
- sb.Append (ptype).Append (' ').Append (name).Append (" { ");
- if (getter)
- sb.Append ("get; ");
- if (setter)
- sb.Append ("set; ");
- sb.Append ("}");
-
- return sb.ToString ();
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D25986E2-7A41-4966-A26D-5614BAC7B8A7}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <RootNamespace>Xamarin.ApiDiff</RootNamespace>
- <AssemblyName>mono-api-html</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG;</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Externalconsole>true</Externalconsole>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Helpers.cs" />
- <Compile Include="InterfaceComparer.cs" />
- <Compile Include="NamespaceComparer.cs" />
- <Compile Include="MemberComparer.cs" />
- <Compile Include="FieldComparer.cs" />
- <Compile Include="PropertyComparer.cs" />
- <Compile Include="EventComparer.cs" />
- <Compile Include="MethodComparer.cs" />
- <Compile Include="ConstructorComparer.cs" />
- <Compile Include="Comparer.cs" />
- <Compile Include="AssemblyComparer.cs" />
- <Compile Include="ClassComparer.cs" />
- <Compile Include="ApiDiff.cs" />
- <Compile Include="..\..\..\class\Mono.Options\Mono.Options\Options.cs">
- <Link>Options.cs</Link>
- </Compile>
- <Compile Include="ApiChange.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-</Project>
--- /dev/null
+AssemblyResolver.cs
+Util.cs
+WellFormedXmlWriter.cs
+mono-api-info.cs
+../../class/Mono.Options/Mono.Options/Options.cs
// 3021: CLS attribute not needed since assembly is not CLS compliant
NOWARNS = -nowarn:3021
-LOCAL_MCS_FLAGS = -r:$(topdir)/class/lib/$(PROFILE)/Mono.CSharp.dll -r:$(topdir)/class/lib/$(PROFILE)/Mono.Posix.dll -r:Mono.Management.dll -r:System.dll -unsafe $(NOWARNS)
+LOCAL_MCS_FLAGS = -unsafe $(NOWARNS)
+LIB_REFS = Mono.CSharp Mono.Posix Mono.Management System
PROGRAM = csharp.exe
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.dll -r:System.Xml.dll
+LIB_REFS = System System.Xml
PROGRAM = culevel.exe
CLEAN_FILES = culevel.exe culevel.exe.mdb
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:System.Web.Services.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml System.Web.Services System
PROGRAM = disco.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:Commons.Xml.Relaxng.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml Commons.Xml.Relaxng
PROGRAM = dtd2rng.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml
PROGRAM = dtd2xsd.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:Mono.Security.dll -unsafe
+LIB_REFS = Mono.Security
+LOCAL_MCS_FLAGS = -unsafe
PROGRAM = gacutil.exe
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml
PROGRAM = genxs.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml
PROGRAM = ictool.exe
EXTRA_DISTFILES = ictool-config.xml
include ../../build/rules.make
PROGRAM = ikdasm.exe
-
+LIB_REFS = System System.Core System.Security
LOCAL_MCS_FLAGS = \
- -d:NO_SYMBOL_WRITER /r:System.Security.dll /r:System.Core.dll /r:System.dll
+ -d:NO_SYMBOL_WRITER
#EXTRA_DISTFILES = LICENSE
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Configuration.Install.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Configuration.Install System
PROGRAM = installutil.exe
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml
PROGRAM = installvst.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.dll -r:System.Core.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System System.Core
PROGRAM = lc.exe
CLEAN_FILES = lc.exe lc.exe.mdb
PROGRAM = linkeranalyzer.exe
-LOCAL_MCS_FLAGS = /r:System.dll /r:System.Xml.dll
+LIB_REFS = System System.Xml
+LOCAL_MCS_FLAGS =
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-PROGRAM_SNK = ../../class/mono.snk
-
-CECIL = $(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll
-
RESOURCES = \
Descriptors/mscorlib.xml \
Descriptors/System.xml \
$(PROGRAM): $(RESOURCES)
-LOCAL_MCS_FLAGS = /r:$(CECIL) /r:System.Xml.dll /r:System.Core.dll /r:System.dll $(RESOURCES:%=-resource:%)
+LIB_REFS = System System.Core System.Xml Mono.Cecil
+LOCAL_MCS_FLAGS = $(RESOURCES:%=-resource:%)
EXTRA_DISTFILES = $(RESOURCES)
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml System
PROGRAM = mconfig.exe
BUILT_SOURCES=Mono.MonoConfig/consts.cs
PROGRAM = mdbdump.exe
-LOCAL_MCS_FLAGS = \
- /r:System.Xml.dll \
- /r:Mono.Cecil.dll \
- /r:Mono.CompilerServices.SymbolWriter.dll
+LIB_REFS = Mono.Cecil System.Xml Mono.CompilerServices.SymbolWriter
+LOCAL_MCS_FLAGS =
include ../../build/executable.make
PROGRAM = mdbrebase.exe
-LOCAL_MCS_FLAGS = /r:Mono.CompilerServices.SymbolWriter.dll /r:System.dll
-
+LIB_REFS = System Mono.CompilerServices.SymbolWriter
+LOCAL_MCS_FLAGS =
include ../../build/executable.make
/resource:Resources/msitomsx.xsl,msitomsx.xsl \
/resource:Resources/overview.xsl,overview.xsl \
/resource:Resources/stylesheet.xsl,stylesheet.xsl \
- /r:System.Web.dll \
- /r:System.Xml.Linq.dll \
- /r:ICSharpCode.SharpZipLib.dll \
- /r:Mono.Cecil.dll \
- /r:System.dll \
- /r:System.Xml.dll \
- /r:System.Core.dll
-
-LOCAL_MCS_FLAGS = $(MDOC_COMMON_FLAGS) \
- /r:monodoc.dll
+
+LIB_REFS = monodoc System System.Xml System.Core Mono.Cecil ICSharpCode.SharpZipLib System.Xml.Linq System.Web
+
+LOCAL_MCS_FLAGS = $(MDOC_COMMON_FLAGS)
PROGRAM = mdoc.exe
PROGRAM_DEPS = $(topdir)/class/lib/$(PROFILE)/monodoc.dll
-rm -f monodocer1.exe*
Test/DocTest-addNonGeneric.dll:
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs
Test/DocTest-addNonGeneric-v2.dll:
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs /define:V2
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-addNonGeneric.cs /define:V2
Test/DocTest-DropNS-classic-secondary.dll:
@echo $(value @)
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic-secondary.cs
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic-secondary.cs
Test/DocTest-DropNS-classic.dll:
@echo $(value @)
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs
Test/DocTest-DropNS-unified.dll:
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs
Test/DocTest-DropNS-unified-multitest.dll:
rm -f $@
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs /define:MULTITEST
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs /define:MULTITEST
Test/DocTest-DropNS-classic-multitest.dll:
rm -f $@
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs /define:MULTITEST
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs /define:MULTITEST
Test/DocTest-DropNS-unified-deletetest.dll:
rm -f Test/DocTest-DropNS-unified-deletetest.dll
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs /define:DELETETEST
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-DropNS-unified.cs /define:DELETETEST
Test/DocTest-DropNS-unified-deletetest-V2.dll:
rm -f Test/DocTest-DropNS-unified-deletetest.dll
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:Test/DocTest-DropNS-unified-deletetest.dll Test/DocTest-DropNS-unified.cs /define:DELETETEST,V2
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:Test/DocTest-DropNS-unified-deletetest.dll Test/DocTest-DropNS-unified.cs /define:DELETETEST,V2
Test/DocTest-DropNS-classic-deletetest.dll:
rm -f Test/DocTest-DropNS-classic-deletetest.dll
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs /define:DELETETEST
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-DropNS-classic.cs /define:DELETETEST
Test/DocTest-DropNS-classic-deletetest-V2.dll:
rm -f Test/DocTest-DropNS-classic-deletetest.dll
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:Test/DocTest-DropNS-classic-deletetest.dll Test/DocTest-DropNS-classic.cs /define:DELETETEST,V2
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:Test/DocTest-DropNS-classic-deletetest.dll Test/DocTest-DropNS-classic.cs /define:DELETETEST,V2
Test/DocTest.dll:
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest.cs
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest.cs -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/Microsoft.CSharp.dll
Test/DocTest-InternalInterface.dll:
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-InternalInterface.cs
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-InternalInterface.cs
Test/DocTest.dll-v1:
-rm -f Test/DocTest.cs
$(MAKE) TEST_CSCFLAGS=$(TEST_CSCFLAGS) Test/DocTest.dll
Test/DocTest-enumerations.dll:
- $(CSCOMPILE) $(TEST_CSCFLAGS) -debug -unsafe -target:library -out:$@ Test/DocTest-enumerations.cs
+ $(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -target:library -out:$@ Test/DocTest-enumerations.cs
check-monodocer-addNonGeneric: $(PROGRAM)
-rm -Rf Test/en.actual
LOCAL_MCS_FLAGS= $(OTHER_RES:%=-resource:%)
-LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE -r:System.Xml.dll -r:System.dll
+LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE
+LIB_REFS = System.Xml System
EXTRA_DISTFILES = $(RESOURCE_FILES)
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = /r:monodoc.dll
+LIB_REFS = monodoc
+LOCAL_MCS_FLAGS =
PROGRAM = mod.exe
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff
+{
+ public class ApiChange
+ {
+ public string Header;
+ public StringBuilder Member = new StringBuilder ();
+ public bool Breaking;
+ public bool AnyChange;
+ public bool HasIgnoredChanges;
+
+ public ApiChange Append (string text)
+ {
+ Member.Append (text);
+ return this;
+ }
+
+ public ApiChange AppendAdded (string text, bool breaking = false)
+ {
+ Member.Append ("<span class='added ").Append (breaking ? "added-breaking-inline" : string.Empty).Append ("'>");
+ Member.Append (text);
+ Member.Append ("</span>");
+ Breaking |= breaking;
+ AnyChange = true;
+ return this;
+ }
+
+ public ApiChange AppendRemoved (string text, bool breaking = true)
+ {
+ Member.Append ("<span class='removed removed-inline ").Append (breaking ? "removed-breaking-inline" : string.Empty).Append ("'>");
+ Member.Append (text);
+ Member.Append ("</span>");
+ Breaking |= breaking;
+ AnyChange = true;
+ return this;
+ }
+
+ public ApiChange AppendModified (string old, string @new, bool breaking = true)
+ {
+ if (old.Length > 0)
+ AppendRemoved (old, breaking);
+ if (old.Length > 0 && @new.Length > 0)
+ Append (" ");
+ if (@new.Length > 0)
+ AppendAdded (@new);
+ Breaking |= breaking;
+ AnyChange = true;
+ return this;
+ }
+ }
+
+ public class ApiChanges : Dictionary<string, List<ApiChange>> {
+ public void Add (XElement source, XElement target, ApiChange change)
+ {
+ if (!change.AnyChange) {
+ // This is most likely because the rendering doesn't take into account something that's different (solution: fix rendering).
+ if (!change.HasIgnoredChanges) {
+ var isField = source.Name.LocalName == "field";
+ if (isField) {
+ Console.WriteLine ("Comparison resulting in no changes (src: {2} dst: {3}) :\n{0}\n{1}\n\n", source.ToString (), target.ToString (), source.GetFieldAttributes (), target.GetFieldAttributes ());
+ } else {
+ Console.WriteLine ("Comparison resulting in no changes (src: {2} dst: {3}) :\n{0}\n{1}\n\n", source.ToString (), target.ToString (), source.GetMethodAttributes (), target.GetMethodAttributes ());
+ }
+ }
+ return;
+ }
+
+ List<ApiChange> list;
+ if (!TryGetValue (change.Header, out list)) {
+ list = new List<ApiChange> ();
+ base.Add (change.Header, list);
+ }
+ list.Add (change);
+ }
+ }
+}
+
--- /dev/null
+//
+// The main differences with mono-api-diff are:
+// * this tool directly produce HTML similar to gdiff.sh used for Xamarin.iOS
+// * this tool reports changes in an "evolutionary" way, not in a breaking way,
+// i.e. it does not assume the source assembly is right (but simply older)
+// * the diff .xml output was not easy to convert back into the HTML format
+// that gdiff.sh produced
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Text.RegularExpressions;
+
+using Mono.Options;
+
+namespace Xamarin.ApiDiff {
+
+ public static class State {
+ static TextWriter output;
+
+ public static TextWriter Output {
+ get {
+ if (output == null)
+ output = Console.Out;
+ return output;
+ }
+ set { output = value; }
+ }
+
+ public static string Assembly { get; set; }
+ public static string Namespace { get; set; }
+ public static string Type { get; set; }
+ public static string BaseType { get; set; }
+
+ public static int Indent { get; set; }
+
+ static List<Regex> ignoreAdded = new List<Regex> ();
+ public static List<Regex> IgnoreAdded {
+ get { return ignoreAdded; }
+ }
+
+ static List<Regex> ignoreNew = new List<Regex> ();
+ public static List<Regex> IgnoreNew {
+ get { return ignoreNew; }
+ }
+
+ static List<Regex> ignoreRemoved = new List<Regex> ();
+ public static List<Regex> IgnoreRemoved {
+ get { return ignoreRemoved; }
+ }
+
+ public static bool IgnoreParameterNameChanges { get; set; }
+ public static bool IgnoreVirtualChanges { get; set; }
+ public static bool IgnoreAddedPropertySetters { get; set; }
+
+ public static bool Lax;
+ public static bool Colorize = true;
+ }
+
+ class Program {
+
+ public static int Main (string[] args)
+ {
+ var showHelp = false;
+ string diff = null;
+ List<string> extra = null;
+
+ var options = new OptionSet {
+ { "h|help", "Show this help", v => showHelp = true },
+ { "d|diff=", "HTML diff file out output (omit for stdout)", v => diff = v },
+ { "i|ignore=", "Ignore new, added, and removed members whose description matches a given C# regular expression (see below).",
+ v => {
+ var r = new Regex (v);
+ State.IgnoreAdded.Add (r);
+ State.IgnoreRemoved.Add (r);
+ State.IgnoreNew.Add (r);
+ }
+ },
+ { "a|ignore-added=", "Ignore added members whose description matches a given C# regular expression (see below).",
+ v => State.IgnoreAdded.Add (new Regex (v))
+ },
+ { "r|ignore-removed=", "Ignore removed members whose description matches a given C# regular expression (see below).",
+ v => State.IgnoreRemoved.Add (new Regex (v))
+ },
+ { "n|ignore-new=", "Ignore new namespaces and types whose description matches a given C# regular expression (see below).",
+ v => State.IgnoreNew.Add (new Regex (v))
+ },
+ { "ignore-changes-parameter-names", "Ignore changes to parameter names for identically prototyped methods.",
+ v => State.IgnoreParameterNameChanges = v != null
+ },
+ { "ignore-changes-property-setters", "Ignore adding setters to properties.",
+ v => State.IgnoreAddedPropertySetters = v != null
+ },
+ { "ignore-changes-virtual", "Ignore changing non-`virtual` to `virtual` or adding `override`.",
+ v => State.IgnoreVirtualChanges = v != null
+ },
+ { "c|colorize:", "Colorize HTML output", v => State.Colorize = string.IsNullOrEmpty (v) ? true : bool.Parse (v) },
+ { "x|lax", "Ignore duplicate XML entries", v => State.Lax = true }
+ };
+
+ try {
+ extra = options.Parse (args);
+ } catch (OptionException e) {
+ Console.WriteLine ("Option error: {0}", e.Message);
+ showHelp = true;
+ }
+
+ if (showHelp || extra == null || extra.Count < 2 || extra.Count > 3) {
+ Console.WriteLine (@"Usage: mono-api-html [options] <reference.xml> <assembly.xml> [diff.html]");
+ Console.WriteLine ();
+ Console.WriteLine ("Available options:");
+ options.WriteOptionDescriptions (Console.Out);
+ Console.WriteLine ();
+ Console.WriteLine ("Ignoring Members:");
+ Console.WriteLine ();
+ Console.WriteLine (" Members that were added can be filtered out of the diff by using the");
+ Console.WriteLine (" -i, --ignore-added option. The option takes a C# regular expression");
+ Console.WriteLine (" to match against member descriptions. For example, to ignore the");
+ Console.WriteLine (" introduction of the interfaces 'INSCopying' and 'INSCoding' on types");
+ Console.WriteLine (" pass the following to mono-api-html:");
+ Console.WriteLine ();
+ Console.WriteLine (" mono-api-html ... -i 'INSCopying$' -i 'INSCoding$'");
+ Console.WriteLine ();
+ Console.WriteLine (" The regular expressions will match any member description ending with");
+ Console.WriteLine (" 'INSCopying' or 'INSCoding'.");
+ Console.WriteLine ();
+ return 1;
+ }
+
+ var input = extra [0];
+ var output = extra [1];
+ if (extra.Count == 3 && diff == null)
+ diff = extra [2];
+
+ try {
+ var ac = new AssemblyComparer (input, output);
+ if (diff != null) {
+ string diffHtml = String.Empty;
+ using (var writer = new StringWriter ()) {
+ State.Output = writer;
+ ac.Compare ();
+ diffHtml = State.Output.ToString ();
+ }
+ if (diffHtml.Length > 0) {
+ using (var file = new StreamWriter (diff)) {
+ file.WriteLine ("<div>");
+ if (State.Colorize) {
+ file.WriteLine ("<style scoped>");
+ file.WriteLine ("\t.obsolete { color: gray; }");
+ file.WriteLine ("\t.added { color: green; }");
+ file.WriteLine ("\t.removed-inline { text-decoration: line-through; }");
+ file.WriteLine ("\t.removed-breaking-inline { color: red;}");
+ file.WriteLine ("\t.added-breaking-inline { text-decoration: underline; }");
+ file.WriteLine ("\t.nonbreaking { color: black; }");
+ file.WriteLine ("\t.breaking { color: red; }");
+ file.WriteLine ("</style>");
+ }
+ file.WriteLine (
+@"<script type=""text/javascript"">
+ // Only some elements have 'data-is-[non-]breaking' attributes. Here we
+ // iterate over all descendents elements, and set 'data-is-[non-]breaking'
+ // depending on whether there are any descendents with that attribute.
+ function propagateDataAttribute (element)
+ {
+ if (element.hasAttribute ('data-is-propagated'))
+ return;
+
+ var i;
+ var any_breaking = element.hasAttribute ('data-is-breaking');
+ var any_non_breaking = element.hasAttribute ('data-is-non-breaking');
+ for (i = 0; i < element.children.length; i++) {
+ var el = element.children [i];
+ propagateDataAttribute (el);
+ any_breaking |= el.hasAttribute ('data-is-breaking');
+ any_non_breaking |= el.hasAttribute ('data-is-non-breaking');
+ }
+
+ if (any_breaking)
+ element.setAttribute ('data-is-breaking', null);
+ else if (any_non_breaking)
+ element.setAttribute ('data-is-non-breaking', null);
+ element.setAttribute ('data-is-propagated', null);
+ }
+
+ function hideNonBreakingChanges ()
+ {
+ var topNodes = document.querySelectorAll ('[data-is-topmost]');
+ var n;
+ var i;
+ for (n = 0; n < topNodes.length; n++) {
+ propagateDataAttribute (topNodes [n]);
+ var elements = topNodes [n].querySelectorAll ('[data-is-non-breaking]');
+ for (i = 0; i < elements.length; i++) {
+ var el = elements [i];
+ if (!el.hasAttribute ('data-original-display'))
+ el.setAttribute ('data-original-display', el.style.display);
+ el.style.display = 'none';
+ }
+ }
+
+ var links = document.getElementsByClassName ('hide-nonbreaking');
+ for (i = 0; i < links.length; i++)
+ links [i].style.display = 'none';
+ links = document.getElementsByClassName ('restore-nonbreaking');
+ for (i = 0; i < links.length; i++)
+ links [i].style.display = '';
+ }
+
+ function showNonBreakingChanges ()
+ {
+ var elements = document.querySelectorAll ('[data-original-display]');
+ var i;
+ for (i = 0; i < elements.length; i++) {
+ var el = elements [i];
+ el.style.display = el.getAttribute ('data-original-display');
+ }
+
+ var links = document.getElementsByClassName ('hide-nonbreaking');
+ for (i = 0; i < links.length; i++)
+ links [i].style.display = '';
+ links = document.getElementsByClassName ('restore-nonbreaking');
+ for (i = 0; i < links.length; i++)
+ links [i].style.display = 'none';
+ }
+</script>");
+ if (ac.SourceAssembly == ac.TargetAssembly) {
+ file.WriteLine ("<h1>{0}.dll</h1>", ac.SourceAssembly);
+ } else {
+ file.WriteLine ("<h1>{0}.dll vs {1}.dll</h1>", ac.SourceAssembly, ac.TargetAssembly);
+ }
+ file.WriteLine ("<a href='javascript: hideNonBreakingChanges (); ' class='hide-nonbreaking'>Hide non-breaking changes</a>");
+ file.WriteLine ("<a href='javascript: showNonBreakingChanges (); ' class='restore-nonbreaking' style='display: none;'>Show non-breaking changes</a>");
+ file.WriteLine ("<br/>");
+ file.WriteLine ("<div data-is-topmost>");
+ file.Write (diffHtml);
+ file.WriteLine ("</div> <!-- end topmost div -->");
+ file.WriteLine ("</div>");
+ }
+ }
+ } else {
+ State.Output = Console.Out;
+ ac.Compare ();
+ }
+ }
+ catch (Exception e) {
+ Console.WriteLine (e);
+ return 1;
+ }
+ return 0;
+ }
+ }
+}
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class AssemblyComparer : Comparer {
+
+ XDocument source;
+ XDocument target;
+ NamespaceComparer comparer;
+
+ public AssemblyComparer (string sourceFile, string targetFile)
+ {
+ source = XDocument.Load (sourceFile);
+ target = XDocument.Load (targetFile);
+ comparer = new NamespaceComparer ();
+ }
+
+ public string SourceAssembly { get; private set; }
+ public string TargetAssembly { get; private set; }
+
+ public void Compare ()
+ {
+ Compare (source.Element ("assemblies").Elements ("assembly"),
+ target.Element ("assemblies").Elements ("assembly"));
+ }
+
+ public override void SetContext (XElement current)
+ {
+ State.Assembly = current.GetAttribute ("name");
+ }
+
+ public override void Added (XElement target, bool wasParentAdded)
+ {
+ // one assembly per xml file
+ }
+
+ public override void Modified (XElement source, XElement target, ApiChanges diff)
+ {
+ SourceAssembly = source.GetAttribute ("name");
+ TargetAssembly = target.GetAttribute ("name");
+ // TODO: version
+ // ? custom attributes ?
+ comparer.Compare (source, target);
+ }
+
+ public override void Removed (XElement source)
+ {
+ // one assembly per xml file
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class ClassComparer : Comparer {
+
+ InterfaceComparer icomparer;
+ ConstructorComparer ccomparer;
+ FieldComparer fcomparer;
+ PropertyComparer pcomparer;
+ EventComparer ecomparer;
+ MethodComparer mcomparer;
+ ClassComparer kcomparer;
+
+ public ClassComparer ()
+ {
+ icomparer = new InterfaceComparer ();
+ ccomparer = new ConstructorComparer ();
+ fcomparer = new FieldComparer ();
+ pcomparer = new PropertyComparer ();
+ ecomparer = new EventComparer ();
+ mcomparer = new MethodComparer ();
+ }
+
+ public override void SetContext (XElement current)
+ {
+ State.Type = current.GetAttribute ("name");
+ State.BaseType = current.GetAttribute ("base");
+ }
+
+ public void Compare (XElement source, XElement target)
+ {
+ var s = source.Element ("classes");
+ var t = target.Element ("classes");
+ if (XNode.DeepEquals (s, t))
+ return;
+ Compare (s.Elements ("class"), t.Elements ("class"));
+ }
+
+ public override void Added (XElement target, bool wasParentAdded)
+ {
+ string name = target.Attribute ("name").Value;
+ if (State.IgnoreNew.Any (re => re.IsMatch (name)))
+ return;
+ Output.WriteLine ("<div> <!-- start type {0} -->", name);
+ Output.WriteLine ("<h3>New Type {0}.{1}</h3>", State.Namespace, name);
+ Output.WriteLine ("<pre class='added' data-is-non-breaking>");
+ State.Indent = 0;
+ AddedInner (target);
+ Output.WriteLine ("</pre>");
+ Output.WriteLine ("</div> <!-- end type {0} -->", name);
+ }
+
+ public void AddedInner (XElement target)
+ {
+ SetContext (target);
+ if (target.IsTrue ("serializable"))
+ Indent ().WriteLine ("[Serializable]");
+
+ var type = target.Attribute ("type").Value;
+
+ if (type == "enum") {
+ // check if [Flags] is present
+ var cattrs = target.Element ("attributes");
+ if (cattrs != null) {
+ foreach (var ca in cattrs.Elements ("attribute")) {
+ if (ca.GetAttribute ("name") == "System.FlagsAttribute") {
+ Indent ().WriteLine ("[Flags]");
+ break;
+ }
+ }
+ }
+ }
+
+ Indent ().Write ("public");
+
+ if (type != "enum") {
+ bool seal = target.IsTrue ("sealed");
+ bool abst = target.IsTrue ("abstract");
+ if (seal && abst)
+ Output.Write (" static");
+ else if (seal && type != "struct")
+ Output.Write (" sealed");
+ else if (abst && type != "interface")
+ Output.Write (" abstract");
+ }
+
+ Output.Write (' ');
+ Output.Write (type);
+ Output.Write (' ');
+ Output.Write (target.GetAttribute ("name"));
+
+ var baseclass = target.GetAttribute ("base");
+ if ((type != "enum") && (type != "struct")) {
+ if (baseclass != null) {
+ if (baseclass == "System.Object") {
+ // while true we do not need to be reminded every time...
+ baseclass = null;
+ } else {
+ Output.Write (" : ");
+ Output.Write (baseclass);
+ }
+ }
+ }
+
+ // interfaces on enums are "standard" not user provided - so we do not want to show them
+ if (type != "enum") {
+ var i = target.Element ("interfaces");
+ if (i != null) {
+ var interfaces = new List<string> ();
+ foreach (var iface in i.Elements ("interface"))
+ interfaces.Add (icomparer.GetDescription (iface));
+ Output.Write ((baseclass == null) ? " : " : ", ");
+ Output.Write (String.Join (", ", interfaces));
+ }
+ }
+
+ Output.WriteLine (" {");
+
+ var t = target.Element ("constructors");
+ if (t != null) {
+ Indent ().WriteLine ("\t// constructors");
+ foreach (var ctor in t.Elements ("constructor"))
+ ccomparer.Added (ctor, true);
+ }
+
+ t = target.Element ("fields");
+ if (t != null) {
+ if (type != "enum")
+ Indent ().WriteLine ("\t// fields");
+ else
+ SetContext (target);
+ foreach (var field in t.Elements ("field"))
+ fcomparer.Added (field, true);
+ }
+
+ t = target.Element ("properties");
+ if (t != null) {
+ Indent ().WriteLine ("\t// properties");
+ foreach (var property in t.Elements ("property"))
+ pcomparer.Added (property, true);
+ }
+
+ t = target.Element ("events");
+ if (t != null) {
+ Indent ().WriteLine ("\t// events");
+ foreach (var evnt in t.Elements ("event"))
+ ecomparer.Added (evnt, true);
+ }
+
+ t = target.Element ("methods");
+ if (t != null) {
+ Indent ().WriteLine ("\t// methods");
+ foreach (var method in t.Elements ("method"))
+ mcomparer.Added (method, true);
+ }
+
+ t = target.Element ("classes");
+ if (t != null) {
+ Output.WriteLine ();
+ Indent ().WriteLine ("\t// inner types");
+ kcomparer = new NestedClassComparer ();
+ State.Indent++;
+ foreach (var inner in t.Elements ("class"))
+ kcomparer.AddedInner (inner);
+ State.Indent--;
+ }
+ Indent ().WriteLine ("}");
+ }
+
+ public override void Modified (XElement source, XElement target, ApiChanges diff)
+ {
+ // hack - there could be changes that we're not monitoring (e.g. attributes properties)
+ var output = Output;
+ State.Output = new StringWriter ();
+
+ var sb = source.GetAttribute ("base");
+ var tb = target.GetAttribute ("base");
+ if (sb != tb) {
+ Output.Write ("Modified base type: ");
+ Output.WriteLine (new ApiChange ().AppendModified (sb, tb, true).Member.ToString ());
+ }
+
+ ccomparer.Compare (source, target);
+ icomparer.Compare (source, target);
+ fcomparer.Compare (source, target);
+ pcomparer.Compare (source, target);
+ ecomparer.Compare (source, target);
+ mcomparer.Compare (source, target);
+
+ var si = source.Element ("classes");
+ if (si != null) {
+ var ti = target.Element ("classes");
+ kcomparer = new NestedClassComparer ();
+ kcomparer.Compare (si.Elements ("class"), ti == null ? null : ti.Elements ("class"));
+ }
+
+ var s = (Output as StringWriter).ToString ();
+ State.Output = output;
+ if (s.Length > 0) {
+ var tn = GetTypeName (target);
+ Output.WriteLine ("<!-- start type {0} --> <div>", tn);
+ Output.WriteLine ("<h3>Type Changed: {0}.{1}</h3>", State.Namespace, GetTypeName (target));
+ Output.WriteLine (s);
+ Output.WriteLine ("</div> <!-- end type {0} -->", tn);
+ }
+ }
+
+ public override void Removed (XElement source)
+ {
+ Output.Write ("<h3>Removed Type <span class='breaking' data-is-breaking>{0}.{1}</span></h3>", State.Namespace, GetTypeName (source));
+ }
+
+ public virtual string GetTypeName (XElement type)
+ {
+ return type.GetAttribute ("name");
+ }
+ }
+
+ public class NestedClassComparer : ClassComparer {
+
+ public override void SetContext (XElement current)
+ {
+ }
+
+ public override string GetTypeName (XElement type)
+ {
+ return State.Type + "." + base.GetTypeName (type);
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public abstract class Comparer {
+
+ protected List<XElement> removed = new List<XElement> ();
+ protected ApiChanges modified = new ApiChanges ();
+
+ public TextWriter Output {
+ get { return State.Output; }
+ }
+
+ protected TextWriter Indent ()
+ {
+ for (int i = 0; i < State.Indent; i++)
+ State.Output.Write ("\t");
+ return State.Output;
+ }
+
+ public abstract void Added (XElement target, bool wasParentAdded);
+ public abstract void Modified (XElement source, XElement target, ApiChanges changes);
+ public abstract void Removed (XElement source);
+
+ public virtual bool Equals (XElement source, XElement target, ApiChanges changes)
+ {
+ return XNode.DeepEquals (source, target);
+ }
+
+ public abstract void SetContext (XElement current);
+
+ public virtual void Compare (IEnumerable<XElement> source, IEnumerable<XElement> target)
+ {
+ removed.Clear ();
+ modified.Clear ();
+
+ foreach (var s in source) {
+ SetContext (s);
+ string sn = s.GetAttribute ("name");
+ var t = target == null ? null : target.SingleOrDefault (x => x.GetAttribute ("name") == sn);
+ if (t == null) {
+ // not in target, it was removed
+ removed.Add (s);
+ } else {
+ t.Remove ();
+ // possibly modified
+ if (Equals (s, t, modified))
+ continue;
+
+ // still in target so will be part of Added
+ Modified (s, t, modified);
+ }
+ }
+ // delayed, that way we show "Modified", "Added" and then "Removed"
+ foreach (var item in removed) {
+ SetContext (item);
+ Removed (item);
+ }
+ // remaining == newly added in target
+ if (target != null) {
+ foreach (var item in target) {
+ SetContext (item);
+ Added (item, false);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ // MethodComparer inherits from this one
+ public class ConstructorComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "constructors"; }
+ }
+
+ public override string ElementName {
+ get { return "constructor"; }
+ }
+
+ public override bool Find (XElement e)
+ {
+ return (e.Attribute ("name").Value == Source.Attribute ("name").Value);
+ }
+
+ void RenderReturnType (XElement source, XElement target, ApiChange change)
+ {
+ var srcType = source.GetTypeName ("returntype");
+ var tgtType = target.GetTypeName ("returntype");
+
+ if (srcType != tgtType) {
+ change.AppendModified (srcType, tgtType, true);
+ change.Append (" ");
+ } else if (srcType != null) {
+ // ctor don't have a return type
+ change.Append (srcType);
+ change.Append (" ");
+ }
+ }
+
+ public override bool Equals (XElement source, XElement target, ApiChanges changes)
+ {
+ if (base.Equals (source, target, changes))
+ return true;
+
+ var change = new ApiChange ();
+ change.Header = "Modified " + GroupName;
+ RenderMethodAttributes (source, target, change);
+ RenderReturnType (source, target, change);
+ RenderName (source, target, change);
+ RenderGenericParameters (source, target, change);
+ RenderParameters (source, target, change);
+
+ changes.Add (source, target, change);
+
+ return false;
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ var sb = new StringBuilder ();
+
+ var attribs = e.Attribute ("attrib");
+ if (attribs != null) {
+ var attr = (MethodAttributes) Int32.Parse (attribs.Value);
+ if ((attr & MethodAttributes.Public) != MethodAttributes.Public) {
+ sb.Append ("protected ");
+ } else {
+ sb.Append ("public ");
+ }
+
+ if ((attr & MethodAttributes.Static) != 0) {
+ sb.Append ("static ");
+ } else if ((attr & MethodAttributes.Virtual) != 0) {
+ if ((attr & MethodAttributes.VtableLayoutMask) == 0)
+ sb.Append ("override ");
+ else
+ sb.Append ("virtual ");
+ }
+ }
+
+ string name = e.GetAttribute ("name");
+
+ var r = e.GetTypeName ("returntype");
+ if (r != null) {
+ // ctor dont' have a return type
+ sb.Append (r).Append (' ');
+ } else {
+ // show the constructor as it would be defined in C#
+ name = name.Replace (".ctor", State.Type);
+ }
+
+ // the XML file `name` does not contain parameter names, so we must process them ourselves
+ // which gives us the opportunity to simplify type names
+ sb.Append (name.Substring (0, name.IndexOf ('(')));
+
+ var genericp = e.Element ("generic-parameters");
+ if (genericp != null) {
+ var list = new List<string> ();
+ foreach (var p in genericp.Elements ("generic-parameter")) {
+ list.Add (p.GetTypeName ("name"));
+ }
+ sb.Append ("<").Append (String.Join (", ", list)).Append (">");
+ }
+
+ sb.Append (" (");
+ var parameters = e.Element ("parameters");
+ if (parameters != null) {
+ var list = new List<string> ();
+ foreach (var p in parameters.Elements ("parameter")) {
+ var pTypeName = p.GetTypeName ("type");
+ list.Add (State.IgnoreParameterNameChanges
+ ? pTypeName
+ : pTypeName + " " + p.GetAttribute ("name"));
+ }
+ sb.Append (String.Join (", ", list));
+ }
+ sb.Append (");");
+
+ return sb.ToString ();
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class EventComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "events"; }
+ }
+
+ public override string ElementName {
+ get { return "event"; }
+ }
+
+ public override bool Equals (XElement source, XElement target, ApiChanges changes)
+ {
+ if (base.Equals (source, target, changes))
+ return true;
+
+ var change = new ApiChange ();
+ change.Header = "Modified " + GroupName;
+ change.Append ("public event ");
+
+ var srcEventType = source.GetTypeName ("eventtype");
+ var tgtEventType = target.GetTypeName ("eventtype");
+
+ if (srcEventType != tgtEventType) {
+ change.AppendModified (srcEventType, tgtEventType, true);
+ } else {
+ change.Append (srcEventType);
+ }
+ change.Append (" ");
+ change.Append (source.GetAttribute ("name")).Append (";");
+ return false;
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ StringBuilder sb = new StringBuilder ();
+ // TODO: attribs
+ sb.Append ("public event ");
+ sb.Append (e.GetTypeName ("eventtype")).Append (' ');
+ sb.Append (e.GetAttribute ("name")).Append (';');
+ return sb.ToString ();
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class FieldComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "fields"; }
+ }
+
+ public override string ElementName {
+ get { return "field"; }
+ }
+
+ void RenderFieldAttributes (FieldAttributes source, FieldAttributes target, ApiChange change)
+ {
+ var srcNotSerialized = (source & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
+ var tgtNotSerialized = (target & FieldAttributes.NotSerialized) == FieldAttributes.NotSerialized;
+ if (srcNotSerialized != tgtNotSerialized) {
+ // this is not a breaking change, so only render it if it changed.
+ if (srcNotSerialized) {
+ change.AppendRemoved ("[NonSerialized]\n");
+ } else {
+ change.AppendAdded ("[NonSerialized]\n");
+ }
+ }
+
+ // the visibility values are the same for MethodAttributes and FieldAttributes, so just use the same method.
+ RenderVisibility ((MethodAttributes) source, (MethodAttributes) target, change);
+ // same for the static flag
+ RenderStatic ((MethodAttributes) source, (MethodAttributes) target, change);
+
+ var srcLiteral = (source & FieldAttributes.Literal) != 0;
+ var tgtLiteral = (target & FieldAttributes.Literal) != 0;
+
+ if (srcLiteral) {
+ if (tgtLiteral) {
+ change.Append ("const ");
+ } else {
+ change.AppendRemoved ("const", true).Append (" ");
+ }
+ } else if (tgtLiteral) {
+ change.AppendAdded ("const", true).Append (" ");
+ }
+
+ var srcInitOnly = (source & FieldAttributes.InitOnly) != 0;
+ var tgtInitOnly = (target & FieldAttributes.InitOnly) != 0;
+ if (srcInitOnly) {
+ if (tgtInitOnly) {
+ change.Append ("readonly ");
+ } else {
+ change.AppendRemoved ("readonly", false).Append (" ");
+ }
+ } else if (tgtInitOnly) {
+ change.AppendAdded ("readonly", true).Append (" ");
+ }
+ }
+
+ public override bool Equals (XElement source, XElement target, ApiChanges changes)
+ {
+ if (base.Equals (source, target, changes))
+ return true;
+
+ var name = source.GetAttribute ("name");
+ var srcValue = source.GetAttribute ("value");
+ var tgtValue = target.GetAttribute ("value");
+ var change = new ApiChange ();
+ change.Header = "Modified " + GroupName;
+
+ if (State.BaseType == "System.Enum") {
+ change.Append (name).Append (" = ");
+ if (srcValue != tgtValue) {
+ change.AppendModified (srcValue, tgtValue, true);
+ } else {
+ change.Append (srcValue);
+ }
+ } else {
+ RenderFieldAttributes (source.GetFieldAttributes (), target.GetFieldAttributes (), change);
+
+ var srcType = source.GetTypeName ("fieldtype");
+ var tgtType = target.GetTypeName ("fieldtype");
+
+ if (srcType != tgtType) {
+ change.AppendModified (srcType, tgtType, true);
+ } else {
+ change.Append (srcType);
+ }
+ change.Append (" ");
+ change.Append (name);
+
+ if (srcType == "string" && srcValue != null)
+ srcValue = "\"" + srcValue + "\"";
+
+ if (tgtType == "string" && tgtValue != null)
+ tgtValue = "\"" + tgtValue + "\"";
+
+ if (srcValue != tgtValue) {
+ change.Append (" = ");
+ if (srcValue == null)
+ srcValue = "null";
+ if (tgtValue == null)
+ tgtValue = "null";
+ change.AppendModified (srcValue, tgtValue, true);
+ } else if (srcValue != null) {
+ change.Append (" = ");
+ change.Append (srcValue);
+ }
+ change.Append (";");
+ }
+
+ changes.Add (source, target, change);
+
+ return false;
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ var sb = new StringBuilder ();
+
+ string name = e.GetAttribute ("name");
+ string value = e.GetAttribute ("value");
+
+ if (State.BaseType == "System.Enum") {
+ sb.Append (name).Append (" = ").Append (value).Append (',');
+ } else {
+ var attribs = e.Attribute ("attrib");
+ if (attribs != null) {
+ var attr = (FieldAttributes)Int32.Parse (attribs.Value);
+ if ((attr & FieldAttributes.Public) != FieldAttributes.Public) {
+ sb.Append ("protected ");
+ } else {
+ sb.Append ("public ");
+ }
+
+ if ((attr & FieldAttributes.Static) != 0)
+ sb.Append ("static ");
+
+ if ((attr & FieldAttributes.Literal) != 0)
+ sb.Append ("const ");
+ }
+
+ string ftype = e.GetTypeName ("fieldtype");
+ sb.Append (ftype).Append (' ');
+ sb.Append (name);
+ if (ftype == "string" && e.Attribute ("value") != null) {
+ if (value == null)
+ sb.Append (" = null");
+ else
+ sb.Append (" = \"").Append (value).Append ('"');
+ }
+ sb.Append (';');
+ }
+
+ return sb.ToString ();
+ }
+
+ public override void BeforeAdding (IEnumerable<XElement> list)
+ {
+ first = true;
+ if (State.BaseType == "System.Enum") {
+ Output.WriteLine ("<div>");
+ Output.WriteLine ("<p>Added value{0}:</p>", list.Count () > 1 ? "s" : String.Empty);
+ Output.WriteLine ("<pre class='added' data-is-non-breaking>");
+ } else {
+ base.BeforeAdding (list);
+ }
+ }
+
+ public override void BeforeRemoving (IEnumerable<XElement> list)
+ {
+ first = true;
+ if (State.BaseType == "System.Enum") {
+ Output.WriteLine ("<p>Removed value{0}:</p>", list.Count () > 1 ? "s" : String.Empty);
+ Output.WriteLine ("<pre class='removed' data-is-breaking>");
+ } else {
+ base.BeforeRemoving (list);
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public static class Helper {
+ public static bool IsTrue (this XElement self, string name)
+ {
+ return (self.GetAttribute (name) == "true");
+ }
+
+ public static string GetAttribute (this XElement self, string name)
+ {
+ var n = self.Attribute (name);
+ if (n == null)
+ return null;
+ return n.Value;
+ }
+
+ // null == no obsolete, String.Empty == no description
+ public static string GetObsoleteMessage (this XElement self)
+ {
+ var cattrs = self.Element ("attributes");
+ if (cattrs == null)
+ return null;
+
+ foreach (var ca in cattrs.Elements ("attribute")) {
+ if (ca.GetAttribute ("name") != "System.ObsoleteAttribute")
+ continue;
+ var props = ca.Element ("properties");
+ if (props == null)
+ return String.Empty; // no description
+ foreach (var p in props.Elements ("property")) {
+ if (p.GetAttribute ("name") != "Message")
+ continue;
+ return p.GetAttribute ("value");
+ }
+ }
+ return null;
+ }
+
+ public static IEnumerable<XElement> Descendants (this XElement self, params string[] names)
+ {
+ XElement el = self;
+ if (el == null)
+ return null;
+
+ for (int i = 0; i < names.Length - 1; i++) {
+ el = el.Element (names [i]);
+ if (el == null)
+ return null;
+ }
+ return el.Elements (names [names.Length - 1]);
+ }
+
+ public static List<XElement> DescendantList (this XElement self, params string[] names)
+ {
+ var descendants = self.Descendants (names);
+ if (descendants == null)
+ return null;
+ return descendants.ToList ();
+ }
+
+ // make it beautiful (.NET -> C#)
+ public static string GetTypeName (this XElement self, string name)
+ {
+ string type = self.GetAttribute (name);
+ if (type == null)
+ return null;
+
+ StringBuilder sb = null;
+ bool is_nullable = false;
+ if (type.StartsWith ("System.Nullable`1[", StringComparison.Ordinal)) {
+ is_nullable = true;
+ sb = new StringBuilder (type, 18, type.Length - 19, 1024);
+ } else {
+ sb = new StringBuilder (type);
+ }
+
+ bool is_ref = (sb [sb.Length - 1] == '&');
+ if (is_ref)
+ sb.Remove (sb.Length - 1, 1);
+
+ int array = 0;
+ while ((sb [sb.Length - 1] == ']') && (sb [sb.Length - 2] == '[')) {
+ sb.Remove (sb.Length - 2, 2);
+ array++;
+ }
+
+ bool is_pointer = (sb [sb.Length - 1] == '*');
+ if (is_pointer)
+ sb.Remove (sb.Length - 1, 1);
+
+ type = GetTypeName (sb.Replace ('+', '.').ToString ());
+ sb.Length = 0;
+ if (is_ref)
+ sb.Append (self.GetAttribute ("direction")).Append (' ');
+
+ sb.Append (type);
+
+ while (array-- > 0)
+ sb.Append ("[]");
+ if (is_nullable)
+ sb.Append ('?');
+ if (is_pointer)
+ sb.Append ('*');
+ return sb.ToString ();
+ }
+
+ static string GetTypeName (string type)
+ {
+ int pos = type.IndexOf ('`');
+ if (pos >= 0) {
+ int end = type.LastIndexOf (']');
+ string subtype = type.Substring (pos + 3, end - pos - 3);
+ return type.Substring (0, pos) + "<" + GetTypeName (subtype) + ">";
+ }
+
+ switch (type) {
+ case "System.String":
+ return "string";
+ case "System.Int32":
+ return "int";
+ case "System.UInt32":
+ return "uint";
+ case "System.Int64":
+ return "long";
+ case "System.UInt64":
+ return "ulong";
+ case "System.Void":
+ return "void";
+ case "System.Boolean":
+ return "bool";
+ case "System.Object":
+ return "object";
+ case "System.Single":
+ return "float";
+ case "System.Double":
+ return "double";
+ case "System.Byte":
+ return "byte";
+ case "System.SByte":
+ return "sbyte";
+ case "System.Int16":
+ return "short";
+ case "System.UInt16":
+ return "ushort";
+ case "System.Char":
+ return "char";
+ case "System.nint":
+ return "nint";
+ case "System.nuint":
+ return "uint";
+ case "System.nfloat":
+ return "nfloat";
+ case "System.IntPtr":
+ return "IntPtr";
+ default:
+ if (type.StartsWith (State.Namespace, StringComparison.Ordinal))
+ type = type.Substring (State.Namespace.Length + 1);
+ return type;
+ }
+ }
+
+ public static MethodAttributes GetMethodAttributes (this XElement element)
+ {
+ var srcAttribs = element.Attribute ("attrib");
+ return (MethodAttributes) (srcAttribs != null ? Int32.Parse (srcAttribs.Value) : 0);
+ }
+
+ public static FieldAttributes GetFieldAttributes (this XElement element)
+ {
+ var srcAttribs = element.Attribute ("attrib");
+ return (FieldAttributes) (srcAttribs != null ? Int32.Parse (srcAttribs.Value) : 0);
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class InterfaceComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "interfaces"; }
+ }
+
+ public override string ElementName {
+ get { return "interface"; }
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ return e.GetTypeName ("name");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+thisdir = tools/mono-api-html
+SUBDIRS =
+include ../../build/rules.make
+
+LIB_REFS = Mono.Cecil System.Xml System.Core System System.Xml.Linq
+LOCAL_MCS_FLAGS =
+
+PROGRAM = mono-api-html.exe
+
+include ../../build/executable.make
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013-2014 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public abstract class MemberComparer : Comparer {
+
+ // true if this is the first element being added or removed in the group being rendered
+ protected bool first;
+
+ public abstract string GroupName { get; }
+ public abstract string ElementName { get; }
+
+ protected virtual bool IsBreakingRemoval (XElement e)
+ {
+ return true;
+ }
+
+ public void Compare (XElement source, XElement target)
+ {
+ var s = source.Element (GroupName);
+ var t = target.Element (GroupName);
+ if (XNode.DeepEquals (s, t))
+ return;
+
+ if (s == null) {
+ Add (t.Elements (ElementName));
+ } else if (t == null) {
+ Remove (s.Elements (ElementName));
+ } else {
+ Compare (s.Elements (ElementName), t.Elements (ElementName));
+ }
+ }
+
+ public override void SetContext (XElement current)
+ {
+ }
+
+ string GetContainingType (XElement el)
+ {
+ return el.Ancestors ("class").First ().Attribute ("type").Value;
+ }
+
+ bool IsInInterface (XElement el)
+ {
+ return GetContainingType (el) == "interface";
+ }
+
+ public XElement Source { get; set; }
+
+ public virtual bool Find (XElement e)
+ {
+ return e.GetAttribute ("name") == Source.GetAttribute ("name");
+ }
+
+ XElement Find (IEnumerable<XElement> target)
+ {
+ return State.Lax ? target.FirstOrDefault (Find) : target.SingleOrDefault (Find);
+ }
+
+ public override void Compare (IEnumerable<XElement> source, IEnumerable<XElement> target)
+ {
+ removed.Clear ();
+ modified.Clear ();
+
+ foreach (var s in source) {
+ SetContext (s);
+ Source = s;
+ var t = Find (target);
+ if (t == null) {
+ // not in target, it was removed
+ removed.Add (s);
+ } else {
+ t.Remove ();
+ // possibly modified
+ if (Equals (s, t, modified))
+ continue;
+
+ Modified (s, t, modified);
+ }
+ }
+ // delayed, that way we show "Modified", "Added" and then "Removed"
+ Remove (removed);
+
+ Modify (modified);
+
+ // remaining == newly added in target
+ Add (target);
+ }
+
+ void Add (IEnumerable<XElement> elements)
+ {
+ bool a = false;
+ foreach (var item in elements) {
+ SetContext (item);
+ if (State.IgnoreAdded.Any (re => re.IsMatch (GetDescription (item))))
+ continue;
+ if (!a) {
+ BeforeAdding (elements);
+ a = true;
+ }
+ Added (item, false);
+ }
+ if (a)
+ AfterAdding ();
+ }
+
+ void Modify (ApiChanges modified)
+ {
+ foreach (var changes in modified) {
+ Output.WriteLine ("<p>{0}:</p>", changes.Key);
+ Output.WriteLine ("<pre>");
+ foreach (var element in changes.Value) {
+ Output.Write ("<div {0}>", element.Breaking ? "data-is-breaking" : "data-is-non-breaking");
+ foreach (var line in element.Member.ToString ().Split ('\n'))
+ Output.WriteLine ("\t{0}", line);
+ Output.Write ("</div>");
+
+ }
+ Output.WriteLine ("</pre>");
+ }
+ }
+
+ void Remove (IEnumerable<XElement> elements)
+ {
+ bool r = false;
+ foreach (var item in elements) {
+ if (State.IgnoreRemoved.Any (re => re.IsMatch (GetDescription (item))))
+ continue;
+ SetContext (item);
+ if (!r) {
+ BeforeRemoving (elements);
+ r = true;
+ }
+ Removed (item);
+ }
+ if (r)
+ AfterRemoving ();
+ }
+
+ public abstract string GetDescription (XElement e);
+
+ protected StringBuilder GetObsoleteMessage (XElement e)
+ {
+ var sb = new StringBuilder ();
+ string o = e.GetObsoleteMessage ();
+ if (o != null) {
+ sb.Append ("[Obsolete");
+ if (o.Length > 0)
+ sb.Append (" (\"").Append (o).Append ("\")");
+ sb.AppendLine ("]");
+ for (int i = 0; i < State.Indent + 1; i++)
+ sb.Append ('\t');
+ }
+ return sb;
+ }
+
+ public override bool Equals (XElement source, XElement target, ApiChanges changes)
+ {
+ RenderAttributes (source, target, changes);
+
+ // We don't want to compare attributes.
+ RemoveAttributes (source);
+ RemoveAttributes (target);
+
+ return base.Equals (source, target, changes);
+ }
+
+ public virtual void BeforeAdding (IEnumerable<XElement> list)
+ {
+ first = true;
+ Output.WriteLine ("<div>");
+ Output.WriteLine ("<p>Added {0}:</p>", list.Count () > 1 ? GroupName : ElementName);
+ Output.WriteLine ("<pre>");
+ }
+
+ public override void Added (XElement target, bool wasParentAdded)
+ {
+ var o = GetObsoleteMessage (target);
+ if (!first && (o.Length > 0))
+ Output.WriteLine ();
+ Indent ();
+ bool isInterfaceBreakingChange = !wasParentAdded && IsInInterface (target);
+ Output.Write ("\t<span class='added added-{0} {1}' {2}>", ElementName, isInterfaceBreakingChange ? "breaking" : string.Empty, isInterfaceBreakingChange ? "data-is-breaking" : "data-is-non-breaking");
+ Output.Write ("{0}{1}", o, GetDescription (target));
+ Output.WriteLine ("</span>");
+ first = false;
+ }
+
+ public virtual void AfterAdding ()
+ {
+ Output.WriteLine ("</pre>");
+ Output.WriteLine ("</div>");
+ }
+
+ public override void Modified (XElement source, XElement target, ApiChanges change)
+ {
+ }
+
+ public virtual void BeforeRemoving (IEnumerable<XElement> list)
+ {
+ first = true;
+ Output.WriteLine ("<p>Removed {0}:</p>\n", list.Count () > 1 ? GroupName : ElementName);
+ Output.WriteLine ("<pre>");
+ }
+
+ public override void Removed (XElement source)
+ {
+ var o = GetObsoleteMessage (source);
+ if (!first && (o.Length > 0))
+ Output.WriteLine ();
+
+ bool is_breaking = IsBreakingRemoval (source);
+
+ Indent ();
+ Output.Write ("\t<span class='removed removed-{0} {2}' {1}>", ElementName, is_breaking ? "data-is-breaking" : "data-is-non-breaking", is_breaking ? "breaking" : string.Empty);
+ Output.Write ("{0}{1}", o, GetDescription (source));
+ Output.WriteLine ("</span>");
+ first = false;
+ }
+
+ public virtual void AfterRemoving ()
+ {
+ Output.WriteLine ("</pre>");;
+ }
+
+ string RenderGenericParameter (XElement gp)
+ {
+ var sb = new StringBuilder ();
+ sb.Append (gp.GetTypeName ("name"));
+
+ var constraints = gp.DescendantList ("generic-parameter-constraints", "generic-parameter-constraint");
+ if (constraints != null && constraints.Count > 0) {
+ sb.Append (" : ");
+ for (int i = 0; i < constraints.Count; i++) {
+ if (i > 0)
+ sb.Append (", ");
+ sb.Append (constraints [i].GetTypeName ("name"));
+ }
+ }
+ return sb.ToString ();
+ }
+
+ protected void RenderGenericParameters (XElement source, XElement target, ApiChange change)
+ {
+ var src = source.DescendantList ("generic-parameters", "generic-parameter");
+ var tgt = target.DescendantList ("generic-parameters", "generic-parameter");
+ var srcCount = src == null ? 0 : src.Count;
+ var tgtCount = tgt == null ? 0 : tgt.Count;
+
+ if (srcCount == 0 && tgtCount == 0)
+ return;
+
+ change.Append ("<");
+ for (int i = 0; i < Math.Max (srcCount, tgtCount); i++) {
+ if (i > 0)
+ change.Append (", ");
+ if (i >= srcCount) {
+ change.AppendAdded (RenderGenericParameter (tgt [i]), true);
+ } else if (i >= tgtCount) {
+ change.AppendRemoved (RenderGenericParameter (src [i]), true);
+ } else {
+ var srcName = RenderGenericParameter (src [i]);
+ var tgtName = RenderGenericParameter (tgt [i]);
+
+ if (srcName != tgtName) {
+ change.AppendModified (srcName, tgtName, true);
+ } else {
+ change.Append (srcName);
+ }
+ }
+ }
+ change.Append (">");
+ }
+
+ protected string FormatValue (string type, string value)
+ {
+ if (value == null)
+ return "null";
+
+ if (type == "string")
+ return "\"" + value + "\"";
+ else if (type == "bool") {
+ switch (value) {
+ case "True":
+ return "true";
+ case "False":
+ return "false";
+ default:
+ return value;
+ }
+ }
+
+ return value;
+ }
+
+ protected void RenderParameters (XElement source, XElement target, ApiChange change)
+ {
+ var src = source.DescendantList ("parameters", "parameter");
+ var tgt = target.DescendantList ("parameters", "parameter");
+ var srcCount = src == null ? 0 : src.Count;
+ var tgtCount = tgt == null ? 0 : tgt.Count;
+
+ change.Append (" (");
+ for (int i = 0; i < Math.Max (srcCount, tgtCount); i++) {
+ if (i > 0)
+ change.Append (", ");
+
+ if (i >= srcCount) {
+ change.AppendAdded (tgt [i].GetTypeName ("type") + " " + tgt [i].GetAttribute ("name"), true);
+ } else if (i >= tgtCount) {
+ change.AppendRemoved (src [i].GetTypeName ("type") + " " + src [i].GetAttribute ("name"), true);
+ } else {
+ var paramSourceType = src [i].GetTypeName ("type");
+ var paramTargetType = tgt [i].GetTypeName ("type");
+
+ var paramSourceName = src [i].GetAttribute ("name");
+ var paramTargetName = tgt [i].GetAttribute ("name");
+
+ if (paramSourceType != paramTargetType) {
+ change.AppendModified (paramSourceType, paramTargetType, true);
+ } else {
+ change.Append (paramSourceType);
+ }
+ change.Append (" ");
+ if (paramSourceName != paramTargetName) {
+ change.AppendModified (paramSourceName, paramTargetName, false);
+ } else {
+ change.Append (paramSourceName);
+ }
+
+ var optSource = src [i].Attribute ("optional");
+ var optTarget = tgt [i].Attribute ("optional");
+ var srcValue = FormatValue (paramSourceType, src [i].GetAttribute ("defaultValue"));
+ var tgtValue = FormatValue (paramTargetType, tgt [i].GetAttribute ("defaultValue"));
+
+ if (optSource != null) {
+ if (optTarget != null) {
+ change.Append (" = ");
+ if (srcValue != tgtValue) {
+ change.AppendModified (srcValue, tgtValue, false);
+ } else {
+ change.Append (tgtValue);
+ }
+ } else {
+ change.AppendRemoved (" = " + srcValue);
+ }
+ } else {
+ if (optTarget != null)
+ change.AppendAdded (" = " + tgtValue);
+ }
+ }
+ }
+
+ change.Append (")");
+
+ // Ignore any parameter name changes if requested.
+ if (State.IgnoreParameterNameChanges && !change.Breaking) {
+ change.AnyChange = false;
+ change.HasIgnoredChanges = true;
+ }
+ }
+
+ void RenderVTable (MethodAttributes source, MethodAttributes target, ApiChange change)
+ {
+ var srcAbstract = (source & MethodAttributes.Abstract) == MethodAttributes.Abstract;
+ var tgtAbstract = (target & MethodAttributes.Abstract) == MethodAttributes.Abstract;
+ var srcFinal = (source & MethodAttributes.Final) == MethodAttributes.Final;
+ var tgtFinal = (target & MethodAttributes.Final) == MethodAttributes.Final;
+ var srcVirtual = (source & MethodAttributes.Virtual) == MethodAttributes.Virtual;
+ var tgtVirtual = (target & MethodAttributes.Virtual) == MethodAttributes.Virtual;
+ var srcOverride = (source & MethodAttributes.VtableLayoutMask) != MethodAttributes.NewSlot;
+ var tgtOverride = (target & MethodAttributes.VtableLayoutMask) != MethodAttributes.NewSlot;
+
+ var srcWord = srcVirtual ? (srcOverride ? "override" : "virtual") : string.Empty;
+ var tgtWord = tgtVirtual ? (tgtOverride ? "override" : "virtual") : string.Empty;
+ var breaking = srcWord.Length > 0 && tgtWord.Length == 0;
+
+ if (srcAbstract) {
+ if (tgtAbstract) {
+ change.Append ("abstract ");
+ } else if (tgtVirtual) {
+ change.AppendModified ("abstract", tgtWord, false).Append (" ");
+ } else {
+ change.AppendRemoved ("abstract").Append (" ");
+ }
+ } else {
+ if (tgtAbstract) {
+ change.AppendAdded ("abstract", true).Append (" ");
+ } else if (srcWord != tgtWord) {
+ if (!tgtFinal)
+ change.AppendModified (srcWord, tgtWord, breaking).Append (" ");
+ } else if (tgtWord.Length > 0) {
+ change.Append (tgtWord).Append (" ");
+ } else if (srcWord.Length > 0) {
+ change.AppendRemoved (srcWord, breaking).Append (" ");
+ }
+ }
+
+ if (srcFinal) {
+ if (tgtFinal) {
+ change.Append ("final ");
+ } else {
+ change.AppendRemoved ("final", false).Append (" "); // removing 'final' is not a breaking change.
+ }
+ } else {
+ if (tgtFinal && srcVirtual) {
+ change.AppendModified ("virtual", "final", true).Append (" "); // adding 'final' is a breaking change if the member was virtual
+ }
+ }
+
+ if (!srcVirtual && !srcFinal && tgtVirtual && tgtFinal) {
+ // existing member implements a member from a new interface
+ // this would show up as 'virtual final', which is redundant, so show nothing at all.
+ change.HasIgnoredChanges = true;
+ }
+
+ // Ignore non-breaking virtual changes.
+ if (State.IgnoreVirtualChanges && !change.Breaking) {
+ change.AnyChange = false;
+ change.HasIgnoredChanges = true;
+ }
+
+ var tgtSecurity = (source & MethodAttributes.HasSecurity) == MethodAttributes.HasSecurity;
+ var srcSecurity = (target & MethodAttributes.HasSecurity) == MethodAttributes.HasSecurity;
+
+ if (tgtSecurity != srcSecurity)
+ change.HasIgnoredChanges = true;
+
+ var srcPInvoke = (source & MethodAttributes.PinvokeImpl) == MethodAttributes.PinvokeImpl;
+ var tgtPInvoke = (target & MethodAttributes.PinvokeImpl) == MethodAttributes.PinvokeImpl;
+ if (srcPInvoke != tgtPInvoke)
+ change.HasIgnoredChanges = true;
+ }
+
+ protected string GetVisibility (MethodAttributes attr)
+ {
+ switch (attr) {
+ case MethodAttributes.Private:
+ case MethodAttributes.PrivateScope:
+ return "private";
+ case MethodAttributes.Assembly:
+ return "internal";
+ case MethodAttributes.FamANDAssem:
+ return "private internal";
+ case MethodAttributes.FamORAssem:
+ return "protected"; // customers don't care about 'internal';
+ case MethodAttributes.Family:
+ return "protected";
+ case MethodAttributes.Public:
+ return "public";
+ default:
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected void RenderVisibility (MethodAttributes source, MethodAttributes target, ApiChange diff)
+ {
+ source = source & MethodAttributes.MemberAccessMask;
+ target = target & MethodAttributes.MemberAccessMask;
+
+ if (source == target) {
+ diff.Append (GetVisibility (target));
+ } else {
+ var breaking = false;
+ switch (source) {
+ case MethodAttributes.Private:
+ case MethodAttributes.Assembly:
+ case MethodAttributes.FamANDAssem:
+ break; // these are not publicly visible, thus not breaking
+ case MethodAttributes.FamORAssem:
+ case MethodAttributes.Family:
+ switch (target) {
+ case MethodAttributes.Public:
+ // to public is not a breaking change
+ break;
+ case MethodAttributes.Family:
+ case MethodAttributes.FamORAssem:
+ // not a breaking change, but should still show up in diff
+ break;
+ default:
+ // anything else is a breaking change
+ breaking = true;
+ break;
+ }
+ break;
+ case MethodAttributes.Public:
+ default:
+ // any change from public is breaking.
+ breaking = true;
+ break;
+ }
+
+ diff.AppendModified (GetVisibility (source), GetVisibility (target), breaking);
+ }
+ diff.Append (" ");
+ }
+
+ protected void RenderStatic (MethodAttributes src, MethodAttributes tgt, ApiChange diff)
+ {
+ var srcStatic = (src & MethodAttributes.Static) == MethodAttributes.Static;
+ var tgtStatic = (tgt & MethodAttributes.Static) == MethodAttributes.Static;
+
+ if (srcStatic != tgtStatic) {
+ if (srcStatic) {
+ diff.AppendRemoved ("static", true).Append (" ");
+ } else {
+ diff.AppendAdded ("static", true).Append (" ");
+ }
+ }
+ }
+
+ protected void RenderMethodAttributes (MethodAttributes src, MethodAttributes tgt, ApiChange diff)
+ {
+ RenderStatic (src, tgt, diff);
+ RenderVisibility (src & MethodAttributes.MemberAccessMask, tgt & MethodAttributes.MemberAccessMask, diff);
+ RenderVTable (src, tgt, diff);
+ }
+
+ protected void RenderMethodAttributes (XElement source, XElement target, ApiChange diff)
+ {
+ RenderMethodAttributes (source.GetMethodAttributes (), target.GetMethodAttributes (), diff);
+ }
+
+ protected void RemoveAttributes (XElement element)
+ {
+ var srcAttributes = element.Element ("attributes");
+ if (srcAttributes != null)
+ srcAttributes.Remove ();
+
+ foreach (var el in element.Elements ())
+ RemoveAttributes (el);
+ }
+
+ protected void RenderAttributes (XElement source, XElement target, ApiChanges changes)
+ {
+ var srcObsolete = source.GetObsoleteMessage ();
+ var tgtObsolete = target.GetObsoleteMessage ();
+
+ if (srcObsolete == tgtObsolete)
+ return; // nothing changed
+
+ if (srcObsolete == null) {
+ if (tgtObsolete == null)
+ return; // neither is obsolete
+ var change = new ApiChange ();
+ change.Header = "Obsoleted " + GroupName;
+ change.Append (string.Format ("<span class='obsolete obsolete-{0}' data-is-non-breaking>", ElementName));
+ change.Append ("[Obsolete (");
+ if (tgtObsolete != string.Empty)
+ change.Append ("\"").Append (tgtObsolete).Append ("\"");
+ change.Append (")]\n");
+ change.Append (GetDescription (target));
+ change.Append ("</span>");
+ change.AnyChange = true;
+ changes.Add (source, target, change);
+ } else if (tgtObsolete == null) {
+ // Made non-obsolete. Do we care to report this?
+ } else {
+ // Obsolete message changed. Do we care to report this?
+ }
+ }
+
+ protected void RenderName (XElement source, XElement target, ApiChange change)
+ {
+ var name = target.GetAttribute ("name");
+ // show the constructor as it would be defined in C#
+ name = name.Replace (".ctor", State.Type);
+
+ var p = name.IndexOf ('(');
+ if (p >= 0)
+ name = name.Substring (0, p);
+
+ change.Append (name);
+ }
+
+ }
+}
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Linq;
+using System.Reflection;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class MethodComparer : ConstructorComparer {
+
+ public override string GroupName {
+ get { return "methods"; }
+ }
+
+ public override string ElementName {
+ get { return "method"; }
+ }
+
+ // operators have identical names but vary by return types
+ public override bool Find (XElement e)
+ {
+ if (e.GetAttribute ("name") != Source.GetAttribute ("name"))
+ return false;
+
+ if (e.GetAttribute ("returntype") != Source.GetAttribute ("returntype"))
+ return false;
+
+ var eGP = e.Element ("generic-parameters");
+ var sGP = Source.Element ("generic-parameters");
+
+ if (eGP == null && sGP == null)
+ return true;
+ else if (eGP == null ^ sGP == null)
+ return false;
+ else {
+ var eGPs = eGP.Elements ("generic-parameter");
+ var sGPs = sGP.Elements ("generic-parameter");
+ return eGPs.Count () == sGPs.Count ();
+ }
+ }
+
+ protected override bool IsBreakingRemoval (XElement e)
+ {
+ // Removing virtual methods that override another method is not a breaking change.
+ var is_override = e.Attribute ("is-override");
+ if (is_override != null)
+ return is_override.Value != "true";
+
+ return true; // all other removals are breaking changes
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class NamespaceComparer : Comparer {
+
+ ClassComparer comparer;
+
+ public NamespaceComparer ()
+ {
+ comparer = new ClassComparer ();
+ }
+
+ public void Compare (XElement source, XElement target)
+ {
+ var s = source.Element ("namespaces");
+ var t = target.Element ("namespaces");
+ if (XNode.DeepEquals (s, t))
+ return;
+ Compare (s.Elements ("namespace"), t.Elements ("namespace"));
+ }
+
+ public override void SetContext (XElement current)
+ {
+ State.Namespace = current.Attribute ("name").Value;
+ }
+
+ public override void Added (XElement target, bool wasParentAdded)
+ {
+ string name = target.Attribute ("name").Value;
+ if (State.IgnoreNew.Any (re => re.IsMatch (name)))
+ return;
+
+ Output.WriteLine ("<!-- start namespace {0} --> <div> ", name);
+ Output.WriteLine ("<h2>New Namespace {0}</h2>", name);
+ Output.WriteLine ();
+ // list all new types
+ foreach (var addedType in target.Element ("classes").Elements ("class"))
+ comparer.Added (addedType, true);
+ Output.WriteLine ("</div> <!-- end namespace {0} -->", name);
+ Output.WriteLine ();
+ }
+
+ public override void Modified (XElement source, XElement target, ApiChanges differences)
+ {
+ var output = Output;
+ State.Output = new StringWriter ();
+ comparer.Compare (source, target);
+
+ var s = Output.ToString ();
+ State.Output = output;
+ if (s.Length > 0) {
+ var name = target.Attribute ("name").Value;
+ Output.WriteLine ("<!-- start namespace {0} --> <div> ", name);
+ Output.WriteLine ("<h2>Namespace {0}</h2>", name);
+ Output.WriteLine (s);
+ Output.WriteLine ("</div> <!-- end namespace {0} -->", name);
+ }
+ }
+
+ public override void Removed (XElement source)
+ {
+ var name = source.Attribute ("name").Value;
+ Output.WriteLine ("<!-- start namespace {0} --> <div>", name);
+ Output.WriteLine ("<h2>Removed Namespace {0}</h2>", name);
+ Output.WriteLine ();
+ // list all removed types
+ foreach (var removedType in source.Element ("classes").Elements ("class"))
+ comparer.Removed (removedType);
+ Output.WriteLine ("</div> <!-- end namespace {0} -->", name);
+ Output.WriteLine ();
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class PropertyComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "properties"; }
+ }
+
+ public override string ElementName {
+ get { return "property"; }
+ }
+
+ public override bool Find (XElement e)
+ {
+ if (!base.Find (e))
+ return false;
+ // the same Item (indexer) property can have different parameters
+ return e.GetAttribute ("params") == Source.GetAttribute ("params");
+ }
+
+ void GetAccessors (XElement element, out XElement getter, out XElement setter)
+ {
+ var methods = element.Element ("methods");
+
+ getter = null;
+ setter = null;
+
+ if (methods == null)
+ return;
+
+ foreach (var m in methods.Elements ("method")) {
+ var n = m.GetAttribute ("name");
+ if (n.StartsWith ("get_", StringComparison.Ordinal)) {
+ getter = m;
+ } else if (n.StartsWith ("set_", StringComparison.Ordinal)) {
+ setter = m;
+ }
+ }
+ }
+
+ MethodAttributes GetMethodAttributes (XElement getter, XElement setter)
+ {
+ if (getter == null)
+ return setter.GetMethodAttributes ();
+ else if (setter == null)
+ return getter.GetMethodAttributes ();
+
+ var gAttr = getter.GetMethodAttributes ();
+ var sAttr = setter.GetMethodAttributes ();
+ var g = gAttr & MethodAttributes.MemberAccessMask;
+ var s = sAttr & MethodAttributes.MemberAccessMask;
+ // Visibility is ordered numerically (higher value = more visible).
+ // We want the most visible.
+ var visibility = (MethodAttributes) Math.Max ((int) g, (int) s);
+ // Do a bitwise or with the rest of the flags
+ var g_no_visibility = gAttr & ~MethodAttributes.MemberAccessMask;
+ var s_no_visibility = sAttr & ~MethodAttributes.MemberAccessMask;
+ return g_no_visibility | s_no_visibility | visibility;
+ }
+
+ void RenderPropertyType (XElement source, XElement target, ApiChange change)
+ {
+ var srcType = source.GetTypeName ("ptype");
+ var tgtType = target.GetTypeName ("ptype");
+
+ if (srcType == tgtType) {
+ change.Append (tgtType);
+ } else {
+ change.AppendModified (srcType, tgtType, true);
+ }
+ change.Append (" ");
+ }
+
+ void RenderAccessors (XElement srcGetter, XElement tgtGetter, XElement srcSetter, XElement tgtSetter, ApiChange change)
+ {
+ // FIXME: this doesn't render changes in the accessor visibility (a protected setter can become public for instance).
+ change.Append (" {");
+ if (tgtGetter != null) {
+ if (srcGetter != null) {
+ change.Append (" ").Append ("get;");
+ } else {
+ change.Append (" ").AppendAdded ("get;");
+ }
+ } else if (srcGetter != null) {
+ change.Append (" ").AppendRemoved ("get;");
+ }
+
+ if (tgtSetter != null) {
+ if (srcSetter != null) {
+ change.Append (" ").Append ("set;");
+ } else {
+ change.Append (" ").AppendAdded ("set;");
+ }
+ } else if (srcSetter != null) {
+ change.Append (" ").AppendRemoved ("set;");
+ }
+
+ change.Append (" }");
+
+ // Ignore added property setters if asked to
+ if (srcSetter == null && tgtSetter != null && State.IgnoreAddedPropertySetters && !change.Breaking) {
+ change.AnyChange = false;
+ change.HasIgnoredChanges = true;
+ }
+ }
+
+ void RenderIndexers (List<XElement> srcIndexers, List<XElement> tgtIndexers, ApiChange change)
+ {
+ change.Append ("this [");
+ for (int i = 0; i < srcIndexers.Count; i++) {
+ var source = srcIndexers [i];
+ var target = tgtIndexers [i];
+
+ if (i > 0)
+ change.Append (", ");
+
+ var srcType = source.GetTypeName ("type");
+ var tgtType = target.GetTypeName ("type");
+ if (srcType == tgtType) {
+ change.Append (tgtType);
+ } else {
+ change.AppendModified (srcType, tgtType, true);
+ }
+ change.Append (" ");
+
+ var srcName = source.GetAttribute ("name");
+ var tgtName = target.GetAttribute ("name");
+ if (srcName == tgtName) {
+ change.Append (tgtName);
+ } else {
+ change.AppendModified (srcName, tgtName, true);
+ }
+ }
+ change.Append ("]");
+ }
+
+ public override bool Equals (XElement source, XElement target, ApiChanges changes)
+ {
+ if (base.Equals (source, target, changes))
+ return true;
+
+ XElement srcGetter, srcSetter;
+ XElement tgtGetter, tgtSetter;
+ GetAccessors (source, out srcGetter, out srcSetter);
+ GetAccessors (target, out tgtGetter, out tgtSetter);
+
+ List<XElement> srcIndexers = null;
+ List<XElement> tgtIndexers = null;
+ bool isIndexer = false;
+ if (srcGetter != null) {
+ srcIndexers = srcGetter.DescendantList ("parameters", "parameter");
+ tgtIndexers = tgtGetter.DescendantList ("parameters", "parameter");
+ isIndexer = srcIndexers != null && srcIndexers.Count > 0;
+ }
+
+ var change = new ApiChange ();
+ change.Header = "Modified " + GroupName;
+ RenderMethodAttributes (GetMethodAttributes (srcGetter, srcSetter), GetMethodAttributes (tgtGetter, tgtSetter), change);
+ RenderPropertyType (source, target, change);
+ if (isIndexer) {
+ RenderIndexers (srcIndexers, tgtIndexers, change);
+ } else {
+ RenderName (source, target, change);
+ }
+ RenderGenericParameters (source, target, change);
+ RenderAccessors (srcGetter, tgtGetter, srcSetter, tgtSetter, change);
+
+ changes.Add (source, target, change);
+
+ return false;
+ }
+
+ void GetProperties (XElement e, out bool @virtual, out bool @override, out bool @static, out bool getter, out bool setter, out bool family)
+ {
+ @virtual = @override = @static = getter = setter = family = false;
+
+ var methods = e.Element ("methods");
+ if (methods != null) {
+ foreach (var m in methods.Elements ("method")) {
+ @virtual |= m.IsTrue ("virtual");
+ @static |= m.IsTrue ("static");
+ var n = m.GetAttribute ("name");
+ getter |= n.StartsWith ("get_", StringComparison.Ordinal);
+ setter |= n.StartsWith ("set_", StringComparison.Ordinal);
+ var attribs = (MethodAttributes) Int32.Parse (m.GetAttribute ("attrib"));
+ family = ((attribs & MethodAttributes.Public) != MethodAttributes.Public);
+ @override |= (attribs & MethodAttributes.NewSlot) == 0;
+ }
+ }
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ string name = e.Attribute ("name").Value;
+ string ptype = e.GetTypeName ("ptype");
+
+ bool virt = false;
+ bool over = false;
+ bool stat = false;
+ bool getter = false;
+ bool setter = false;
+ bool family = false;
+ GetProperties (e, out virt, out over, out stat, out getter, out setter, out family);
+
+ var sb = new StringBuilder ();
+
+ sb.Append (family ? "protected " : "public ");
+ if (virt && !State.IgnoreVirtualChanges)
+ sb.Append (over ? "override " : "virtual ");
+ else if (stat)
+ sb.Append ("static ");
+ sb.Append (ptype).Append (' ').Append (name).Append (" { ");
+ if (getter)
+ sb.Append ("get; ");
+ if (setter)
+ sb.Append ("set; ");
+ sb.Append ("}");
+
+ return sb.ToString ();
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{D25986E2-7A41-4966-A26D-5614BAC7B8A7}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>Xamarin.ApiDiff</RootNamespace>
+ <AssemblyName>mono-api-html</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>true</Externalconsole>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Helpers.cs" />
+ <Compile Include="InterfaceComparer.cs" />
+ <Compile Include="NamespaceComparer.cs" />
+ <Compile Include="MemberComparer.cs" />
+ <Compile Include="FieldComparer.cs" />
+ <Compile Include="PropertyComparer.cs" />
+ <Compile Include="EventComparer.cs" />
+ <Compile Include="MethodComparer.cs" />
+ <Compile Include="ConstructorComparer.cs" />
+ <Compile Include="Comparer.cs" />
+ <Compile Include="AssemblyComparer.cs" />
+ <Compile Include="ClassComparer.cs" />
+ <Compile Include="ApiDiff.cs" />
+ <Compile Include="..\..\..\class\Mono.Options\Mono.Options\Options.cs">
+ <Link>Options.cs</Link>
+ </Compile>
+ <Compile Include="ApiChange.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
--- /dev/null
+ApiChange.cs
+ApiDiff.cs
+AssemblyComparer.cs
+ClassComparer.cs
+Comparer.cs
+ConstructorComparer.cs
+EventComparer.cs
+FieldComparer.cs
+Helpers.cs
+InterfaceComparer.cs
+MemberComparer.cs
+MethodComparer.cs
+NamespaceComparer.cs
+PropertyComparer.cs
+../../class/Mono.Options/Mono.Options/Options.cs
SUBDIRS =
include ../../../build/rules.make
-LOCAL_MCS_FLAGS = -r:Mono.Security.dll \
- -r:System.Security.dll \
- -r:System.Configuration.dll \
- -r:System.dll \
- -r:$(topdir)/class/lib/$(PROFILE)/Mono.Configuration.Crypto.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = Mono.Security System.Security System.Configuration System Mono.Configuration.Crypto
PROGRAM = mono-configuration-crypto.exe
PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/mono-configuration-crypto/$(FRAMEWORK_VERSION)
SUBDIRS =
include ../../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.dll -r:Mono.Security.dll -r:System.Security.dll -r:System.Configuration.dll -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System Mono.Security System.Security System.Configuration System.Xml
LIBRARY = Mono.Configuration.Crypto.dll
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/mono-configuration-crypto/$(FRAMEWORK_VERSION)
PROGRAM = mono-service.exe
+PROGRAM_SNK = ../../class/mono.snk
+
include ../../build/executable.make
-LOCAL_MCS_FLAGS = -r:System.ServiceProcess.dll -r:Mono.Posix.dll -r:System.dll -unsafe
+LOCAL_MCS_FLAGS = -unsafe -publicsign
+LIB_REFS = System.ServiceProcess Mono.Posix System
# Copied from library.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:Mono.Posix.dll -r:System.dll -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = Mono.Posix System System.Xml
PROGRAM = mono-shlib-cop.exe
PROGRAM = mono-symbolicate.exe
-LOCAL_MCS_FLAGS = \
- /r:Mono.Cecil.dll \
- /r:Mono.CompilerServices.SymbolWriter.dll \
- /r:System.Xml.dll \
- /r:System.Core.dll \
- /r:System.dll
+LOCAL_MCS_FLAGS =
+
+LIB_REFS = Mono.Cecil Mono.CompilerServices.SymbolWriter System.Xml System.Core System
include ../../build/executable.make
exit 1; \
fi
-BUILD_TEST_EXE = @\
+BUILD_TEST_EXE = \
rm -rf $(OUT_DIR); \
mkdir -p $(OUT_DIR); \
- $(MCS) -debug $(TEST_CS) -out:$(TEST_EXE)
+ $(CSCOMPILE) $(TEST_CS) -out:$(TEST_EXE)
check: test-local
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:Commons.Xml.Relaxng.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml Commons.Xml.Relaxng
PROGRAM = mono-xmltool.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:System.Data.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml System.Data System
PROGRAM = xsd.exe
include ../../build/executable.make
include ../../build/rules.make
PROGRAM = monop.exe
-LOCAL_MCS_FLAGS += -d:NO_AUTHENTICODE,STATIC,NO_SYMBOL_WRITER -r:System.dll
+LOCAL_MCS_FLAGS += -d:NO_AUTHENTICODE,STATIC,NO_SYMBOL_WRITER
+LIB_REFS = System
CLEAN_FILES = monop.exe monop2.exe *.mdb
include ../../build/rules.make
NO_TESTS = yes
-BUILD_FRAMEWORK = Microsoft.Build.Framework.dll
-BUILD_NEW_ENGINE = Microsoft.Build.dll
+BUILD_FRAMEWORK = Microsoft.Build.Framework
+BUILD_NEW_ENGINE = Microsoft.Build
INSTALL_FRAMEWORK_VERSION = $(FRAMEWORK_VERSION)
include ../xbuild/xbuild.make
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
NAME_SUFFIX = .v4.0
ASSEMBLY_VERSION = 4.0.0.0
-BUILD_FRAMEWORK := $(topdir)/class/lib/$(PROFILE)/$(BUILD_FRAMEWORK)
-BUILD_NEW_ENGINE := $(topdir)/class/lib/$(PROFILE)/$(BUILD_NEW_ENGINE)
INSTALL_FRAMEWORK_VERSION = 4.0
endif
endif
-LOCAL_MCS_FLAGS = -r:$(BUILD_FRAMEWORK) -r:$(BUILD_NEW_ENGINE)
+LOCAL_MCS_FLAGS =
+LIB_REFS = $(BUILD_FRAMEWORK) $(BUILD_NEW_ENGINE)
PROGRAM = msbuild.exe
include ../../build/executable.make
LIBRARY = nunitlite.dll
LIBRARY_SNK = ../../../../external/nunit-lite/NUnitLite-1.0.0/src/framework/nunit.snk
-LOCAL_MCS_FLAGS= /target:library /define:"__MOBILE__;TRACE;DEBUG;NET_4_0;CLR_4_0,NUNITLITE" /nostdlib -r:System.dll -r:System.Xml.dll -r:System.Core.dll -r:mscorlib.dll /warn:4 /noconfig /debug:full /debug+ /keyfile:$(LIBRARY_SNK) /optimize
+LOCAL_MCS_FLAGS= /target:library /define:"__MOBILE__;TRACE;DEBUG;NET_4_0;CLR_4_0,NUNITLITE" /warn:4 /keyfile:$(LIBRARY_SNK)
+LIB_REFS = System System.Xml System.Core
NO_TEST = yes
include ../../../build/rules.make
PROGRAM = nunit-lite-console.exe
-LOCAL_MCS_FLAGS = /r:nunitlite.dll
+LIB_REFS = nunitlite
+LOCAL_MCS_FLAGS =
include ../../../build/executable.make
NO_INSTALL = 1
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml
EXTRA_DISTFILES = \
Media/*.png \
PROGRAM = pdb2mdb.exe
-LOCAL_MCS_FLAGS = \
- /r:Mono.Cecil.dll \
- /r:Mono.CompilerServices.SymbolWriter.dll \
- /r:System.Core.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = Mono.Cecil Mono.CompilerServices.SymbolWriter System.Core
EXTRA_DISTFILES = LICENSE
CLEAN_FILES = resgen.exe
-LOCAL_MCS_FLAGS = -r:System.dll -r:System.Xml.dll -r:System.Core.dll
+LIB_REFS = System System.Xml System.Core
INSTALL_PROFILE := $(filter $(DEFAULT_PROFILE), $(PROFILE))
ifndef INSTALL_PROFILE
DIST_ONLY_SUBDIRS = certview
include ../../build/rules.make
-LOCAL_MCS_FLAGS = /lib:$(topdir)/class/lib/$(PROFILE) -r:Mono.Security.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = Mono.Security System
SECURITY_PROGRAMS = secutil.exe cert2spc.exe sn.exe makecert.exe chktrust.exe crlupdate.exe \
signcode.exe setreg.exe certmgr.exe caspol.exe permview.exe mozroots.exe cert-sync.exe
dist-local: dist-default
sn.exe $(topdir)/class/lib/$(PROFILE)/sn.exe: $(SN_SOURCES)
- $(CSCOMPILE) /out:$@ $(SN_SOURCES)
+ $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/Mono.Security.dll /out:$@ $(SN_SOURCES)
permview.exe: permview.cs
- $(CSCOMPILE) $^ $(HELPER_SOURCES) -r:Mono.Cecil.dll
+ $(CSCOMPILE) $^ $(HELPER_SOURCES) -r:$(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll
%.exe: %.cs $(HELPER_SOURCES)
- $(CSCOMPILE) $^
+ $(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/Mono.Security.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll $^
include ../../../build/rules.make
RESGEN = resgen
-LOCAL_MCS_FLAGS = /lib:$(topdir)/class/lib /r:Mono.Security.dll /r:System.Xml.dll /win32icon:mono.ico
+LIB_REFS = Mono.Security System.Xml
+LOCAL_MCS_FLAGS = /win32icon:mono.ico
# SWF isn't quite good enough to build this yet.
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml System
PROGRAM = sgen.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Runtime.Remoting.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Runtime.Remoting System
PROGRAM = soapsuds.exe
include ../../build/executable.make
-resource:$(dbmetal_src)/Language/EnglishWords.txt,$(ns).EnglishWords.txt \
-resource:$(dbmetal_src)/Language/FrenchWords.txt,$(ns).FrenchWords.txt \
-resource:$(dbmetal_src)/Language/GermanWords.txt,$(ns).GermanWords.txt \
- -r:System.Configuration.dll \
- -r:System.Core.dll \
- -r:System.Data.dll \
- -r:System.Data.Linq.dll \
- -r:System.Xml.dll \
- -r:System.dll
+ -publicsign
+LIB_REFS = System.Configuration System.Core System.Data System.Data.Linq System.Xml System
+
SQLMETAL_RESOURCES = \
$(dbmetal_src)/Language/EnglishWords.txt \
$(dbmetal_src)/Language/FrenchWords.txt \
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.dll -r:System.Xml.dll -r:System.Data.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System System.Xml System.Data
PROGRAM = sqlsharp.exe
EXTRA_DISTFILES = README
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = \
- -r:System.Core.dll \
- -r:System.Runtime.Serialization.dll \
- -r:System.ServiceModel.dll \
- -r:System.Web.Services.dll \
- -r:System.Configuration.dll \
- -r:System.dll \
- -r:System.Xml.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Core System.Runtime.Serialization System.ServiceModel System.Web.Services System.Configuration System System.Xml
PROGRAM = svcutil.exe
DEP_DIRS = linker
include ../../build/rules.make
-CECIL = $(topdir)/class/lib/$(PROFILE)/Mono.Cecil.dll
-LINKER = $(topdir)/class/lib/$(PROFILE)/monolinker.exe
-
-LOCAL_MCS_FLAGS = -r:System.dll -r:System.Core.dll -r:System.Xml.dll -r:$(LINKER) -r:$(CECIL)
+LOCAL_MCS_FLAGS = -r:$(topdir)/class/lib/$(PROFILE)/monolinker.exe
+LIB_REFS = System System.Core System.Xml Mono.Cecil
LIBRARY = Mono.Tuner.dll
SUBDIRS =
include ../../build/rules.make
-LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:System.Web.Services.dll -r:System.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = System.Xml System.Web.Services System
PROGRAM = wsdl.exe
include xbuild.make
-LOCAL_MCS_FLAGS = -r:$(XBUILD_FRAMEWORK) -r:$(XBUILD_UTILITIES) -r:$(XBUILD_ENGINE) -r:$(XBUILD_MSTASKS) -r:System.dll -r:System.Core.dll
+LOCAL_MCS_FLAGS =
+LIB_REFS = $(XBUILD_FRAMEWORK) $(XBUILD_UTILITIES) $(XBUILD_ENGINE) $(XBUILD_MSTASKS) $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core
PROGRAM = xbuild.exe
include ../../build/executable.make
NAME_SUFFIX = .Core
endif
-XBUILD_FRAMEWORK := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Framework.dll
-XBUILD_ENGINE := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Engine.dll
-XBUILD_UTILITIES := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Utilities$(NAME_SUFFIX).dll
-XBUILD_TASKS := $(topdir)/class/lib/$(PROFILE)/Mono.XBuild.Tasks.dll
-XBUILD_MSTASKS := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Tasks$(NAME_SUFFIX).dll
+XBUILD_FRAMEWORK := Microsoft.Build.Framework
+XBUILD_ENGINE := Microsoft.Build.Engine
+XBUILD_UTILITIES := Microsoft.Build.Utilities$(NAME_SUFFIX)
+XBUILD_TASKS := Mono.XBuild.Tasks
+XBUILD_MSTASKS := Microsoft.Build.Tasks$(NAME_SUFFIX)
ifeq (14.0, $(XBUILD_VERSION))
-XBUILD_MSTASKS := $(topdir)/class/lib/$(PROFILE)/Microsoft.Build.Tasks.Core.dll
+XBUILD_MSTASKS := Microsoft.Build.Tasks.Core
endif
XBUILD_ASSEMBLY_VERSION = $(XBUILD_VERSION).0.0
MINI_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME_EXECUTABLE)
RUNTIME_AOTCHECK = MONO_PATH="$(CLASS)$(PLATFORM_PATH_SEPARATOR)." $(RUNTIME_EXECUTABLE)
-MCS = $(MINI_RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162
+MCS = CSC_SDK_PATH_DISABLED= $(MINI_RUNTIME) $(CSC) -unsafe -nowarn:0162 -nologo -noconfig -r:$(CLASS)/mscorlib.dll -r:$(CLASS)/System.dll
ILASM = $(MINI_RUNTIME) $(CLASS)/ilasm.exe
AM_CFLAGS = \
CSFLAGS = -unsafe -nowarn:0219,0169,0414,0649
basic-simd.exe: basic-simd.cs TestDriver.dll
- $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:Mono.Simd.dll
+ $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:$(CLASS)/Mono.Simd.dll
nacl.exe: nacl.cs TestDriver.dll
- $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:Mono.Simd.dll
+ $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:$(CLASS)/Mono.Simd.dll
generics.exe: generics.cs TestDriver.dll generics-variant-types.dll
- $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:generics-variant-types.dll
+ $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:generics-variant-types.dll -r:$(CLASS)/System.Core.dll
%.exe: %.cs TestDriver.dll
$(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll