From user-return-68927-apmail-ant-user-archive=ant.apache.org@ant.apache.org Fri Sep 18 16:42:35 2009 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 48581 invoked from network); 18 Sep 2009 16:42:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Sep 2009 16:42:35 -0000 Received: (qmail 22584 invoked by uid 500); 18 Sep 2009 16:42:34 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 22502 invoked by uid 500); 18 Sep 2009 16:42:33 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 22492 invoked by uid 99); 18 Sep 2009 16:42:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2009 16:42:33 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.219.224] (HELO mail-ew0-f224.google.com) (209.85.219.224) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2009 16:42:23 +0000 Received: by ewy24 with SMTP id 24so1453005ewy.22 for ; Fri, 18 Sep 2009 09:42:02 -0700 (PDT) Received: by 10.211.153.14 with SMTP id f14mr2303960ebo.36.1253292122171; Fri, 18 Sep 2009 09:42:02 -0700 (PDT) Received: from ?192.168.2.102? (dsl-087-195-184-143.solcon.nl [87.195.184.143]) by mx.google.com with ESMTPS id 10sm5310880eyd.40.2009.09.18.09.42.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 18 Sep 2009 09:42:01 -0700 (PDT) References: <68C42FBB-AE3B-4C2A-B94C-928CE9E25DE3@pensioenpage.com> <4AB39B72.1040800@stanford.edu> Message-Id: <268A3604-E415-4DDA-8ABC-562C5B1AC38B@pensioenpage.com> From: Ernst de Haan To: Ant Users List In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7C144) Mime-Version: 1.0 (iPhone Mail 7C144) Subject: Re: converting ant from a make file Date: Fri, 18 Sep 2009 18:41:56 +0200 Cc: Ant Users List X-Virus-Checked: Checked by ClamAV on apache.org The Ant way to process multiple Perl files would be: See? It's a different way of thinking... Met een vriendelijke groet, Ernst de Haan PensioenPage B.V. www.pensioenpage.com tel. (026) 364 56 34 Op 18 sep 2009 om 17:12 heeft veena pandit het volgende geschreven:\ > Do you mind posting a small example of the exec command with the > script: > for c in A B C D E; do? > > Thanks, > > Veena > > On Fri, Sep 18, 2009 at 10:38 AM, John Shott > wrote: > >> Veena: >> >> for c in A B C D E; do >>> perl ... >>> perl ... >>> perl... >>> - mkdir Backup >>> mv *bak Backup >>> >>> How do I move this script over to ant build.xml. >>> >>> >> This is probably a bit hard to answer. In principle, you can >> simply call >> the existing script using something like the exec task along with >> appropriate arg values. Or, you can consider breaking the script >> apart and >> call individual perl scripts with appropriate arguments. In general, >> however, I think that you'll be happier if you are able to use the >> built-in >> ant tasks wherever possible and resort to things like the exec task >> only >> when you absolutely need to. >> >> While I'm not a great authority on either make or ant, I did spend >> a great >> deal of time converting a good sized project with a bunch of >> Makefiles to an >> ant-based build. My experience is that if you try to simply do a >> line-by-line conversion of your Makefiles into the ant equivalent, >> that you >> will not be terribly happy with the result. Why? Ant is not make >> and they >> approach things differently. >> >> I suspect that you'll be a lot happier with the result if you look >> carefully at what Make is doing, make sure that you understand that >> fully, >> and then look at ant to see how some of it's tasks can be harnessed >> to do >> the same thing. For example, make tends to do things on a >> directory by >> directory basis whereas ant has a much more sophisticated (to me at >> least) >> means of specifying filesets that become the target of a task. >> Also, ant >> now has a wide range of tasks that perform interesting and often >> complex >> elements of a build in a single step. You may even find it >> desirable (if >> you have that flexibility) to restructure your source tree in a >> more "ant >> friendly" structure. You may also find that some of the things >> that your >> Perl scripts are doing are conveniently doable by ant tasks so that >> when >> everything is done, instead of having a handful of Makefiles plus >> Perl >> scripts that you may have a single build.xml file. Of course, not >> knowing >> what your Perl scripts are doing .... they may be doing things that >> would be >> hard to do in ant. >> >> I hope that helps, >> >> John >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org