Index: NAntTask.cs
===================================================================
RCS file: /cvsroot/nant/nant/src/NAnt.Core/Tasks/NAntTask.cs,v
retrieving revision 1.24
diff -u -r1.24 NAntTask.cs
--- NAntTask.cs	19 Feb 2004 20:39:00 -0000	1.24
+++ NAntTask.cs	6 Mar 2004 11:06:00 -0000
@@ -26,6 +26,7 @@
 
 using NAnt.Core.Attributes;
 using NAnt.Core.Util;
+using NAnt.Core.Types;
 
 namespace NAnt.Core.Tasks {
     /// <summary>
@@ -63,6 +64,7 @@
         #region Private Instance Fields
 
         private FileInfo _buildFile;
+        private FileSet _buildFileSet = new FileSet();
         private string _target;
         private bool _inheritAll = true;
         private ArrayList _overrideProperties = new ArrayList();
@@ -74,7 +76,7 @@
         /// <summary>
         /// The build file to build.
         /// </summary>
-        [TaskAttribute("buildfile", Required=true) ]
+        [TaskAttribute("buildfile")]
         public FileInfo BuildFile {
             get { return _buildFile; }
             set { _buildFile = value; }
@@ -93,6 +95,15 @@
         }
 
         /// <summary>
+        /// Used to specify a list of build files to process.
+        /// </summary>
+        [BuildElement("buildfiles")]
+        public virtual FileSet BuildFilesFileSet {
+            get { return _buildFileSet; }
+            set { _buildFileSet = value; }
+        }
+
+        /// <summary>
         /// Specifies whether current property values should be inherited by 
         /// the executed project. The default is <see langword="false" />.
         /// </summary>
@@ -117,11 +128,28 @@
         #region Override implementation of Task
 
         protected override void ExecuteTask() {
-            Log(Level.Info, LogPrefix + "{0} {1}", BuildFile.FullName, DefaultTarget);
+            // run the build file specified in an attribute
+            int buildFileCount = 0;
+            if (BuildFile != null) {
+                RunBuild(BuildFile);
+                buildFileCount++;
+            };
+            // run all build files specified in the fileset
+            foreach (string s in BuildFilesFileSet.FileNames) {
+                RunBuild(new FileInfo(s));
+                buildFileCount++;
+            }
+            if (buildFileCount == 0) {
+                throw new BuildException("You need to specify at least one build file.", Location);
+            }
+        }
+
+        private void RunBuild(FileInfo buildFile) {
+            Log(Level.Info, LogPrefix + "{0} {1}", buildFile.FullName, DefaultTarget);
             Log(Level.Info, string.Empty);
 
             // create new project with same threshold as current project and increased indentation level
-            Project project = new Project(BuildFile.FullName, Project.Threshold, 
+            Project project = new Project(buildFile.FullName, Project.Threshold, 
                 Project.IndentationLevel + 1);
 
             // add listeners of current project to new project
@@ -177,7 +205,7 @@
             try {
                 // change current directory to directory of the build file that
                 // will be run
-                Directory.SetCurrentDirectory(BuildFile.DirectoryName);
+                Directory.SetCurrentDirectory(buildFile.DirectoryName);
                 // run the given build
                 if (!project.Run()) {
                     throw new BuildException("Nested build failed.  Refer to build log for exact reason.");
