tags:

views:

42

answers:

2

I want to print my whole file compilation options on make in my console on build. For example on compiling test1.c test2.c test3.c using make

should print like

cc -g -O1 -Wall test1.c

cc -g -O1 -Wall test2.c

cc -g -O1 -Wall test3.c
A: 

make -n will show the commands make would execute without running them. Is that what you mean?

msw
no , i want to get my whole compilation options on my source build exactly i give above
Renjith G
A: 

Use make -B -n to see all the build commands without actually building anything.

Paul R
no , i want to get my whole compilation options on my source build exactly i give above
Renjith G
@Renjith - in that case your question really doesn't make much sense - please try to explain what is it exactly that you are trying to do
Paul R
hi Paul , i am having one project tree , having build and src are in separate directories. I have given my compilation options in my make files. But on building, the build console is just printing the file name with cc only . I just want to confirm whether my all build options are really come into build on src files (exactly my optimization option.)
Renjith G
It sounds like you have a bug in your makefile then - you should normally see all the options being passed to cc without doing anything special, both when you do a normal `make` or if you use my suggestion of `make -B -n` above. You should post your makefile and then people here can help you to fix it.
Paul R
Oh Ok.. It is a make tree.. lot of make files. How can i export all of them here?
Renjith G
Go to the lowest makefile and run that by itself. If it fails, show it to us. If not, move up one level and repeat.
Beta
What @Beta said
Paul R