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


Felix Lee <flee@teleport.com>:
> 	cc_0=`echo "$(CC)" | sed -e 's/^/cc0:/'`
> 	# or this:
> 	#cc_0=testing
> 
> 	PREPEND=sed -e 's/^/pre:/'
> 	FLAGS=	
> 	first:
> 		make $(FLAGS) next
> 	next:
> 		echo "$(CC)"

ok, on second thought, a better way of doing this is to move
the computation of the value for CC into the shell commands,
something like so:

	cc_0=`echo "$(CC)" | sed -e 's/^/cc0:/'`
	# or this:
	#cc_0="  tes  ting  "

	PREPEND=sed -e 's/^/pre:/'
	FLAGS=

	first:
		cc=$(cc_0); \
		  cc=`echo "$$cc" | $(PREPEND)`; \
		  make $(FLAGS) "CC=$$cc" next
	next:
		echo "$(CC)"
--

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