2007-09-04 Wade Berrier <wberrier@novell.com>
authorWade Berrier <wade@mono-cvs.ximian.com>
Tue, 4 Sep 2007 21:23:03 +0000 (21:23 -0000)
committerWade Berrier <wade@mono-cvs.ximian.com>
Tue, 4 Sep 2007 21:23:03 +0000 (21:23 -0000)
       * removecomments.sh: New script to aid 'make dist'
       Removes '#' comments (specifically for .sources files)
       Had to put in a separate script because alterint IFS to
       contain a newline doesn't work inside make

       * Makefile: include gensources.sh, the 2_1 profile needs it.
       (Should also make it possible to build the jvm profile from a
tarball)

2007-09-04  Wade Berrier  <wberrier@novell.com>

       * library.make: Glob for .sources for all profiles.
       Use tools/removecomments.sh to account for '#include' and
       comments, which are only used in the jvm profile at this point

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

mcs/build/ChangeLog
mcs/build/library.make
mcs/tools/ChangeLog
mcs/tools/Makefile
mcs/tools/removecomments.sh [new file with mode: 0755]

index 2411904024123b770f4485004d043409f7b17a8b..220b560f19f17daf6d84932526a5c7fbd5e7eac7 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-04  Wade Berrier  <wberrier@novell.com>
+
+       * library.make: Glob for .sources for all profiles.
+       Use tools/removecomments.sh to account for '#include' and
+       comments, which are only used in the jvm profile at this point
+
 2007-09-01  Jb Evain  <jbevain@novell.com>
 
        * Makefile: consider the net_2_1 profile.
index 2a541a1273f4a7ee2477565f77fe311b7fc83eb2..4e4dd38a21e710152045b0053eef3d5f2509b1f2 100644 (file)
@@ -228,7 +228,7 @@ run-test-ondotnet-lib: test-local
        $(TEST_HARNESS_POSTPROC_ONDOTNET) ; $$ok
 endif
 
-DISTFILES = $(sourcefile) $(EXTRA_DISTFILES)
+DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES)
 
 TEST_FILES =
 
@@ -241,9 +241,10 @@ TEST_FILES += `sed -e '/^$$/d' -e 's,^,Test/,' $(btest_sourcefile)`
 DISTFILES += $(btest_sourcefile)
 endif
 
+# make dist will collect files in .sources files from all profiles
 dist-local: dist-default
        subs=' ' ; \
-       for f in `cat $(sourcefile)` $(TEST_FILES) ; do \
+       for f in `$(topdir)/tools/removecomments.sh $(wildcard *$(LIBRARY).sources)` $(TEST_FILES) ; do \
          case $$f in \
          ../*) : ;; \
          *) dest=`dirname $$f` ; \
index 1322a8c432675b3470d0ac70ef6b88c5452f16b0..61d9c49cdd39b365be4a7a3a3c63a13348ed8e73 100644 (file)
@@ -1,3 +1,13 @@
+2007-09-04  Wade Berrier  <wberrier@novell.com>
+
+       * removecomments.sh: New script to aid 'make dist'
+       Removes '#' comments (specifically for .sources files)
+       Had to put in a separate script because alterint IFS to
+       contain a newline doesn't work inside make
+
+       * Makefile: include gensources.sh, the 2_1 profile needs it.
+       (Should also make it possible to build the jvm profile from a tarball)
+
 2007-07-27  Jb Evain  <jbevain@novell.com>
 
        * Makefile: integrate the tuner in the build.
index 82eefae91040b013376426f6d880a0fa48156dcd..3b555b27e64af011c4ce0fb4552074aba49cc692 100644 (file)
@@ -22,7 +22,8 @@ DISTFILES = \
        mono-win32-setup.nsi            \
        scan-tests.pl                   \
        tinderbox/smtp.c                \
-       tinderbox/tinderbox.sh
+       tinderbox/tinderbox.sh          \
+       gensources.sh
 
 test-local run-test-local run-test-ondotnet-local all-local install-local uninstall-local:
        @:
diff --git a/mcs/tools/removecomments.sh b/mcs/tools/removecomments.sh
new file mode 100755 (executable)
index 0000000..2876fb6
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Remove comments from .sources files since this usage of IFS is unsuable inside make
+#  (trouble with newlines)
+
+source_files="$@"
+
+OIFS=$IFS
+
+for f in $source_files ; do
+       IFS='
+\r'
+       for f in $(cat $f) ; do
+               case $f in
+                       \#*) ;;
+                       *) echo $f ;;
+               esac
+       done
+       OIFS=$IFS
+done
+
+IFS=$OIFS
+