<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.PlainTextChar
        {font-family:"Calibri","sans-serif"}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Lex</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Brilliant answer.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">When I said pointing to here I meant currently editing file here!!!!</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I think I am going to go for the script(s) option that you recommend – it has the advantages that you mentioned and the technique can be applied for other
 VPATH builds we may need in the future. </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Colomban also mentioned this technique that could also be employed but I think I prefer the fixed path technique you mentioned (but see question below).</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoPlainText">“However, seeing the examples in your other mail, you could also use a script that runs make in $(PWD)/../../../build1/<common part>, like that:</p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoPlainText">                #!/bin/sh</p>
<p class="MsoPlainText"> </p>
<p class="MsoPlainText">                # find subdir of build1 to enter</p>
<p class="MsoPlainText">                pwd="$PWD"</p>
<p class="MsoPlainText">                cd ../..</p>
<p class="MsoPlainText">                sub="./${pwd:${#PWD}}"</p>
<p class="MsoPlainText">                # and enter, and run make in it</p>
<p class="MsoPlainText">                cd "../build1/$sub"</p>
<p class="MsoPlainText">                exec make $@</p>
<p class="MsoPlainText"> </p>
<p class="MsoPlainText">It has the advantage of not requiring to drop one makefile per source directory, you just use this script everywhere.  A more committed writer could also probably write a script that finds the recursion depth itself by e.g. going up
 until current directory is APPS, so the script could be run from any subdirectory of APPS, not only in APPS/*/*/”</p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Just one more question though – Eclipse allows you to specify a target for a build e.g. Debug or Release.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Is there a way to simulate this in Geany?  Can I have a build or build1A target selectable from a menu or something easy to use like that and then pass this
 as an argument to the build script?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Kind Regards</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Tim</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> users-bounces@lists.geany.org [mailto:users-bounces@lists.geany.org]
<b>On Behalf Of </b>Lex Trotman<br>
<b>Sent:</b> 22 January 2014 21:16<br>
<b>To:</b> Geany general discussion list<br>
<b>Subject:</b> Re: [Geany-Users] Makefile redirction for Make Command</span></p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> </p>
<div>
<p class="MsoNormal">On 22 January 2014 23:19, Tim Black <<a href="mailto:tblack@actia.co.uk" target="_blank">tblack@actia.co.uk</a>> wrote:</p>
<p class="MsoNormal">Hi thanks for getting back to me.<br>
<br>
Maybe I should have been a little more specific in my requirements:<br>
<br>
My folder structure looks like:<br>
<br>
/APPS<br>
        /application1<br>
                /src<br>
        /application2<br>
                /src    <- geany pointing to file here !  See note below</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Not sure what you mean by "pointing to here", do you mean 1) currently editing a file here, 2) Geany was started with here as pwd, 3) the wd of the make command is explicitly pointed here, or something else?</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">In each case </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">1) your command could be a script that is passed %d as an argument and then extracts the tail and prefixes it with /build1.  That is a single script and it doesn't even need to be in the application dir and can be filetype independent and
 an absolute path.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">2) a filetype independent build command runs a script (from the local dir) that knows to run the matching make in /build1/... This needs a script in each application dir.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">3) if its explicit, you might as well make it explicit to build1/... dir</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">You should probably also be looking at projects which can also set build commands and be more specific.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Personally I would use 2) having a hard wired script in each application dir, its simple, its explicit so the next maintainer can understand it, and it doesn't depend on Geany specifically so you can also run the script from the command
 line as well.  Sure it will take half an hour to set up twenty scripts, but then its done :)</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Cheers</p>
</div>
<div>
<p class="MsoNormal">Lex</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0cm 0cm 0cm 6.0pt; margin-left:4.8pt; margin-right:0cm">
<p class="MsoNormal">        /application3<br>
                /src<br>
<br>
... 20 or so applications ...<br>
<br>
/buid1<br>
        /application1<br>
                /src<br>
        /application2<br>
                /src    <- I want geany to execute the Makefile here<br>
        /application3<br>
                /src<br>
<br>
... 20 or so applications ...<br>
<br>
If I put a makefile (e.g. Makefile.geany) in /APPS/application2/src that points to the makefile in /build1/application2/src then regardless of which directory the file I am editing is the Make command will pick up the Makefile.geany and build application2.
  Obviously each Makefile.geany file would need to be customised to execute the correct target.<br>
<br>
My question is:<br>
<br>
What would I put in the Makefile.geany to run make in ../../build1/application/src or would a shell script (geany.make) be more sensible that simply executed e.g. pushd ../../build1/application/src; make; popd;  Every directory would have the geany.make script
 so I can simply have to put geany.make in the command settings.<br>
<br>
Your comments on the best course of action would be appreciated.<br>
<br>
Thanks again<br>
<br>
Tim<br>
[...]</p>
</blockquote>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; font-size:8pt">Important: This e-mail is intended for the above named only. It may contain private or confidential information, protected by copyright. If this has
 been received in error, it should be destroyed or the sender notified. It should not be used except by the intended recipient. The views contained in this email are those of the author and not necessarily those of Actia (UK) Ltd.</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; font-size:8pt">It is for the recipient to undertake any virus checking and no liability therefore is accepted by the sender.</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; font-size:8pt">Actia (UK) Ltd<br>
Registered Office: Unit 81 Mochdre Industrial Estate,<br>
Newtown, Powys. SY16 4LE.<br>
Company Reg. No: 2910867</span></p>
<p> </p>
</body>
</html>