From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,163994d4f34e92d0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.216.62.206 with SMTP id y56mr971004wec.12.1343789445972; Tue, 31 Jul 2012 19:50:45 -0700 (PDT) Received: by 10.66.85.37 with SMTP id e5mr2953851paz.31.1343789445856; Tue, 31 Jul 2012 19:50:45 -0700 (PDT) Path: q11ni15937998wiw.1!nntp.google.com!12no2031496wil.1!news-out.google.com!g9ni9632825pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: how to tell gnatmake to send executables to a different directory when compiling multi source? Date: Sun, 29 Jul 2012 06:35:44 -0500 Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: nma@12000.org NNTP-Posting-Host: 9ii5QNw33OfeoTzEH8w9ug.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-07-29T06:35:44-05:00 List-Id: On 7/29/2012 5:00 AM, Dmitry A. Kazakov wrote: > On Sun, 29 Jul 2012 04:31:51 -0500, Nasser M. Abbasi wrote: > >> ps. I know gpr is supposed to be used for Ada, may be later when >> I learn, but for now, I am using gnatmake. > > and you do: > > gnatmake -Pproject.gpr > Yes, I understand. And when I build a Java application, the Java programmers tell me to go use Ant build scripts as it is the best thing also for building Java applications. And GPR is the best thing to build Ada programs. And Python programmers use Paver to build their applications. And each group of programmers make their own tool to build their own language. It takes time to learn each tool. Well, I use Make. In the Makefile I can not only build Java, Ada, latex, my HTML pages, C, C++, Fortran, do my daily backup, and whatever else I want to automate using it. Make is not specialized to one task, but can do multiple tasks. It might not be the best for one specific task, but it is the best general tool for many many different things. For this particular case, it was pretty easy to solve this problem. I simply build everything in the directory, then after the build is done, just use bash command to move the images and the object files to different directories. --------------------------------------------- EXECUTABLE=lap1 lap21 lap22 lap23 lap31 lap41 lap42 all: ${EXECUTABLE} ${EXECUTABLE}: gnatmake $@.adb -largs -L/usr/lib -lblas -llapack -mv *.ali ../obj -mv *.o ../obj -mv $@ ../bin ----------------------------- --Nasser