9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Building dependencies.
@ 2001-09-20 18:28 Alexander Indenbaum
  2001-09-21  2:47 ` Boyd Roberts
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Indenbaum @ 2001-09-20 18:28 UTC (permalink / raw)
  To: 9fans

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

Hello!

For most Un*x C compilers I used there is -M flag which outputs list of
sources
with header dependencies in Makefile format, which later could be
included
in Makefile.

How do I do something similar on Plan9?

Thanks in advance for your help,
        Alexander



[-- Attachment #2: Type: text/html, Size: 582 bytes --]

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

* Re: [9fans] Building dependencies.
  2001-09-20 18:28 [9fans] Building dependencies Alexander Indenbaum
@ 2001-09-21  2:47 ` Boyd Roberts
  2001-09-21  8:40   ` Douglas A. Gwyn
  0 siblings, 1 reply; 7+ messages in thread
From: Boyd Roberts @ 2001-09-21  2:47 UTC (permalink / raw)
  To: 9fans

Building dependencies.> For most Un*x C compilers I used there is -M flag which outputs list of
> sources with header dependencies in Makefile format ...

yeah i remember that.  came out of 6th Ed, right?




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

* Re: [9fans] Building dependencies.
  2001-09-21  2:47 ` Boyd Roberts
@ 2001-09-21  8:40   ` Douglas A. Gwyn
  2001-09-21  9:14     ` Boyd Roberts
  2001-09-21 16:06     ` David Lukes
  0 siblings, 2 replies; 7+ messages in thread
From: Douglas A. Gwyn @ 2001-09-21  8:40 UTC (permalink / raw)
  To: 9fans

Boyd Roberts wrote:
> yeah i remember that.  came out of 6th Ed, right?

Not likely; 6th Edition UNIX didn't have "make".

Actually I never heard of the cc -M flag and am surprised
to hear that "most" UNIX C compilers supported it.  It's
not documented in the manuals for 6th, 7th, 8th, 9th, or
10th Edition UNIX, nor for any release of UNIX System V
for which I have documentation, nor in SVID Issue 3.


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

* Re: [9fans] Building dependencies.
  2001-09-21  8:40   ` Douglas A. Gwyn
@ 2001-09-21  9:14     ` Boyd Roberts
  2001-09-21 16:06     ` David Lukes
  1 sibling, 0 replies; 7+ messages in thread
From: Boyd Roberts @ 2001-09-21  9:14 UTC (permalink / raw)
  To: 9fans

From: "Douglas A. Gwyn" <DAGwyn@null.net>
> Boyd Roberts wrote:
> > yeah i remember that.  came out of 6th Ed, right?
>
> Not likely; 6th Edition UNIX didn't have "make".

i know.  i was being sarcastic.




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

* Re: [9fans] Building dependencies.
  2001-09-21  8:40   ` Douglas A. Gwyn
  2001-09-21  9:14     ` Boyd Roberts
@ 2001-09-21 16:06     ` David Lukes
  1 sibling, 0 replies; 7+ messages in thread
From: David Lukes @ 2001-09-21 16:06 UTC (permalink / raw)
  To: 9fans

> Actually I never heard of the cc -M flag and am surprised
> to hear that "most" UNIX C compilers supported it.

Well, IIRC, it's another Berkeleyism that has
(like everything else) been carried across into the Gnuniverse.

The reason you need it is because of #ifdef ... #include
type madnesses, otherwise sed did a fine job.

Cheers,
	Dave.


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

* Re: [9fans] Building dependencies.
@ 2001-09-20 17:44 anothy
  0 siblings, 0 replies; 7+ messages in thread
From: anothy @ 2001-09-20 17:44 UTC (permalink / raw)
  To: 9fans

// We tend to keep things simple, with one header
// file for a whole program, or two if we split data
// from function declarations.  Then we just make
// everything depend on the header file (or both headers).

while i agree this is the best approach to building
systems in most cases, i ocasionally have to deal with
alien code. much, much code i've run accross isn't
built with anything approaching simplicity in mind,
nor do the makefiles tend to be readable, useful, or
workable under APE. i'd love to be able to generate the
list of dependancies and roll my own ma?ke?file.
-α.



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

* Re: [9fans] Building dependencies.
@ 2001-09-20 17:34 Russ Cox
  0 siblings, 0 replies; 7+ messages in thread
From: Russ Cox @ 2001-09-20 17:34 UTC (permalink / raw)
  To: 9fans

> For most Un*x C compilers I used there is -M flag which outputs list of
> sources
> with header dependencies in Makefile format, which later could be
> included
> in Makefile.

We tend to keep things simple, with one header
file for a whole program, or two if we split data
from function declarations.  Then we just make
everything depend on the header file (or both headers).

Look at, say, /sys/src/cmd/acme/mkfile.

Russ



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

end of thread, other threads:[~2001-09-21 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-20 18:28 [9fans] Building dependencies Alexander Indenbaum
2001-09-21  2:47 ` Boyd Roberts
2001-09-21  8:40   ` Douglas A. Gwyn
2001-09-21  9:14     ` Boyd Roberts
2001-09-21 16:06     ` David Lukes
  -- strict thread matches above, loose matches on Subject: below --
2001-09-20 17:44 anothy
2001-09-20 17:34 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).