9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mk delayed evaluation
@ 2006-01-16 21:49 Skip Tavakkolian
  2006-01-17  0:23 ` erik quanstrom
  2006-01-17  0:41 ` Russ Cox
  0 siblings, 2 replies; 5+ messages in thread
From: Skip Tavakkolian @ 2006-01-16 21:49 UTC (permalink / raw)
  To: 9fans

i'm not finding it in docs. i want to delay the evaluation of $stem
in a variable until the rule is applied; how is that done?

example:

CFLAGS=-Zi -Fb $stem.PDB	# yes, funky MS flags

%.$O:	%.c
	$CC $CFLAGS $stem.c



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] mk delayed evaluation
  2006-01-16 21:49 [9fans] mk delayed evaluation Skip Tavakkolian
@ 2006-01-17  0:23 ` erik quanstrom
  2006-01-17  1:33   ` Skip Tavakkolian
  2006-01-17  0:41 ` Russ Cox
  1 sibling, 1 reply; 5+ messages in thread
From: erik quanstrom @ 2006-01-17  0:23 UTC (permalink / raw)
  To: 9fans, Skip Tavakkolian

i think this is what you want

CFLAGS=-Zi -Fb 

%.$O:	%.c
	$$ $CFLAGS $stem.PDB $stem.c

Skip Tavakkolian <9nut@9netics.com> writes

| 
| i'm not finding it in docs. i want to delay the evaluation of $stem
| in a variable until the rule is applied; how is that done?
| 
| example:
| 
| CFLAGS=-Zi -Fb $stem.PDB	# yes, funky MS flags
| 
| %.$O:	%.c
| 	$CC $CFLAGS $stem.c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] mk delayed evaluation
  2006-01-16 21:49 [9fans] mk delayed evaluation Skip Tavakkolian
  2006-01-17  0:23 ` erik quanstrom
@ 2006-01-17  0:41 ` Russ Cox
  1 sibling, 0 replies; 5+ messages in thread
From: Russ Cox @ 2006-01-17  0:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> i'm not finding it in docs. i want to delay the evaluation of $stem
> in a variable until the rule is applied; how is that done?

it isn't.  sorry.
russ


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] mk delayed evaluation
  2006-01-17  1:33   ` Skip Tavakkolian
@ 2006-01-17  0:54     ` erik quanstrom
  0 siblings, 0 replies; 5+ messages in thread
From: erik quanstrom @ 2006-01-17  0:54 UTC (permalink / raw)
  To: 9fans, Skip Tavakkolian

perhaps you could write a script, mscompile, that intercepts 
all the arguments and rewrites them appropriately?

- erik

Skip Tavakkolian <9nut@9netics.com> writes

| 
| i'm sure i don't want that. there are many more params in CFLAGS
| and remembering which one should be last is a hack; as is having
| to change the rules every time i want to exclude the '-Fb $stem.PDB'
| 
| > i think this is what you want
| > 
| > CFLAGS=-Zi -Fb 
| > 
| > %.$O:	%.c
| > 	$$ $CFLAGS $stem.PDB $stem.c
| > 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] mk delayed evaluation
  2006-01-17  0:23 ` erik quanstrom
@ 2006-01-17  1:33   ` Skip Tavakkolian
  2006-01-17  0:54     ` erik quanstrom
  0 siblings, 1 reply; 5+ messages in thread
From: Skip Tavakkolian @ 2006-01-17  1:33 UTC (permalink / raw)
  To: 9fans

i'm sure i don't want that. there are many more params in CFLAGS
and remembering which one should be last is a hack; as is having
to change the rules every time i want to exclude the '-Fb $stem.PDB'

> i think this is what you want
> 
> CFLAGS=-Zi -Fb 
> 
> %.$O:	%.c
> 	$$ $CFLAGS $stem.PDB $stem.c
> 
> Skip Tavakkolian <9nut@9netics.com> writes
> 
> | 
> | i'm not finding it in docs. i want to delay the evaluation of $stem
> | in a variable until the rule is applied; how is that done?
> | 
> | example:
> | 
> | CFLAGS=-Zi -Fb $stem.PDB	# yes, funky MS flags
> | 
> | %.$O:	%.c
> | 	$CC $CFLAGS $stem.c



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-17  1:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-16 21:49 [9fans] mk delayed evaluation Skip Tavakkolian
2006-01-17  0:23 ` erik quanstrom
2006-01-17  1:33   ` Skip Tavakkolian
2006-01-17  0:54     ` erik quanstrom
2006-01-17  0:41 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).