Re: /usr/src/linux/Makefile

John Alvord (
Tue, 3 Dec 1996 11:30:34 -0500 (EST)

On Tue, 3 Dec 1996, Xie Weifang wrote:

> Hi,
> I had read the /usr/src/linux/README file and the Makefile.
> but there are some sentences I do not understand. the following
> is what I cut from Makefile(Linux1.2.8)
> ==============================================
> CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
> else if [ -x /bin/bash ]; then echo /bin/bash; \
> else echo sh; fi ; fi)
> TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
> =================================================
> is the .EXPORT_ALL_VARIABLES a new make instruction(like .DEFAULT)?
The make used in Linux is the GNU make. When .EXPORT_ALL_VARIABLES is
a target, then all sub-processes are started with all the variables set
up. In my experience, this mostly affects makes which are run from make.

> is the "$$BASH" and other $$XXX right? or it should be "$BASH"?
$ normally has a special meaning. $$ means a single $, like \ and \\
in regular expressions.
> what the assignment := mean?
In make, an equal sign is a definition, which may be performed over and
over again if any variables remain. A := is used to define "simply defined
variable" which is expanded once and for all.

> I am sorry to ask so simple question, but I could not find useful
> information by myself in my Linux(the make man page do not include
> the syntax of Makefile) and Internet.
> Perhaps you can tell where to find the makefile syntax of Linux.
On my system, there was a set of info files which explained GNU make
syntax. I presume it came with the package.
> Thank you!
> Duan Zhenhai
john alvord