makefile problem should be very simple
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > makefile problem should be very simple




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    makefile problem should be very simple  
billy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-14-06 10:54 PM

gmake -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for hppa2.0n-hp-hpux11.00
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000

I have:

projects := ldb lde ldg ldm ldf ldw lbf

all : $(projects)

$(projects) :
<commands>

$(substr ldb,,$(projects)) : ldb

I need to set the other 6 to be dependent on ldb finishing.  The
example I found shows this to work, but it doesn't






[ Post a follow-up to this message ]



    Re: makefile problem should be very simple  
Paul D. Smith


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-14-06 10:54 PM

%% "billy" <bp1497@att.com> writes:

b> projects := ldb lde ldg ldm ldf ldw lbf

b> all : $(projects)

b> $(projects) :
b>        <commands>

b> $(substr ldb,,$(projects)) : ldb

You should use filter-out here, not substr:

$(filter-out ldb,$(projects)) : ldb

b> I need to set the other 6 to be dependent on ldb finishing.  The
b> example I found shows this to work, but it doesn't

Your makefile is correct as written here and will do what you appear to
expect: none of the other targets will start until "ldb" is finished.

If that's not what's happening then there is something else going on
which you have not described here: maybe the makefile you're actually
running is not the same as the one you list here.

--
----------------------------------------------------------------------------
---
Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
http://www.gnu.org                      http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientis
t





[ Post a follow-up to this message ]



    Re: makefile problem should be very simple  
billy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-14-06 10:54 PM

thanks, worked like a charm 






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:49 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register