X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fbuild%2Flibrary.make;h=a8eb8ae17907b5b8cbf82b8b3d71d90f63610fc6;hb=0b7a3fae240f03ceaf5ea03556cd89603b6302ad;hp=c7cb676e824d3abf49fc7c262feb909a7f8854b6;hpb=6c035e225abc36a15501a03f574744824225350b;p=mono.git diff --git a/mcs/build/library.make b/mcs/build/library.make index c7cb676e824..a8eb8ae1790 100644 --- a/mcs/build/library.make +++ b/mcs/build/library.make @@ -19,6 +19,7 @@ sourcefile = $(depsdir)/$(PROFILE)_$(LIBRARY).sources $(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(COMMON_sourcefile) @echo Creating the per profile list $@ ... $(topdir)/tools/gensources.sh $(PROFILE_sources) $(PROFILE_excludes) > $@ +library_CLEAN_FILES += $(sourcefile) endif PLATFORM_excludes := $(wildcard $(LIBRARY).$(PLATFORM)-excludes) @@ -53,18 +54,23 @@ library_CLEAN_FILES += $(makefrag) $(the_lib) $(the_lib).so $(the_pdb) $(the_mdb ifdef LIBRARY_NEEDS_POSTPROCESSING build_libdir = fixup/$(PROFILE)/ -build_lib = $(build_libdir)$(LIBRARY_NAME) -library_CLEAN_FILES += $(build_lib) $(build_lib:.dll=.pdb) else -build_lib = $(the_lib) +ifdef LIBRARY_USE_INTERMEDIATE_FILE +build_libdir = $(the_libdir)tmp/ +else +build_libdir = $(the_libdir) +endif endif +build_lib = $(build_libdir)$(LIBRARY_NAME) +library_CLEAN_FILES += $(build_lib) $(build_lib:.dll=.pdb) + ifdef NO_SIGN_ASSEMBLY SN = : else -sn = $(topdir)/class/lib/net_1_1_bootstrap/sn.exe -SN = $(Q) MONO_PATH="$(topdir)/class/lib/net_1_1_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(sn) -SNFLAGS = -q -R +sn = $(topdir)/class/lib/basic/sn.exe +SN = $(Q) MONO_PATH="$(topdir)/class/lib/basic$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(sn) +SNFLAGS = -q endif ifeq ($(PLATFORM), win32) @@ -76,7 +82,9 @@ GACDIR = $(mono_libdir) GACROOT = $(DESTDIR)$(mono_libdir) endif +ifndef NO_BUILD all-local: $(the_lib) $(extra_targets) +endif ifeq ($(LIBRARY_COMPILE),$(BOOT_COMPILE)) is_boot=true @@ -85,7 +93,7 @@ is_boot=false endif csproj-local: - config_file=`basename $(LIBRARY_NAME) .dll`-$(PROFILE).input; \ + config_file=`basename $(LIBRARY) .dll`-$(PROFILE).input; \ echo $(thisdir):$$config_file >> $(topdir)/../mono/msvc/scripts/order; \ (echo $(is_boot); \ echo $(MCS); \ @@ -106,11 +114,17 @@ install-local uninstall-local: else +aot_lib = $(the_lib)$(PLATFORM_AOT_SUFFIX) +aot_libname = $(LIBRARY_NAME)$(PLATFORM_AOT_SUFFIX) + ifdef LIBRARY_INSTALL_DIR install-local: $(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR) $(INSTALL_LIB) $(the_lib) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME) test ! -f $(the_lib).mdb || $(INSTALL_LIB) $(the_lib).mdb $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME).mdb +ifdef PLATFORM_AOT_SUFFIX + test ! -f $(aot_lib) || $(INSTALL_LIB) $(aot_lib) $(DESTDIR)$(LIBRARY_INSTALL_DIR) +endif uninstall-local: -rm -f $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME) $(DESTDIR)$(LIBRARY_INSTALL_DIR)/$(LIBRARY_NAME).mdb @@ -174,9 +188,9 @@ dist-local: dist-default for f in `$(topdir)/tools/removecomments.sh $(wildcard *$(LIBRARY).sources)` $(TEST_FILES) ; do \ case $$f in \ ../*) : ;; \ - *) dest=`dirname $$f` ; \ + *) dest=`dirname "$$f"` ; \ case $$subs in *" $$dest "*) : ;; *) subs=" $$dest$$subs" ; $(MKINSTALLDIRS) $(distdir)/$$dest ;; esac ; \ - cp -p $$f $(distdir)/$$dest || exit 1 ;; \ + cp -p "$$f" $(distdir)/$$dest || exit 1 ;; \ esac ; done ; \ for d in . $$subs ; do \ case $$d in .) : ;; *) test ! -f $$d/ChangeLog || cp -p $$d/ChangeLog $(distdir)/$$d ;; esac ; done @@ -196,16 +210,6 @@ ifndef LIBRARY_SNK LIBRARY_SNK = $(topdir)/class/mono.snk endif -ifdef gacutil -$(gacutil): - cd $(topdir) && $(MAKE) PROFILE=net_1_1_bootstrap -endif - -ifdef sn -$(sn): - cd $(topdir) && $(MAKE) PROFILE=net_1_1_bootstrap -endif - ifdef BUILT_SOURCES ifeq (cat, $(PLATFORM_CHANGE_SEPARATOR_CMD)) BUILT_SOURCES_cmdline = $(BUILT_SOURCES) @@ -214,28 +218,33 @@ BUILT_SOURCES_cmdline = `echo $(BUILT_SOURCES) | $(PLATFORM_CHANGE_SEPARATOR_CMD endif endif -Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";) - # The library $(the_lib): $(the_libdir)/.stamp $(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp) -ifdef LIBRARY_USE_INTERMEDIATE_FILE - $(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$(LIBRARY_NAME) $(BUILT_SOURCES_cmdline) @$(response) - $(SN) $(SNFLAGS) $(LIBRARY_NAME) $(LIBRARY_SNK) - $(Q) mv $(LIBRARY_NAME) $@ - $(Q) test ! -f $(LIBRARY_NAME).mdb || mv $(LIBRARY_NAME).mdb $@.mdb - $(Q) test ! -f $(LIBRARY_NAME:.dll=.pdb) || mv $(LIBRARY_NAME:.dll=.pdb) $(dir $@)$(LIBRARY_NAME:.dll=.pdb) -else $(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response) - $(SN) $(SNFLAGS) $@ $(LIBRARY_SNK) + $(SN) $(SNFLAGS) -R $@ $(LIBRARY_SNK) + +ifdef LIBRARY_USE_INTERMEDIATE_FILE +$(the_lib): $(build_lib) + $(Q) cp $(build_lib) $@ + $(SN) $(SNFLAGS) -v $@ + $(Q) test ! -f $(build_lib).mdb || mv $(build_lib).mdb $@.mdb + $(Q) test ! -f $(build_lib:.dll=.pdb) || mv $(build_lib:.dll=.pdb) $(the_lib:.dll=.pdb) endif +ifdef PLATFORM_AOT_SUFFIX +Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";) +$(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib) + $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version $(the_lib) +endif ifdef ENABLE_AOT ifneq (,$(filter $(AOT_IN_PROFILES), $(PROFILE))) - $(Q_AOT) MONO_PATH=$(the_libdir) $(RUNTIME) --aot=bind-to-runtime-version $@ > $(PROFILE)_aot.log 2>&1 + +all-local: $(the_lib)$(PLATFORM_AOT_SUFFIX) + endif endif @@ -267,13 +276,9 @@ $(makefrag) $(test_response) $(test_makefrag) $(btest_response) $(btest_makefrag Q_MDOC_UP=$(if $(V),,@echo "MDOC-UP [$(PROFILE)] $(notdir $(@))";) MDOC_UP =$(Q_MDOC_UP) \ - if `echo $(PROFILE) | grep ^net_1_ > /dev/null 2>/dev/null` ; then \ - $(RUNTIME) $(topdir)/tools/mdoc/monodocer1.exe \ - -path:Documentation/en -assembly:$(the_lib) ; \ - else \ + MONO_PATH="$(topdir)/class/lib/net_4_0$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" \ $(RUNTIME) $(topdir)/tools/mdoc/mdoc.exe update --delete \ - -o Documentation/en $(the_lib) ; \ - fi + -o Documentation/en $(the_lib) doc-update-local: $(the_libdir)/.doc-stamp