9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] newbie mk question
@ 2002-10-04 14:24 rog
  0 siblings, 0 replies; 3+ messages in thread
From: rog @ 2002-10-04 14:24 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

if i've understood what you're after,
i imagine you could use binds to achieve the same effect,
assuming you don't have any filename clashes, and that
the mkfile assumes everything is in the current directory.
e.g.
	bind -c . .
	bind -a otherdir .
	mk

[-- Attachment #2: Type: message/rfc822, Size: 1993 bytes --]

From: steve.simon@snellwilcox.com
To: 9fans@cse.psu.edu
Subject: [9fans] newbie mk question
Date: Fri, 04 Oct 2002 14:31:42 +0100
Message-ID: <981768180@snellwilcox.com>



How do I tell mk that I want to compile some C source from the current dir,
some from another dir, putting the .$(O) files in the current dir and then link
the whole lot together.

gmake has a .path= construct which seems a bit ugly to me, I'am sure there
must be an elegant way to do this in mk but how?

Thanks,

-Steve

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

* Re: [9fans] newbie mk question
@ 2002-10-04 15:29 nigel
  0 siblings, 0 replies; 3+ messages in thread
From: nigel @ 2002-10-04 15:29 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Roger's suggestion doesn't actually do it in the mkfile, though I expect it
could. This is what I do....

COMMON=/somewhereelse

%.$O:	$COMMON/%.c
	$O^c $CFLAGS $COMMON/$stem.c

thingy: local.$O common.$O
	$O^c -o thingy local.$O common.$O

or words to that effect.

[-- Attachment #2: Type: message/rfc822, Size: 1863 bytes --]

From: steve.simon@snellwilcox.com
To: 9fans@cse.psu.edu
Subject: [9fans] newbie mk question
Date: Fri, 04 Oct 2002 14:31:42 +0100
Message-ID: <981768180@snellwilcox.com>



How do I tell mk that I want to compile some C source from the current dir,
some from another dir, putting the .$(O) files in the current dir and then link
the whole lot together.

gmake has a .path= construct which seems a bit ugly to me, I'am sure there
must be an elegant way to do this in mk but how?

Thanks,

-Steve

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

* [9fans] newbie mk question
@ 2002-10-04 13:31 steve.simon
  0 siblings, 0 replies; 3+ messages in thread
From: steve.simon @ 2002-10-04 13:31 UTC (permalink / raw)
  To: 9fans



How do I tell mk that I want to compile some C source from the current dir,
some from another dir, putting the .$(O) files in the current dir and then link
the whole lot together.

gmake has a .path= construct which seems a bit ugly to me, I'am sure there
must be an elegant way to do this in mk but how?

Thanks,

-Steve



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

end of thread, other threads:[~2002-10-04 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-04 14:24 [9fans] newbie mk question rog
  -- strict thread matches above, loose matches on Subject: below --
2002-10-04 15:29 nigel
2002-10-04 13:31 steve.simon

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).