Very simply:
Code:
VAR1 = first # correct - valid comment
VAR2 = second# Might work on some platforms - but not necessarily portable
VAR3 = $(VAR1)_last # OK: will always work
VAR4 = $(VAR2)_last # Might work, might not work
default:
@echo $(VAR3)
@echo $(VAR4)
For example, it works fine with MSVS "nmake":
Quote:
C:\temp>nmake
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
first_last
second_last
|
But your mileage may vary from platform to platform.
That's even MORE true of "special" (and completely non-standard) functions like "strip()".
Unless you're very, very sure you really WANT to render your makefile non-portable, you should use standard "make" syntax whenever/wherever possible.
IMHO .. PSM