[BACK] Return to buildquiet CVS log [TXT][DIR] Up to Nevrax / code / tool / build

File: Nevrax / code / tool / build / buildquiet (download)
Revision 1.2, Tue May 7 10:05:49 2002 UTC (8 weeks ago) by valignat
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -3 lines
Renamed the 'silent' option in 'qiuet', it makes more sense.

#!/usr/bin/perl -n

###########################################################################
# $Id: buildquiet,v 1.2 2002/05/07 10:05:49 valignat Exp $
###########################################################################
###########################################################################
###########################################################################
# BUILDQUIET:
#
#     This tool is aimed to "cleanup" the 'make' command output to only
#     print the compiled file name instead of the compilation 'command'.
#
#     'buildquiet' is used by the 'build' script.
#
###########################################################################

if ( ! ( /^((Making)|(\/bin\/sh)|(.*rm)|(mkdir)|(mv)|(ar)|(ranlib)|(echo)|(\(cd)|(\(?ln))\s/ ))
{
    # Replace 'make[2]: ' line
    s/^make\[\d\]\:\s(.*)$/$1/;

    # Replace the library creation line by only the library file name
    s/^(ccache\s+)?(((gcc)|([cg]\+\+))\s-shared)\s.*\.libs\/([\w\.]+)$/    $6/;

    # Replace the file compilation line by only the compiled file name
    s/^(ccache\s+)?(gcc|([cg]\+\+)).*\s.+\/([\w\.]+.cpp).*$/    $4/;
    s/^(ccache\s+)?(gcc|([cg]\+\+)).*\s.+-o\s([\w\.]+).*$/    $4/;

    # Replace the install line
    s/\s*\/usr\/bin\/install\s.*\s+(\.libs\/)?([^-][\.\w\-]+)\s+.*$/    Installing $2/;

    if ( ! /^Nothing/ ) {
        print;
    }
}

# End of file