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.224.177.12 with SMTP id bg12mr11634095qab.0.1343790925952; Tue, 31 Jul 2012 20:15:25 -0700 (PDT) Received: by 10.68.201.129 with SMTP id ka1mr3465544pbc.4.1343789455940; Tue, 31 Jul 2012 19:50:55 -0700 (PDT) Path: a15ni14727975qag.0!nntp.google.com!4no2219788pbo.1!news-out.google.com!p10ni9631378pbh.1!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 07:31:08 -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-29T07:31:08-05:00 List-Id: I found why I can't tell gnatmake to use different folder for object and executable at the same time. It is all gnatbind fault ;) Here is a picture of how gnatmake works, found after many trials. I put the step number in (N) below, which represent the order of build step. main.adb | V (1) gnatmake -c | V main.o, main.ali ---------+ | | V | (2) gnatbind -x | | | V | b~main.ads | b~main.adb | | | V V +-----+---------+ | V (3) gnatlink main.ali -L/usr/lib -lblas -llapack | V main.exe the problem is that gnatbind has no option to send the b~* files to somewhere other than the folder it is in. i.e. the main.ali and the b~* files need to be in the same folder. Hence, it I send the main.ali to another folder from where the source file is after step (1), then gnatbind will fail in step(2). There is NO option to tell gnatbind to send the b~* files to another folder. And gnatlink in step(3) wants main.ali and the b~files to be in the same folder. big mess. So brute force build everything was the the easy way out for me for now (until and if I have time time to learn gpr :) --Nasser