Project

General

Profile

Bug #11317

Updated by Rich Lowe over 1 year ago

'+' 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+'. 

 <pre> 
 FOO=foo 
 FOO+=bar 

 all: 
	 @echo "FOO: '$(FOO)'" 
	 @echo "FOO+: '$(FOO+)'" 
 </pre> 

 <pre> 
 ; make -f ~/Makefile.test 
 FOO: 'foo' 
 FOO+: 'bar' 
 </pre> 

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

 <pre> 
 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/Makefile.asthdr: 	 boilerplate+="/*\n" \ 
 lib/Makefile.asthdr: 	 boilerplate+=" * BEGIN OpenSolaris section\n" \ 
 lib/Makefile.asthdr: 	 boilerplate+=" *     This is an unstable interface; changes may be made\n" \ 
 lib/Makefile.asthdr: 	 boilerplate+=" *     without notice.\n" \ 
 lib/Makefile.asthdr: 	 boilerplate+=" * END OpenSolaris section\n" \ 
 lib/Makefile.asthdr: 	 boilerplate+=" */\n" ; \ 
 lib/krb5/kdb/Makefile.com:SRCS+= 		 $(DERIVED_OBJS:%.o=../%.c) 
 lib/krb5/kdb/Makefile.com:SRCS+= 		 $(KADM5SRCS) 
 lib/libgss/Makefile:XGETFLAGS+= 	 -a 
 </pre>

Back