X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fbuild%2Frules.make;h=cd1dd5fd30798b2981c444f3140518b61744b55a;hb=6f4c53862b2879c731c0f65d1f3af34399ed6008;hp=7225f0dd1e30fe54f5cac4080d5ade63236708a7;hpb=64f85a65b023522d3f34e9932e6a843e0ad8fc3b;p=mono.git diff --git a/mcs/build/rules.make b/mcs/build/rules.make index 7225f0dd1e3..cd1dd5fd307 100644 --- a/mcs/build/rules.make +++ b/mcs/build/rules.make @@ -7,33 +7,47 @@ # If you need to edit this file, that's a bug; email # peter@newton.cx about it. -# Some more variables. The leading period in the sed expression prevents -# thisdir = . from being changed into '..' for the toplevel directory. +empty := +space := $(empty) $(empty) -dots := $(shell echo $(thisdir) |sed -e 's,[^./][^/]*,..,g') -topdir := $(dots) +# given $(thisdir), we compute the path to the top directory +# +# split_path = $(filter-out .,$(subst /,$(space),$(1))) +# make_path = ./$(subst $(space),/,$(1)) +# dotdottify = $(patsubst %,..,$(1)) +# topdir = $(call make_path,$(call dotdottify,$(call split_path,$(thisdir)))) +topdir := ./$(subst $(space),/,$(patsubst %,..,$(filter-out .,$(subst /,$(space),$(thisdir))))) VERSION = 0.93 +Q=$(if $(V),,@) +# echo -e "\\t" does not work on some systems, so use 5 spaces +Q_MCS=$(if $(V),,@echo "MCS [$(PROFILE)] $(notdir $(@))";) + +ifndef BUILD_TOOLS_PROFILE +BUILD_TOOLS_PROFILE = build +endif + USE_MCS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS) USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS) USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) -CSCOMPILE = $(MCS) $(USE_MCS_FLAGS) +CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS) BASCOMPILE = $(MBAS) $(USE_MBAS_FLAGS) CCOMPILE = $(CC) $(USE_CFLAGS) -BOOT_COMPILE = $(BOOTSTRAP_MCS) $(USE_MCS_FLAGS) +BOOT_COMPILE = $(Q_MCS) $(BOOTSTRAP_MCS) $(USE_MCS_FLAGS) INSTALL = $(SHELL) $(topdir)/../mono/install-sh INSTALL_DATA = $(INSTALL) -c -m 644 INSTALL_BIN = $(INSTALL) -c -m 755 INSTALL_LIB = $(INSTALL_BIN) MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs -INTERNAL_MCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/mcs.exe INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe -INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/gmcs/gmcs.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 -INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/resgen.exe corlib = mscorlib.dll +INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/resgen.exe +RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN) + depsdir = $(topdir)/build/deps # Make sure these propagate if set manually @@ -89,7 +103,7 @@ endif # Rest of the configuration ifndef PROFILE -PROFILE = default +PROFILE = net_4_0 endif include $(topdir)/build/profiles/$(PROFILE).make @@ -101,7 +115,14 @@ else all: do-all endif -STD_TARGETS = test run-test run-test-ondotnet clean install uninstall +ifdef NO_INSTALL +GACUTIL = : +else +gacutil = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/gacutil.exe +GACUTIL = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(gacutil) +endif + +STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update $(STD_TARGETS): %: do-% @@ -111,6 +132,11 @@ do-run-test: do-%: %-recursive $(MAKE) $*-local +.PHONY: all-local $(STD_TARGETS:=-local) +all-local $(STD_TARGETS:=-local): + +csproj: do-csproj + # The way this is set up, any profile-specific subdirs list should # be listed _before_ including rules.make. However, the default # SUBDIRS list can come after, so don't use the eager := syntax when @@ -120,6 +146,10 @@ ifndef PROFILE_SUBDIRS PROFILE_SUBDIRS = $(SUBDIRS) endif +ifndef FRAMEWORK_VERSION_MAJOR +FRAMEWORK_VERSION_MAJOR = $(basename $(FRAMEWORK_VERSION)) +endif + %-recursive: @set . $$MAKEFLAGS; final_exit=:; \ case $$2 in --unix) shift ;; esac; \ @@ -154,11 +184,22 @@ dist-default: if test -f makefile; then m=m; fi; \ if test -f GNUmakefile; then m=GNUm; fi; \ for f in $${m}akefile $(DISTFILES) ; do \ - dest=`dirname $(distdir)/$$f` ; \ - $(MKINSTALLDIRS) $$dest && cp -p $$f $$dest || exit 1 ; \ + dest=`dirname "$(distdir)/$$f"` ; \ + $(MKINSTALLDIRS) $$dest && cp -p "$$f" $$dest || exit 1 ; \ done + if test -d Documentation ; then \ + find . -name '*.xml' > .files ; \ + tar cTf .files - | (cd $(distdir); tar xf -) ; \ + rm .files ; \ + fi -# Useful +%/.stamp: + $(MKINSTALLDIRS) $(@D) + touch $@ + +## Documentation stuff + +Q_MDOC =$(if $(V),,@echo "MDOC [$(PROFILE)] $(notdir $(@))";) +MDOC =$(Q_MDOC) 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 -withmcs: - $(MAKE) MCS='$(INTERNAL_MCS)' BOOTSTRAP_MCS='$(INTERNAL_MCS)' all