dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/csant csant_task.c,1.4,1.5


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/csant csant_task.c,1.4,1.5
Date: Fri, 20 Dec 2002 20:53:39 -0500

Update of /cvsroot/dotgnu-pnet/pnet/csant
In directory subversions:/tmp/cvs-serv16546/csant

Modified Files:
        csant_task.c 
Log Message:
Add a 'delete' task to csant


Index: csant_task.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csant/csant_task.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** csant_task.c        22 Jul 2002 09:00:33 -0000      1.4
--- csant_task.c        21 Dec 2002 01:53:37 -0000      1.5
***************
*** 76,79 ****
--- 76,101 ----
  
  /*
+  * Delete a file from the build (for "clean" targets mainly)
+  */
+ static int Task_Delete(CSAntTask *task)
+ {
+       const char *file = CSAntTaskParam(task, "file");
+       const char *fail = CSAntTaskParam(task, "failonerror");
+       int retval;
+       if(!file)
+       {
+               fprintf(stderr,"no file to delete in <delete>\n");
+               return 0;
+       }
+       retval=ILDeleteFile(file);
+       if(retval && fail && !strcmp(fail,"true"))
+       {
+               fprintf(stderr,"could not delete '%s'\n",file);
+               return 0;
+       }
+       return 1;
+ }
+ 
+ /*
   * Invoke a sub-process containing another invocation of "csant".
   */
***************
*** 173,176 ****
--- 195,199 ----
        {"fail",                        Task_Fail},
        {"csant",                       Task_CSAnt},
+       {"delete",                      Task_Delete},
  };
  int const CSAntNumTasks = (sizeof(CSAntTasks) / sizeof(CSAntTaskInfo));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]