Page 22:
The paragraph: "Note that this makefile does define a variable called _, which you could access as $(_)
or even $_
. Using the underscore as a name is one way to indi- cate that the variable is just a placeholder, and its value should be ignored." should read "Note that this makefile defines a variable called _check
, which you could access as $(_check)
. Putting an underscore at the start of a name is one way to indicate that the variable is just a placeholder, and its value should be ignored."
Page 47:
In Listing 2-4 the final two lines are:
11 $(YS): ; @echo $(Y) $(Y)
12 $(ZS): ; @echo $(Z) $(Z)
They should read:
11 $(YS):
12 -> @echo $(Y) $(Y)
13 $(ZS):
14 -> @echo $(Z) $(Z)
This makes the line numbers referenced in the text correct but does not change the functionality of the makefile.
Page 48:
The text "The output shows that S
is first used twice on line 8 (the all target used XS
and YS
, which both use S
). Then S
appears again on line 4 (because YS
is used) and line 12 (because XS
is used)." should read "The output shows that S
is first used twice on line 8 (the all target used XS
and YS
, which both use S
). Then S
appears again on line 11 (because YS
is used) and line 12 (because XS
is used)"
Page 53:
The make output is shown as
$ make
make: Building foo.o
cc -c -o foo.o foo.c
Makefile:7: Building bar
But should be:
$ make
Makefile:2: Building foo.o
cc -c -o foo.o foo.c
Makefile:7: Building bar
and the line "Because no makefile or line number information gets printed, we know that a built-in rule was used here." removed.