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/[EMAIL PROTECTED]                                                
                                                                      cc:   [EMAIL 
PROTECTED]                                                             
                                                                      Subject:    Re: 
how can i get a list of prerequisites for a target                  
                                                                                       
                                                                   
               "Paul D. Smith" <[EMAIL PROTECTED]>                       
Classification:                                                                     
                                                                                       
                                                                   
               Sent by:                                                                
                                                                   
               [EMAIL PROTECTED]                                                       
                                         
               .org                                                                    
                                                                   
                                                                                       
                                                                   
               05/27/2003 05:22 PM                                                     
                                                                   
               Please respond to "Paul D. Smith"                                       
                                                                   
                                                                                       
                                                                   
                                                                                       
                                                                   




%% [EMAIL PROTECTED] 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 <[EMAIL PROTECTED]>          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
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make






_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to