View Single Post
  #8   (View Single Post)  
Old 23rd January 2009
s0xxx's Avatar
s0xxx s0xxx is offline
Package Pilot
 
Join Date: May 2008
Posts: 192
Default

Quote:
Originally Posted by nihonto View Post
By the way - what does the "+" sign mean in front of the equals sign? And I have even seen question marks in front of the equals sign. What do they indicate?
From a make(1) man page:
Code:
VARIABLE ASSIGNMENTS
     Variables in make are much like variables in the shell, and, by tradi-
     tion, consist of all upper-case letters.

   Variable assignment modifiers
     The five operators that can be used to assign values to variables are as
     follows:

     =       Assign the value to the variable.  Any previous value is overrid-
             den.

     +=      Append the value to the current value of the variable.

     ?=      Assign the value to the variable if it is not already defined.

     :=      Assign with expansion, i.e. expand the value before assigning it
             to the variable.  Normally, expansion is not done until the vari-
             able is referenced.  NOTE: References to undefined variables are
             not expanded.  This can cause problems when variable modifiers
             are used.

     !=      Expand the value and pass it to the shell for execution and
             assign the result to the variable.  Any newlines in the result
             are replaced with spaces.
http://netbsd.gw.com/cgi-bin/man-cgi...NetBSD-current
__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD
Reply With Quote