Re: [OT] automatically write enabled macros of the makefile into a file
- From: Kamaraju Kusumanchi <kamaraju@xxxxxxxxxxxxxx>
- Date: Wed, 30 Aug 2006 20:33:03 -0400
On Wednesday 30 August 2006 12:19, T wrote:
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...
This is definitely a good idea. But I dont know how to do it. Any pointers?
raju
--
http://kamaraju.googlepages.com/cornell-bazaar
http://groups.google.com/group/cornell-bazaar/about
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- Follow-Ups:
- References:
- [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
- From: T
- [OT] automatically write enabled macros of the makefile into a file
- Prev by Date: Re: Use of dpkg --set-selections is brain-dead?
- Next by Date: Re: Email programs that work.
- Previous by thread: Re: [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
|