creating log file
hello friends,
i am a bit trouble and looking some help. i have written a makefile ,that compiles a number of profram using fortran compiler,g95. i have switched -Wall tag so it gives some warnning as well. this the output of my make: $ make run "flag= -Wall" as u can understand, blue lines are general make output and red lines are output of -Wall. g95 -O3 -Wall -c main.f90 g95 -O3 -Wall -c map.f90 In file map.f90:10 integer::i,j,k,dx,dy,d2 1 Warning (137): Variable 'dx' at (1) is never used and never set In file map.f90:10 integer::i,j,k,dx,dy,d2 1 Warning (137): Variable 'd2' at (1) is never used and never set In file map.f90:10 integer::i,j,k,dx,dy,d2 1 Warning (137): Variable 'dy' at (1) is never used and never set g95 -O3 -Wall -c coeff.f90 In file coeff.f90:6 integer,parameter::eps=.138,t=-1 1 Warning (141): Implicit conversion at (1) causes precision loss g95 -O3 -Wall main.o map.o coeff.o -o run i have managed to seperate these two types of prompt using make run 2>warnning.log but is there any way to edit my make file so that it will create the log file itself without specifying 2>log eachtime while 'make' it? looking for your kind help. Regards advanced |
Just add 2>&1 to the end of the gcc invocation lines in your Makefile. e.g. note the lines which use $(CC) here:
Code:
CC = gcc |
dera friend, thanks for your reply...but it doesnt work...
firstly, i want the warnnings to be put on a different file...error.log(say) when i put 2>&1,it still prints the warnning on screen. on the other hand, if i put 2>w.log, wgenever compiler is invoked, its prompting nothin to that file....thats what is puzzellin me.....plz. chek |
All times are GMT -5. The time now is 01:48 AM. |