c++.command-line - Smake comparisions
- Rajiv Bhagwat (12/12) Sep 07 2001 The following makefile is indicating that the smake is goofing up. Or am...
- Walter (4/16) Sep 07 2001 The $* is only valid for lines that start with whitespace. A line not
- Rajiv Bhagwat (6/22) Sep 08 2001 Well, that explains it. Any logic behind it?
- Walter (3/30) Sep 08 2001 Makefiles are collections of random ad-hoc rules that conflict with each
The following makefile is indicating that the smake is goofing up. Or am I? ------------- all: echo "$*" !if "$*" == "all" echo Target is "$*" !else echo But target is "$*" !endif ------------- It prints "But...". So does 'maker' and even 'nmake' after complaining about $*. Saying 'smake all' produces exactly the same result. What goes?
Sep 07 2001
Rajiv Bhagwat wrote in message <9nb7nk$1oii$1 digitaldaemon.com>...The following makefile is indicating that the smake is goofing up. Or am I? ------------- all: echo "$*" !if "$*" == "all" echo Target is "$*" !else echo But target is "$*" !endif ------------- It prints "But...". So does 'maker' and even 'nmake' after complainingabout$*. Saying 'smake all' produces exactly the same result. What goes?The $* is only valid for lines that start with whitespace. A line not starting with whitespace breaks the expansion, as your !if does.
Sep 07 2001
Well, that explains it. Any logic behind it? We need to practice more 'modeless' programming to avoid such confusions. -- Rajiv Walter <walter digitalmars.com> wrote in message news:9nc5sg$2933$1 digitaldaemon.com...Rajiv Bhagwat wrote in message <9nb7nk$1oii$1 digitaldaemon.com>...I?The following makefile is indicating that the smake is goofing up. Or am------------- all: echo "$*" !if "$*" == "all" echo Target is "$*" !else echo But target is "$*" !endif ------------- It prints "But...". So does 'maker' and even 'nmake' after complainingabout$*. Saying 'smake all' produces exactly the same result. What goes?The $* is only valid for lines that start with whitespace. A line not starting with whitespace breaks the expansion, as your !if does.
Sep 08 2001
Makefiles are collections of random ad-hoc rules that conflict with each other. Rajiv Bhagwat wrote in message <9ncqpp$2n35$1 digitaldaemon.com>...Well, that explains it. Any logic behind it? We need to practice more 'modeless' programming to avoid such confusions. -- Rajiv Walter <walter digitalmars.com> wrote in message news:9nc5sg$2933$1 digitaldaemon.com...Rajiv Bhagwat wrote in message <9nb7nk$1oii$1 digitaldaemon.com>...I?The following makefile is indicating that the smake is goofing up. Or am------------- all: echo "$*" !if "$*" == "all" echo Target is "$*" !else echo But target is "$*" !endif ------------- It prints "But...". So does 'maker' and even 'nmake' after complainingabout$*. Saying 'smake all' produces exactly the same result. What goes?The $* is only valid for lines that start with whitespace. A line not starting with whitespace breaks the expansion, as your !if does.
Sep 08 2001