Project

General

Profile

Bug #11317

make '+=' needs surrounding whitespace

Added by Rich Lowe over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

'+' is a valid character in a make variable name, as such use of '+=' to append needs at least preceding whitespace

FOO+=bar assigns 'bar' to 'FOO+'.

FOO=foo
FOO+=bar

all:
    @echo "FOO: '$(FOO)'" 
    @echo "FOO+: '$(FOO+)'" 
; make -f ~/Makefile.test
FOO: 'foo'
FOO+: 'bar'

The following files violate this (and, in some cases, you have to wonder how the resulting builds work):

cmd/cmd-inet/usr.sbin/Makefile:SRCS+=        $(COMMONSRCS)
cmd/cmd-inet/usr.sbin/ipsecutils/Makefile:SRCS+=        $(COMMONSRCS)
cmd/fs.d/smbclnt/share/Makefile:CLOBBERFILES+=    $(LIBPROG) $(POFILE)
cmd/fs.d/smbclnt/smbutil/Makefile:CLOBBERFILES+=  $(POFILE) $(POFILES)
cmd/krb5/kadmin/server/Makefile:SRCS+=    $(DERIVED_OBJS:.o=.c)
cmd/krb5/kproplog/Makefile:SRCS+=    $(DERIVED_OBJS:.o=.c)
cmd/sgs/libldstab/Makefile.com:DUPOBJS+=
lib/krb5/kdb/Makefile.com:SRCS+=        $(DERIVED_OBJS:%.o=../%.c)
lib/krb5/kdb/Makefile.com:SRCS+=        $(KADM5SRCS)
lib/libgss/Makefile:XGETFLAGS+=    -a

History

#1

Updated by Rich Lowe over 1 year ago

  • Description updated (diff)

Also available in: Atom PDF