1#!/bin/sh
2
3# Remove comments from .sources files since this usage of IFS is unsuable inside make
4#  (trouble with newlines)
5
6source_files="$@"
7
8OIFS=$IFS
9
10for f in $source_files ; do
11	IFS='
12
13'
14	for f in `cat $f` ; do
15		case $f in
16			\#*) ;;
17			*)
18			# some lines in .sources may contain quick syntax to exclude files i.e.:
19			# ../dir/*.cs:File1.cs,File2.cs (include everything except File1.cs and File2.cs)
20			# let's drop that ":files" suffix
21			for line in `echo $f | cut -d \: -f 1` ; do
22				echo $line
23			done
24		esac
25	done
26	OIFS=$IFS
27done
28
29IFS=$OIFS
30
31