Re: differnce between += and := in Makefile obj-m line

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

 



On Sat, 8 Dec 2007, Amogh Hooshdar wrote:

> I found two types of Makefiles in some tutorials.
>
> One was like this:-
>
> obj-m := hello-1.o
>
> Other was like this:-
>
> obj-m += hello-1.o
>
> Both generated .ko files properly and I could insmod and rmmod the ko
> successfully. Please explain what is the difference between := and +=
> ?

in this case, nothing.  "=" is delayed evaluation (variables are not
expanded), while ":=" is immediate evaluation (variables are expanded
right now).  but if what you're assigning is a simple string like
that, it makes no difference.

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux