# The rules for building a program.
base_prog = $(notdir $(PROGRAM))
-prog_dir := $(filter-out . ./, $(dir $(PROGRAM)))
ifndef sourcefile
sourcefile := $(base_prog).sources
endif
ifndef base_prog_config
base_prog_config := $(wildcard $(base_prog).config)
endif
-ifdef base_prog_config
-PROGRAM_config := $(PROGRAM).config
-endif
executable_CLEAN_FILES = *.exe $(PROGRAM) $(PROGRAM).mdb $(BUILT_SOURCES)
ifeq (cat,$(PLATFORM_CHANGE_SEPARATOR_CMD))
response = $(sourcefile)
else
-response = $(depsdir)/$(base_prog).response
+response = $(depsdir)/$(sourcefile).response
executable_CLEAN_FILES += $(response)
endif
-ifdef KEEP_OUTPUT_FILE_COPY
- COPY_CMD = cp
+the_libdir = $(topdir)/class/lib/$(PROFILE)/
+ifdef PROGRAM_USE_INTERMEDIATE_FILE
+build_libdir = $(the_libdir)tmp/
else
- COPY_CMD = mv
+build_libdir = $(the_libdir)
+endif
+
+ifdef base_prog_config
+PROGRAM_config := $(build_libdir)$(PROGRAM).config
endif
+the_lib = $(the_libdir)$(base_prog)
+build_lib = $(build_libdir)$(base_prog)
+
makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
pdb = $(patsubst %.exe,%.pdb,$(PROGRAM))
mdb = $(patsubst %.exe,%.mdb,$(PROGRAM))
executable_CLEAN_FILES += $(makefrag) $(pdb) $(mdb)
-all-local: $(PROGRAM) $(PROGRAM_config)
+all-local: $(the_lib) $(PROGRAM_config)
install-local: all-local
test-local: all-local
PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
endif
-install-local: $(PROGRAM) $(PROGRAM_config)
+install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
- $(INSTALL_BIN) $(PROGRAM) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
- test ! -f $(PROGRAM).mdb || $(INSTALL_BIN) $(PROGRAM).mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR)
+ $(INSTALL_BIN) $(the_lib) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
+ test ! -f $(the_lib).mdb || $(INSTALL_BIN) $(the_lib).mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR)
ifdef PROGRAM_config
$(INSTALL_DATA) $(PROGRAM_config) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
endif
PROGRAM_COMPILE = $(CSCOMPILE)
endif
-$(PROGRAM): $(BUILT_SOURCES) $(EXTRA_SOURCES) $(response) $(prog_dir:=/.stamp)
- $(PROGRAM_COMPILE) -target:exe -out:$(base_prog) $(BUILT_SOURCES) $(EXTRA_SOURCES) @$(response)
-ifneq ($(base_prog),$(PROGRAM))
- $(COPY_CMD) $(base_prog) $(PROGRAM)
- test ! -f $(base_prog).mdb || $(COPY_CMD) $(base_prog).mdb $(PROGRAM).mdb
+$(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)
+
+ifdef PROGRAM_USE_INTERMEDIATE_FILE
+$(the_lib): $(build_lib)
+ $(Q) cp $(build_lib) $@
+ $(Q) test ! -f $(build_lib).mdb || mv $(build_lib).mdb $@.mdb
+ $(Q) test ! -f $(build_lib:.exe=.pdb) || mv $(build_lib:.exe=.pdb) $(the_lib:.exe=.pdb)
endif
ifdef PROGRAM_config
endif
$(makefrag): $(sourcefile)
- @echo Creating $@ ...
- @sed 's,^,$(PROGRAM): ,' $< > $@
+# @echo Creating $@ ...
+ @sed 's,^,$(build_lib): ,' $< >$@
+ @if test ! -f $(sourcefile).makefrag; then :; else \
+ cat $(sourcefile).makefrag >> $@ ; \
+ echo '$@: $(sourcefile).makefrag' >> $@; \
+ echo '$(sourcefile).makefrag:' >> $@; fi
ifneq ($(response),$(sourcefile))
$(response): $(sourcefile)
- @echo Creating $@ ...
- @( $(PLATFORM_CHANGE_SEPARATOR_CMD) ) <$< >$@
+ @echo Converting $(sourcefile) to $@ ...
+ @cat $(sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
endif
-include $(makefrag)
include ../../../../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/RabbitMQ.Client.Apigen.exe
+PROGRAM = RabbitMQ.Client.Apigen.exe
LOCAL_MCS_FLAGS = /r:System.dll \
/r:System.Xml.dll \
SUBDIRS =
include ../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/ilasm.exe
+PROGRAM = ilasm.exe
BUILT_SOURCES = ILParser.cs
LOCAL_MCS_FLAGS = /lib:../class/lib/$(PROFILE) /r:../class/lib/$(PROFILE)/PEAPI.dll /r:Mono.CompilerServices.SymbolWriter.dll /r:Mono.Security.dll
ikvm.cs
ifeq (basic, $(PROFILE))
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/basic.exe
+PROGRAM = basic.exe
sourcefile = mcs.exe.sources
else
-PROGRAM = $(topdir)/class/lib/build/mcs.exe
+PROGRAM_USE_INTERMEDIATE_FILE = true
+PROGRAM = mcs.exe
LOCAL_MCS_FLAGS += -lib:$(topdir)/class/lib/build
endif
SUBDIRS =
include ../../../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/nunit-console.exe
+PROGRAM = nunit-console.exe
LOCAL_MCS_FLAGS = \
/r:nunit.framework.dll /r:nunit.util.dll /r:nunit.core.dll \
/r:nunit-console-runner.dll
include ../../build/rules.make
LOCAL_MCS_FLAGS = -r:Mono.Security.dll
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/al.exe
+PROGRAM = al.exe
CLEAN_FILES = al.exe al.exe.mdb
SUBDIRS =
include ../../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe
+PROGRAM = compiler-tester.exe
NO_INSTALL = yes
ifeq (moonlight, $(PROFILE))
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 -unsafe $(NOWARNS)
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/csharp.exe
+PROGRAM = csharp.exe
DISTFILES = repl.txt
include ../../build/rules.make
LOCAL_MCS_FLAGS =
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/culevel.exe
+PROGRAM = culevel.exe
CLEAN_FILES = culevel.exe culevel.exe.mdb
LOCAL_MCS_FLAGS = -r:Mono.Security.dll
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/gacutil.exe
+PROGRAM = gacutil.exe
include ../../build/executable.make
include ../../build/rules.make
LOCAL_MCS_FLAGS = -r:System.Xml.dll
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/genxs.exe
+PROGRAM = genxs.exe
include ../../build/executable.make
Descriptors/System.Web.xml \
Descriptors/Mono.Posix.xml \
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/monolinker.exe
+PROGRAM = monolinker.exe
$(PROGRAM): $(RESOURCES)
SUBDIRS =
include ../../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/mkbundle.exe
+PROGRAM = mkbundle.exe
OTHER_RES = template.c template_z.c template_main.c
SUBDIRS =
include ../../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/mono-service.exe
+PROGRAM = mono-service.exe
include ../../build/executable.make
uninstall-local: uninstall-extras
install-extras: $(gacutil)
- $(GACUTIL) /i $(PROGRAM) /f $(gacdir_flag) /root $(GACROOT)
+ $(GACUTIL) /i $(the_lib) /f $(gacdir_flag) /root $(GACROOT)
uninstall-extras: $(gacutil)
- -$(GACUTIL) /u $(PROGRAM:.exe=) $(gacdir_flag) /root $(GACROOT)
+ -$(GACUTIL) /u $(the_lib:.exe=) $(gacdir_flag) /root $(GACROOT)
include ../../build/rules.make
LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:System.Data.dll
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/xsd.exe
+PROGRAM = xsd.exe
include ../../build/executable.make
SUBDIRS =
include ../../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/monop.exe
+PROGRAM = monop.exe
CLEAN_FILES = monop.exe monop2.exe *.mdb
SUBDIRS =
include ../../build/rules.make
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/resgen.exe
+PROGRAM = resgen.exe
CLEAN_FILES = resgen.exe
LOCAL_MCS_FLAGS = -r:System.Xml.dll -r:System.Web.Services.dll
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/wsdl.exe
+PROGRAM = wsdl.exe
CLEAN_FILES = wsdl.exe wsdl2.exe *.mdb
endif
LOCAL_MCS_FLAGS = -r:$(BUILD_FRAMEWORK) -r:Microsoft.Build.Utilities$(NAME_SUFFIX).dll -r:$(BUILD_ENGINE)
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/xbuild.exe
+PROGRAM = xbuild.exe
include ../../build/executable.make
{
TlsData *tls = user_data;
- if (!tls)
+ if (!tls) {
/* Happens during startup */
+ tls->unwind_state.valid = FALSE;
return;
+ }
if (tls->tid != GetCurrentThreadId ()) {
/* Happens on osx because threads are not suspended using signals */
tls->unwind_state.unwind_data [MONO_UNWIND_DATA_JIT_TLS] = mono_native_tls_get_value (mono_jit_tls_id);
tls->unwind_state.unwind_data [MONO_UNWIND_DATA_DOMAIN] = mono_domain_get ();
}
+
+ if (!tls->unwind_state.unwind_data [MONO_UNWIND_DATA_DOMAIN]) {
+ /* Happens during startup */
+ tls->unwind_state.valid = FALSE;
+ return;
+ }
}
#define DEAD_REF ((gpointer)(gssize)0x2a2a2a2a2a2a2a2aULL)
memset (new_reg_locations, 0, sizeof (new_reg_locations));
while (TRUE) {
+ if (!tls->unwind_state.valid)
+ break;
+
memcpy (&ctx, &new_ctx, sizeof (ctx));
for (i = 0; i < MONO_MAX_IREGS; ++i) {
if (!tls)
return;
+ if (!tls->unwind_state.valid)
+ return;
+
for (findex = 0; findex < tls->nframes; findex ++) {
/* Load information saved by the !precise pass */
fi = &tls->frames [findex];