Donn Terry <[EMAIL PROTECTED]>:
> I don't follow.  The inner echo outputs the value of the
> CC macro, and munges it for the "stage" change.  The outer
> echo makes it a string (as opposed to a command to be
> executed) to pass it to the second sed to do .. insertion.

sorry, that makes no sense to me.  I think you're confused.
this is perfectly legal make & sh:

  FOO=`                                         \
    case '$(CC)' in                             \
      (stage*)                                  \
        echo '$(CC)' |                          \
          sed -e 's|stage|../stage|g'           \
        ;;                                      \
      (*)                                       \
        echo '$(CC)'                            \
        ;;                                      \
    esac |                                      \
      $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)       \
  `

you don't need to wrap the case statement in an `echo`.  I
put while loops and case statements and if statements in
middle of pipelines all the time.

btw, using balanced () for case statements isn't portable.
--

Reply via email to