Move multi-line C# code fragment out of makefile
authorRaja R Harinath <harinath@hurrynot.org>
Fri, 2 Oct 2009 16:26:54 +0000 (16:26 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Fri, 2 Oct 2009 16:26:54 +0000 (16:26 -0000)
* profiles/basic.make (PROFILE_CS): Remove.
(PROFILE_CHECK_CSHARP): Move to ...
* common/basic-profile-check.cs: ... here.

svn path=/trunk/mcs/; revision=143296

mcs/build/ChangeLog
mcs/build/common/basic-profile-check.cs [new file with mode: 0644]
mcs/build/profiles/basic.make

index 2555f5490a3fa28dfbacd2382285f7344a31b698..9a2a9f09db4a93a8d961539021ddcafd20116f8b 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-02  Raja R Harinath  <harinath@hurrynot.org>
+
+       * profiles/basic.make (PROFILE_CS): Remove.
+       (PROFILE_CHECK_CSHARP): Move to ...
+       * common/basic-profile-check.cs: ... here.
+
 2009-10-02  Marek Safar  <marek.safar@gmail.com>
 
        * build/common.cs.in: Disabled 1.x only profiles.
diff --git a/mcs/build/common/basic-profile-check.cs b/mcs/build/common/basic-profile-check.cs
new file mode 100644 (file)
index 0000000..4354789
--- /dev/null
@@ -0,0 +1,12 @@
+class X {
+       // Check installed compiler
+       static void Generic<T> () { }
+
+       static int Main ()
+       {
+               // Check installed mscorlib
+               // Type is included in Mono 2.0+, and .NET 2.0 SP1+
+               object o = typeof (System.Runtime.GCLatencyMode);
+               return 0;
+       }
+}
index b68e6839153db1d2617ddfa1fc74952353b3ccc6..81f8c14ec0b442f402ea99b7cc5ed17f59e501e8 100644 (file)
@@ -38,14 +38,13 @@ clean-local: clean-profile
 endif
 
 clean-profile:
-       -rm -f $(PROFILE_CS) $(PROFILE_EXE) $(PROFILE_OUT) $(monolite_flag)
+       -rm -f $(PROFILE_EXE) $(PROFILE_OUT) $(monolite_flag)
 
 post-profile-cleanup:
        @rm -f $(monolite_flag)
 
-PROFILE_CS  = $(depsdir)/basic-profile-check.cs
-PROFILE_EXE = $(PROFILE_CS:.cs=.exe)
-PROFILE_OUT = $(PROFILE_CS:.cs=.out)
+PROFILE_EXE = $(depsdir)/basic-profile-check.exe
+PROFILE_OUT = $(PROFILE_EXE:.exe=.out)
 
 do-profile-check:
        @ok=:; \
@@ -80,28 +79,7 @@ do-profile-check-monolite: $(depsdir)/.stamp
 
 endif
 
-define PROFILE_CHECK_CSHARP
-class X {
-       // Check installed compiler
-       static void Generic<T> () { }
-
-       static int Main ()
-       {
-               // Check installed mscorlib
-               // Type is included in Mono 2.0+, and .NET 2.0 SP1+
-               object o = typeof (System.Runtime.GCLatencyMode);
-               
-               return 0;
-       }
-}
-endef
-
-export PROFILE_CHECK_CSHARP
-
-$(PROFILE_CS): $(topdir)/build/profiles/basic.make $(depsdir)/.stamp
-       echo "$$PROFILE_CHECK_CSHARP" > $@
-
-$(PROFILE_EXE): $(PROFILE_CS)
+$(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs
        $(BOOTSTRAP_MCS) /warn:0 /out:$@ $<
 
 $(PROFILE_OUT): $(PROFILE_EXE)