This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: rfc: new libgcc build mechanism


Donn Terry <donnte@microsoft.com>:
> 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.
--

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]