help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how can i get a list of prerequisites for a target


From: bhaskar . g
Subject: Re: how can i get a list of prerequisites for a target
Date: Wed, 28 May 2003 09:34:18 +0530

Hi Paul,

If I need to have this details else where, not in the command script. Is it 
possible?.

eg:

my makefile contains
"
include test.mk
all: a b c d
"
i am including a file test.mk in the makefile. In this test.mk I need to do the 
following
if d is mentioned in the all target I need to include
d.mk

Thanks for your help

Regards
bhaskar


                                                                                
                                                                          
                                                                                
                                                                          
                                                                      To:   
Bhaskar G/BTC/SC/address@hidden                                                
                                                                      cc:   
address@hidden                                                             
                                                                      Subject:  
  Re: how can i get a list of prerequisites for a target                  
                                                                                
                                                                          
               "Paul D. Smith" <address@hidden>                       
Classification:                                                                 
    
                                                                                
                                                                          
               Sent by:                                                         
                                                                          
               address@hidden                                                   
                                             
               .org                                                             
                                                                          
                                                                                
                                                                          
               05/27/2003 05:22 PM                                              
                                                                          
               Please respond to "Paul D. Smith"                                
                                                                          
                                                                                
                                                                          
                                                                                
                                                                          




%% address@hidden writes:

  bg> I have a target as the following:

  bg> all : lib target java idl

  bg> How can I get the list of prerequisites for the target all.

If you mean within the command script, then you can use the $^ automatic
variable:

    all: lib target java idl
            @echo $^

See the GNU make manual section on automatic variables for the complete
list.

--
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          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 Scientist


_______________________________________________
Help-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make








reply via email to

[Prev in Thread] Current Thread [Next in Thread]