%% Brian Minard <[EMAIL PROTECTED]> writes:

a  bm> In section 4.8 of the manual, it says that writing multiple
  bm> targets in a rule is the same as writing the rule multiple times.
  bm> That is, the following are equivalent.

  bm> a b: c # rule 1
  bm>   touch $@

  bm> and

  bm> a : c
  bm>   touch $@
  bm> b : c     touch $@

  bm> In the version of GNU Make that I am using, rule 1 only ever
  bm> rebuilds target "a".  It never attempts to build target "b".

Make will only ever try to build the first target in the makefile,
unless you give it some targets to build on the command line.  Since "a"
is the first target here, by default that's all make will build.

If you run "make a b", it will build both.  Most people use an "all:"
target in their makefiles and put that first, then list all the
top-level targets they want built by default as prerequisites:

  all: a b

  a b: c ; touch $@

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

Reply via email to