preprocessor output target

2008-06-05 Thread Jason Roscoe
Hi, I apologize if this is not the correct list but maybe someone here can answer ... I have a project that uses autoconf/automake and libtool. I was wondering if there is already a macro that will create Makefile targets for getting the preprocessor output. For example, if I have a source

Re: preprocessor output target

2008-06-05 Thread Stepan Kasal
Hello, was wondering if there is already a macro that will create Makefile targets for getting the preprocessor output. For example, if I have a source file called init.c, I would like to be able to type something like 'make init.i' and get the output of the preprocessor only (e.g., gcc

Re: preprocessor output target

2008-06-05 Thread Ralf Wildenhues
Hi Jason, * Jason Roscoe wrote on Thu, Jun 05, 2008 at 04:13:31PM CEST: I apologize if this is not the correct list It's dead on. In addition to Stepan's answer: The main reason is that I want to be able to see the headers that are being included and where they are getting pulled from.

Re: preprocessor output target

2008-06-05 Thread Brian Dessent
Jason Roscoe wrote: I apologize if this is not the correct list but maybe someone here can answer ... I have a project that uses autoconf/automake and libtool. I was wondering if there is already a macro that will create Makefile targets for getting the preprocessor output. For example, if

Re: preprocessor output target

2008-06-05 Thread John Calcote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian Dessent wrote: Note however that if you wish to override a variable on the make command in order to add an option, you have to specify the full contents of the current value (which for CFLAGS is typically -g -O2 if using gcc and you didn't

Re: preprocessor output target

2008-06-05 Thread Mike Mueller
On Thu, Jun 05, 2008 at 09:19:31AM -0700, Brian Dessent wrote: If you are using gcc then you can add -save-temps to CFLAGS, e.g. rm init.o make CFLAGS=-save-temps -g -O2 Assuming that everything else in the build dir was up-to-date at that point, this will rebuild just init.o but it will

Re: preprocessor output target

2008-06-05 Thread Jason Roscoe
Ralf Wildenhues wrote: Hi Jason, * Jason Roscoe wrote on Thu, Jun 05, 2008 at 04:13:31PM CEST: I apologize if this is not the correct list It's dead on. In addition to Stepan's answer: The main reason is that I want to be able to see the headers that are being included and

Re: preprocessor output target

2008-06-05 Thread Ralf Wildenhues
* Jason Roscoe wrote on Thu, Jun 05, 2008 at 09:00:16PM CEST: What is the equivalent to: rm init.o make init.o when using libtool? rm init.lo make init.lo will possible recreate init.o, .libs/init.o, and init.lo. The latter is merely a small helper script. BTW, you should note that if

Re: preprocessor output target

2008-06-05 Thread Jason Roscoe
Brian Dessent wrote: If you are using gcc then you can add -save-temps to CFLAGS, e.g. rm init.o make CFLAGS=-save-temps -g -O2 Assuming that everything else in the build dir was up-to-date at that point, this will rebuild just init.o but it will leave init.i and init.s as a side effect. The

Re: preprocessor output target

2008-06-05 Thread Ben Pfaff
Jason Roscoe [EMAIL PROTECTED] writes: For example, if I have a source file called init.c, I would like to be able to type something like 'make init.i' and get the output of the preprocessor only (e.g., gcc -E). I sometimes do: rm init.o make CC='gcc -E' init.o mv