LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   about -d, -s with $@ in Makefile (https://www.linuxquestions.org/questions/programming-9/about-d-s-with-%24%40-in-makefile-438907/)

George2 04-26-2006 02:47 AM

about -d, -s with $@ in Makefile
 
Hello everyone,


What are the meaning of -s, -d with $@ in Makefile? For example,

[ -d $@ ] || (other commands)

[ -s $@ ] || (other commands)


thanks in advance,
George

ioerror 04-26-2006 04:59 AM

These are shell commands. See man test.

George2 04-26-2006 06:57 AM

Thanks ioerror,


Quote:

Originally Posted by ioerror
These are shell commands. See man test.

I got them! Previously, I thought they are make commands. :-)

What means $@? I can not find related descriptions in GNU make manual, even if it is used several times in it.


regards,
George

bigearsbilly 04-26-2006 07:20 AM

make doesn't have commands...

Code:

target:
        do something      # anything HERE is run with what's in $SHELL, e.g. /bin/sh

eg as above

/bin/sh -d blah.blah

ioerror 04-26-2006 07:29 AM

$@ expands to the current target.

George2 04-27-2006 05:02 AM

Thanks ioerror,


Quote:

Originally Posted by ioerror
$@ expands to the current target.

It makes senses.


regards,
George

George2 04-27-2006 05:04 AM

Thanks bigearsbilly,


Quote:

Originally Posted by bigearsbilly
make doesn't have commands...

Code:

target:
        do something      # anything HERE is run with what's in $SHELL, e.g. /bin/sh

eg as above

/bin/sh -d blah.blah

Do you mean the question I asked is dealing with shell commands and has nothing to do with make itself?


regards,
George


All times are GMT -5. The time now is 05:16 AM.