Why do we no pass the files in the src dir through libtool?

In the src/XYZ directories, a typical compilation log entry looks (for me) 
like this:

source='../../../devel/src/mathed/textpainter.C' object='textpainter.lo' 
libtool=yes \
depfile='.deps/textpainter.Plo' tmpdepfile='.deps/textpainter.TPlo' \
depmode=tru64 /bin/ksh ../../../devel/config/depcomp \
/bin/ksh ../../libtool --mode=compile cxx -std strict_ansi -DHAVE_CONFIG_H -I.
-I../../../devel/src/mathed -I../../src -I../../../devel/src/mathed/../  
-I../../../devel/boost  -I/usr/local/include    -nocleanup 
-msg_display_number -w1 -ptr 
/usr/users/aleem/OTHERS_CODE/lyx/devel-build/lyx_cxx_repository -O2 -c -o 
textpainter.lo `test -f ../../../devel/src/mathed/textpainter.C || echo 
'../../../devel/src/mathed/'`../../../devel/src/mathed/textpainter.C
cxx -std strict_ansi -DHAVE_CONFIG_H -I. -I../../../devel/src/mathed 
-I../../src -I../../../devel/src/mathed/../ -I../../../devel/boost 
-I/usr/local/include -nocleanup -msg_display_number -w1 -ptr 
/usr/users/aleem/OTHERS_CODE/lyx/devel-build/lyx_cxx_repository -O2 -c -MD 
../../../devel/src/mathed/textpainter.C
echo timestamp > textpainter.lo

In the src dir itself I get:

source='../../devel/src/undo_funcs.C' object='undo_funcs.o' libtool=no \
depfile='.deps/undo_funcs.Po' tmpdepfile='.deps/undo_funcs.TPo' \
depmode=tru64 /bin/ksh ../../devel/config/depcomp \
cxx -std strict_ansi -DHAVE_CONFIG_H -I. -I../../devel/src -I.  
-I../../devel/boost   -I/usr/local/include    -nocleanup -msg_display_number 
-w1 -ptr /usr/users/aleem/OTHERS_CODE/lyx/devel-build/lyx_cxx_repository -O2 
-c -o undo_funcs.o
`test -f ../../devel/src/undo_funcs.C || echo 
'../../devel/src/'`../../devel/src/undo_funcs.C

The reason I ask is that the subsequent output by libtool is really easy to 
parse with sed. Using the little script below on a make log file I can strip 
out all the Info/Warning messages. I can't do that in src and feel that 
re-inventing the equivalent sed script is a waste of time...

Angus

PROCESSED MAKE LOG
=====================
File ../../../devel/src/mathed/preview.C
File ../../../devel/src/mathed/preview.C
cxx: Warning: ../../../devel/boost/boost/signals/connection.hpp, line 154: 
#767-D
          conversion from pointer to smaller integer
      assert(con.get());
------^
File ../../../devel/src/mathed/textpainter.C
File ../../../devel/src/mathed/textpainter.C
File ../../../devel/src/mathed/formulabase.C
File ../../../devel/src/mathed/formulabase.C
cxx: Warning: ../../../devel/boost/boost/signals/connection.hpp, line 154: 
#767-D
          conversion from pointer to smaller integer
      assert(con.get());
------^
cxx: Warning: ../../../devel/src/mathed/formulabase.C, line 359: #11-D
          unrecognized preprocessing directive
#warning Never launch a Dialog on "Press" event ONLY on "Release" event!
-^
cxx: Warning: ../../../devel/src/mathed/formulabase.C, line 832: #11-D
          unrecognized preprocessing directive
#warning pretty ugly
-^
File ../../../devel/src/mathed/formula.C


EXTRACT.SED
============
# This little sed script interrogates the output of a make log created so:
#       make > make.log 2>&1
# Use it as sed -f extract.sed < make.log > processed.log

# It prints out only the name of the compiled file together with any
# Info/Warning messages out put by the compiler.
#=========================================================================

# By initialising the hold space each time "cxx -std strict_ansi", and then
# overwriting the pattern space when we encounter "echo timestamp", we
# automatically cut out the crap that preceeds each compilation entry.


# If the line starts with "cxx -std strict_ansi", then initialise the
# hold space with it.
/^cxx -std strict_ansi/ {
s/\(.*\) -MD \(.*\)/File \2/
h
}

# Ditto, if the line starts with "cc -std1".
/^cc -std1/ {
s/\(.*\) -MD \(.*\)/File \2/
h
}

# If the line does not begin with "echo timestamp", then append that line
# to the hold space (and delete it from the pattern space).
/^echo timestamp/!{
H
d
}

# If the line does begin with "echo timestamp", then overwrite it with the
# contents of the hold space.
/^echo timestamp/g

Reply via email to