tech-toolchain archive

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

Re: make: empty lhs for SysV style subst

On Fri, 04 Mar 2011, Simon J. Gerraty wrote:
Our make seems to be the odd man out (esp wrt Solaris) for the following makefile:

FOO ?=
FOOBAR = $(FOO:=bar)
        @echo FOOBAR = $(FOOBAR)

if FOO is empty it should print


Yes, it should append "bar" to each word, doing nothing if there are no words.

+               if (pattern.leftLen == 0 && *nstr == '\0') {
+                   newStr = nstr;      /* special case */
+               } else {
+                   newStr = VarModify(ctxt, &parsestate, nstr,
+                                      VarSYSVMatch,
+                                      &pattern);
+               }

Will this do the right thing in the presence of changes to the way words are separated (:tsX, :tW, and friends)?

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index