Re: [OT] automatically write enabled macros of the makefile into a file
- From: T <mlist4suntong@xxxxxxxxx>
- Date: Wed, 30 Aug 2006 18:19:59 +0200
On Wed, 30 Aug 2006 18:14:33 -0400, Kamaraju Kusumanchi wrote:
The code comes with a makefile. The code contains many
#ifdef
#endif
constructs which are preprocessed by cpp (The C preprocessor). ...
#ifdef construct1
write(10,*) 'construct1 is enabled'
#else
write(10,*) 'construct1 is disabled'
#endif
But this is very time consuming to do for all of the macros. Now it would
be much easier, if, before preprocessing the code, there is a way to
automatically write a file which tells which macros were enabled and which
macros were disabled.
Instead of writing them at each individual places, why don't you write
just one output line at a central place. Say right at the beging of
program excution, you put:
write(10,*) 'Compiled with construct1=${construct1} construct1=${construct2}...'
The ${construct1} & ${construct2} should be populated by make, before cpp
see them...
HTH
tong
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: [OT] automatically write enabled macros of the makefile into a file
- From: Kamaraju Kusumanchi
- Re: [OT] automatically write enabled macros of the makefile into a file
- References:
- [OT] automatically write enabled macros of the makefile into a file
- From: Kamaraju Kusumanchi
- [OT] automatically write enabled macros of the makefile into a file
- Prev by Date: Re: Email programs that work.
- Next by Date: Re: Email programs that work.
- Previous by thread: [OT] automatically write enabled macros of the makefile into a file
- Next by thread: Re: [OT] automatically write enabled macros of the makefile into a file
- Index(es):
Relevant Pages
|