The Make manual, "Canned sequences of commands", states:

  For example, using this canned sequence:

  define frobnicate
  @echo "frobnicating target $@"
  frob-step-1 $< -o $@-step-1
  frob-step-2 $@-step-1 -o $@
  endef

  make will not echo the first line, the echo command. But it will
  echo the following two command lines.

However, make-3.79.1 fails to echo either of the frob-step-N
commands.

Attached is the Makefile I used.  I added dummy frob-step-{1,2}
commands to my PATH, and run make, and the only output is

  frobnicating target canit

whereas I expect

  frobnicating target canit
  frob-step-1  -o canit-step-1
  frob-step-2 canit-step-1 -o canit

My system is Linux/x86 2.2.19, glibc 2.2.3.

-Scott
# Makefile

define frobnicate
@echo "frobnicating target $@"
frob-step-1 $< -o $@-step-1
frob-step-2 $@-step-1 -o $@
endef

canit:
        $(frobnicate)

Reply via email to