Merge pull request #334 from robwilkens/bug5747
[mono.git] / mcs / build / executable.make
index 8ca07d83d52428f96bf43cd4433df43908895521..47af19762128333d947a1198f1a3689b43849a8d 100644 (file)
@@ -11,8 +11,6 @@ ifndef base_prog_config
 base_prog_config := $(wildcard $(base_prog).config)
 endif
 
-executable_CLEAN_FILES = *.exe $(PROGRAM) $(PROGRAM).mdb $(BUILT_SOURCES)
-
 ifeq (cat,$(PLATFORM_CHANGE_SEPARATOR_CMD))
 response = $(sourcefile)
 else
@@ -20,12 +18,14 @@ response = $(depsdir)/$(sourcefile).response
 executable_CLEAN_FILES += $(response)
 endif
 
+ifndef the_libdir
 the_libdir = $(topdir)/class/lib/$(PROFILE)/
 ifdef PROGRAM_USE_INTERMEDIATE_FILE
 build_libdir = $(the_libdir)tmp/
 else
 build_libdir = $(the_libdir)
 endif
+endif
 
 ifdef base_prog_config
 PROGRAM_config := $(build_libdir)$(PROGRAM).config
@@ -34,10 +34,10 @@ endif
 the_lib = $(the_libdir)$(base_prog)
 build_lib = $(build_libdir)$(base_prog)
 
+executable_CLEAN_FILES += $(the_lib)   $(the_lib).so   $(the_lib).mdb   $(the_lib:.exe=.pdb)
+executable_CLEAN_FILES += $(build_lib) $(build_lib).so $(build_lib).mdb $(build_lib:.exe=.pdb)
+
 makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
-pdb = $(patsubst %.exe,%.pdb,$(PROGRAM))
-mdb = $(patsubst %.exe,%.mdb,$(PROGRAM))
-executable_CLEAN_FILES += $(makefrag) $(pdb) $(mdb)
 
 all-local: $(the_lib) $(PROGRAM_config)
 
@@ -154,6 +154,7 @@ csproj-local:
        echo $(PROGRAM); \
        echo $(BUILT_SOURCES_cmdline); \
        echo $(build_lib); \
+       echo $(FRAMEWORK_VERSION); \
        echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file