[xbuild] Add new reserved properties $(MSBuildThisFile*).
[mono.git] / mcs / mcs / Makefile
index 933fcf92a5812daa33923641f2e6a98f2a7a2dca..2a0b1b0c75ba99031f3b57d1f7f94881bf12cc52 100644 (file)
@@ -3,41 +3,36 @@ SUBDIRS :=
 include ../build/rules.make
 
 EXTRA_DISTFILES = \
-       *mcs.csproj             \
+       mcs.csproj              \
        compiler.doc            \
-       *mcs.sln                \
-       *cs-parser.jay          \
-       *.sources               \
-       generic.cs              \
+       mcs.sln         \
+       cs-parser.jay           \
+       mcs.exe.sources         \
        NOTES                   \
        TODO                    \
-       *mcs.exe.config
-
-ifeq (2.0, $(FRAMEWORK_VERSION))
-LOCAL_MCS_FLAGS += -d:GMCS_SOURCE
-COMPILER_NAME = gmcs
+       ikvm.cs
+
+ifeq (basic, $(PROFILE))
+PROGRAM = $(topdir)/class/lib/$(PROFILE)/basic.exe
+sourcefile = mcs.exe.sources
+else
+PROGRAM = $(topdir)/class/lib/build/mcs.exe
+LOCAL_MCS_FLAGS += -lib:$(topdir)/class/lib/build
 endif
 
-ifeq (2.1, $(FRAMEWORK_VERSION))
-LOCAL_MCS_FLAGS += -d:GMCS_SOURCE -d:SMCS_SOURCE
-COMPILER_NAME = smcs
-endif
+LOCAL_MCS_FLAGS += -d:STATIC
 
-ifeq (4.0, $(FRAMEWORK_VERSION))
-LOCAL_MCS_FLAGS += -d:GMCS_SOURCE
-COMPILER_NAME = dmcs
-endif
+PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/4.0
 
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
+PROGRAM_COMPILE = $(BOOT_COMPILE)
 
 BUILT_SOURCES = cs-parser.cs
 
-PROGRAM_COMPILE = $(BOOT_COMPILE)
-
 CLEAN_FILES += y.output
 
+# Use -cvt for parser debug version
 %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs
-       $(topdir)/jay/jay -cvt < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
+       $(topdir)/jay/jay -cv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
 
 
 KEEP_OUTPUT_FILE_COPY = yes
@@ -46,14 +41,14 @@ include ../build/executable.make
 
 csproj-local:
        config_file=`basename $(PROGRAM) .exe`-$(PROFILE).input; \
-       echo $(thisdir):$$config_file >> $(topdir)/../mono/msvc/scripts/order; \
+       echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
        (echo $(is_boot); \
        echo $(BOOTSTRAP_MCS);  \
        echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
        echo $(PROGRAM); \
        echo $(BUILT_SOURCES); \
        echo $(PROGRAM); \
-       echo $(response)) > $(topdir)/../mono/msvc/scripts/inputs/$$config_file
+       echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
 
 #
 # Below this line we have local targets used for testing and development
@@ -110,12 +105,6 @@ profile : $(PROGRAM)
 #
 # quick hack target, to quickly develop the gmcs compiler
 # Update manually.
-qh:
-       MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) ../class/lib/net_2_0/gmcs.exe  /codepage:65001 -d:GMCS_SOURCE  -d:NET_1_1 -d:NET_2_0 -debug -target:exe -out:gmcs.exe cs-parser.cs  @gmcs.exe.sources
-       @ cp $(COMPILER_NAME).exe* $(topdir)/class/lib/$(PROFILE)/
-
-pa: cs-parser.cs
-       MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) ../class/lib/net_2_0/gmcs.exe  /codepage:65001 -d:GMCS_SOURCE  -d:NET_1_1 -d:NET_2_0 -debug -target:exe -out:foo.exe cs-parser.cs foo.cs -main:X  @gmcs.exe.sources
 
 q: cs-parser.cs qh
        echo 'System.Console.WriteLine ("Hello");' | mono csharp.exe