LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   makefile commands & options (http://www.linuxquestions.org/questions/linux-general-1/makefile-commands-and-options-399327/)

fpb 01-04-2006 02:31 AM

makefile commands & options
 
I've a Makefile for 2.6. Part of it goes like this:

######
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include modules
######

What is the difference between the ?= in KERNEL ?= and the := in PWD := ?
Why can't we just use a simple = instead?
Also, what are the M & LDDINC in the make command for? They're not used anywhere else in the Makefile as far as I can see.

The /../include part is particularly confusing. When I run the Makefile, my pwd is /home/username. There are no further directories under the pwd tree in this case, & especially not the include directory nor file, but make runs just fine.

Can somebody please explain?

1 last thing. It is kinda hard to search the Internet for information on command options & parameters like $*, $^, ?=, :=, M, LDDINC as most of those are just punctuation marks to search engines & hence ignored.
Does anybody have a good site to recommend for such info?

Thanks again.

320mb 01-04-2006 04:45 AM

Quote:

1 last thing. It is kinda hard to search the Internet for information on command options & parameters like $*, $^, ?=, :=, M, LDDINC as most of those are just punctuation marks to search engines & hence ignored.
Does anybody have a good site to recommend for such info?
the "man page" can explain these commands........
Code:

man bash


All times are GMT -5. The time now is 10:20 PM.