From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200109201734.f8KHYJw08873@new-york.lcs.mit.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] Building dependencies. From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 20 Sep 2001 13:34:14 -0400 Topicbox-Message-UUID: eee9a21c-eac9-11e9-9e20-41e7f4b1d025 > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] Building dependencies. From: anothy@cosym.net MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Message-Id: <20010920174445.38C60199ED@mail.cse.psu.edu> Date: Thu, 20 Sep 2001 13:44:34 -0400 Topicbox-Message-UUID: eef215dc-eac9-11e9-9e20-41e7f4b1d025 // 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. -α. From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C14201.FDA50D1C" Message-ID: <73AFF2EAA018984A902FD5DC7D061CDB2BD76D@exchange.nsof.co.il> From: "Alexander Indenbaum" To: <9fans@cse.psu.edu> Subject: [9fans] Building dependencies. Date: Thu, 20 Sep 2001 20:28:06 +0200 Topicbox-Message-UUID: eedc662e-eac9-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. ------_=_NextPart_001_01C14201.FDA50D1C Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable 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 ------_=_NextPart_001_01C14201.FDA50D1C Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Building dependencies.

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

------_=_NextPart_001_01C14201.FDA50D1C-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0af901c14247$b67d9800$a2b9c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <73AFF2EAA018984A902FD5DC7D061CDB2BD76D@exchange.nsof.co.il> Subject: Re: [9fans] Building dependencies. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Date: Fri, 21 Sep 2001 04:47:11 +0200 Topicbox-Message-UUID: ef05ac1e-eac9-11e9-9e20-41e7f4b1d025 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? From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3BAACEEF.2375C1BE@null.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <73AFF2EAA018984A902FD5DC7D061CDB2BD76D@exchange.nsof.co.il>, <0af901c14247$b67d9800$a2b9c6d4@SOMA> Subject: Re: [9fans] Building dependencies. Date: Fri, 21 Sep 2001 08:40:38 +0000 Topicbox-Message-UUID: ef4320f8-eac9-11e9-9e20-41e7f4b1d025 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <002201c1427d$cde7a4a0$a2b9c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <73AFF2EAA018984A902FD5DC7D061CDB2BD76D@exchange.nsof.co.il>, <0af901c14247$b67d9800$a2b9c6d4@SOMA> <3BAACEEF.2375C1BE@null.net> Subject: Re: [9fans] Building dependencies. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Date: Fri, 21 Sep 2001 11:14:23 +0200 Topicbox-Message-UUID: ef4bcb7c-eac9-11e9-9e20-41e7f4b1d025 From: "Douglas A. Gwyn" > 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Lukes To: 9fans@cse.psu.edu Subject: Re: [9fans] Building dependencies. Content-Type: text/plain References: <73AFF2EAA018984A902FD5DC7D061CDB2BD76D@exchange.nsof.co.il> <0af901c14247$b67d9800$a2b9c6d4@SOMA> <3BAACEEF.2375C1BE@null.net> In-Reply-To: <3BAACEEF.2375C1BE@null.net> MIME-Version: 1.0 Message-Id: <01092117100900.01658@luchie-chowchows.demon.co.uk> Content-Transfer-Encoding: 8bit Date: Fri, 21 Sep 2001 17:06:49 +0100 Topicbox-Message-UUID: f0072e58-eac9-11e9-9e20-41e7f4b1d025 > 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.