?? mdepend.pl
字號(hào):
#! /usr/bin/env perl
#############################################################################
#
# M D E P E N D
#
# GENERAL DESCRIPTION
# Merge dependencies generated by getdep.pl into the real makefile.
#
# The makefile is searched for a line beginning with
# # DO NOT EDIT BELOW THIS LINE
# All lines below this line are removed and the dependencies are
# placed at this point.
#
# INVOCATION
# perl mdepend.pl target.mak TARGET ["object list"]
#
# Copyright (c) 1998 - 2002 by QUALCOMM Incorporated. All Rights Reserved.
#############################################################################
#
# EDIT HISTORY FOR FILE
#
# $PVCSPath: L:/src/asw/MSM6050/vcs/mdepend.plv 1.0 23 Oct 2001 15:28:10 donb $
# $Header: //depot/asic/msm6050/tools/uuidgen/mdepend.pl#2 $ $DateTime: 2002/07/05 11:55:40 $ $Author: ropalsky $
#
# when who what, where, why
# -------- --- --------------------------------------------------------
# 07/05/02 ro Use optional command line list of objects to copy only
# dependencies of objects used in the makefile.
# 10/13/98 dlb Initial version.
#
#############################################################################
die "Usage: perl mdepend.pl target.mak TARGET\n"
unless $#ARGV >= 1;
$makefile = $ARGV[0];
$target = $ARGV[1];
my $objects;
my %dependency_list;
# Convert a string containing space-separated object file names
# to a table of dependency file names
if ($ARGV[2] ne undef) {
$objects = $ARGV[2];
$objects =~ s/\.o/\.dep/g;
foreach (split(/ /,$objects)) {
$dependency_list{$_} = 1;
}
}
############################################################
# Begin by copying the normal part of the makefile.
############################################################
$found_line = 0;
open (IN, "<$makefile") || die "Can't read makefile\n";
while (<IN>) {
if (/^\# DO NOT EDIT BELOW THIS LINE/) {
print;
$found_line = 1;
last;
}
print;
}
close (IN);
die "No '# DO NOT EDIT BELOW THIS LINE' found in makefile\n"
unless $found_line;
############################################################
# Now merge in the dependencies.
############################################################
for $name (<$target/*.dep>) {
# Check object if the object list was provided
next if (($ARGV[2] ne undef) && ($dependency_list{$name} eq undef));
open (IN, "<$name") || die "Can't read file: $name";
print "\n";
while (<IN>) {
print;
}
close IN;
}
print "\n# End of auto generated dependencies.\n";
###########################################################################
# End of Perl script.
###########################################################################
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -