From: Miles Bader <miles@gnu.org>
Subject: Re: how to tell gnatmake to send executables to a different directory when compiling multi source?
Date: Thu, 02 Aug 2012 14:01:08 +0900
Date: 2012-08-02T14:01:08+09:00 [thread overview]
Message-ID: <874nolc2gb.fsf@catnip.gol.com> (raw)
In-Reply-To: 1ffdae87-74c9-4900-9645-bf1c5828e448@r9g2000yqr.googlegroups.com
Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
> Miles Bader wrote:
>>> However, I assume that this works only if the programmer properly used
>>> the appropriate .h files, which is in no way required by C.
>>
>> It assumes nothing about the way .h files are used.
>>
>> It essentially emits the include-file graph in an appropriate format,
>> usable by make.
>
> The hidden assumption here is that the -I flags and environment
> variables passed to the compiler to find the include files are the
> same when extracting the dependencies with -M and later when compiling
> using the extracted dependencies.
Sure, but that's not "the way .h files are used."
These days the compiler is usually only invoked once, using -M as an
additional option during the "real compile," which avoids the issue of
inconsistent invocation. Each compile then essentially makes sure the
recorded dependency information is consistent with the object files.
[It's still of course possible to confuse things, e.g., by changing a
"-DFOO" option when FOO affects the include-graph, so some build
systems record the actual compiler options, and do a full recompile
whenever they change...]
Note that I'm not trying to say this is an elegant system -- it has
many obvious problems, and I think the "Ada way" is clearly better --
just that in practice, it often more or less, kinda-sorta, works.
It's well understood how clumsy all this is, and in the long run C++
will probably move more towards doing things like Ada does. My
perception is that a real module system (supplanting include files) is
high on many people's agenda for the next C++ standard.
-miles
--
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over. --Ian Wolff
next prev parent reply other threads:[~2012-08-06 14:41 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-29 9:31 how to tell gnatmake to send executables to a different directory when compiling multi source? Nasser M. Abbasi
2012-07-29 10:00 ` Dmitry A. Kazakov
2012-07-29 11:35 ` Nasser M. Abbasi
2012-07-29 12:29 ` Patrick
2012-07-29 13:02 ` Nasser M. Abbasi
2012-07-29 13:49 ` Ludovic Brenta
2012-07-29 14:09 ` Nasser M. Abbasi
2012-07-29 15:35 ` Ludovic Brenta
2012-07-29 15:42 ` Patrick
2012-07-29 16:41 ` Ludovic Brenta
2012-07-29 16:46 ` Patrick
2012-07-29 17:35 ` Vasiliy Molostov
2012-07-29 19:40 ` Dmitry A. Kazakov
2012-07-29 22:22 ` Vasiliy Molostov
2012-07-29 19:46 ` Robert A Duff
2012-07-30 0:20 ` Vasiliy Molostov
2012-07-30 3:01 ` Nasser M. Abbasi
2012-07-30 4:48 ` Nasser M. Abbasi
2012-07-30 21:05 ` Robert A Duff
2012-07-30 5:50 ` Dmitry A. Kazakov
2012-07-30 11:16 ` Vasiliy Molostov
2012-07-30 12:25 ` Georg Bauhaus
2012-07-30 12:59 ` Vasiliy Molostov
2012-07-30 14:07 ` Georg Bauhaus
2012-07-30 13:03 ` Nasser M. Abbasi
2012-07-30 14:02 ` Georg Bauhaus
2012-07-30 19:40 ` J-P. Rosen
2012-08-01 7:32 ` Miles Bader
2012-08-01 9:37 ` Ludovic Brenta
2012-08-02 5:01 ` Miles Bader [this message]
2012-08-01 15:15 ` J-P. Rosen
2012-08-02 15:08 ` Robert A Duff
2012-08-02 16:37 ` J-P. Rosen
2012-07-30 19:50 ` Ludovic Brenta
2012-07-30 3:21 ` Nasser M. Abbasi
2012-07-30 8:19 ` Simon Wright
2012-07-30 6:12 ` Dirk Heinrichs
2012-07-30 6:40 ` Ludovic Brenta
2012-07-30 10:31 ` Vasiliy Molostov
2012-07-30 11:05 ` Ludovic Brenta
2012-07-30 11:33 ` Simon Wright
2012-07-30 12:16 ` Vasiliy Molostov
2012-07-30 12:48 ` Ludovic Brenta
2012-07-30 13:09 ` Vasiliy Molostov
2012-07-30 6:06 ` Dirk Heinrichs
2012-07-29 12:31 ` Nasser M. Abbasi
2012-07-29 13:46 ` Ludovic Brenta
2012-07-29 14:15 ` Simon Wright
2012-07-29 13:54 ` Dmitry A. Kazakov
2012-07-29 14:16 ` Nasser M. Abbasi
2012-07-29 14:32 ` Dmitry A. Kazakov
2012-07-30 5:57 ` General purpose build tools (was: Re: how to tell gnatmake to send executables to a different directory when compiling multi source?) Dirk Heinrichs
2012-07-30 10:50 ` Vasiliy Molostov
2012-07-30 11:10 ` Ludovic Brenta
2012-07-30 12:39 ` Vasiliy Molostov
2012-08-30 10:49 ` General purpose build tools Stephen Leake
2012-07-29 18:33 ` how to tell gnatmake to send executables to a different directory when compiling multi source? björn lundin
2012-07-29 19:06 ` onox
2012-07-31 11:12 ` Patrick
2012-07-31 11:30 ` Dmitry A. Kazakov
2012-07-31 11:31 ` Dmitry A. Kazakov
2012-07-31 11:34 ` Patrick
2012-07-31 12:33 ` Ludovic Brenta
2012-07-31 15:14 ` Patrick
2012-07-31 16:04 ` Ludovic Brenta
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox