当前位置: 技术问答>linux和unix
如何通过自动生成的makefile 看各个文件的依赖关系
来源: 互联网 发布时间:2017-01-21
本文导语: 本帖最后由 fx397993401 于 2011-11-30 22:26:34 编辑 最近要看一个开源软件,结果 makefile 使用 automake 生成的,但是这个我看起来有点吃力,请问大家在看开源软件的时候 ,是如何下手的?有没有什么好的方法 ? 生成m...
生成makefile 的部分
pkgdatadir = $(datadir)/openpts
pkgincludedir = $(includedir)/openpts
pkglibdir = $(libdir)/openpts
pkglibexecdir = $(libexecdir)/openpts
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-pc-linux-gnu
host_triplet = i686-pc-linux-gnu
target_triplet = i686-pc-linux-gnu
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am
$(srcdir)/Makefile.in $(top_srcdir)/configure
$(top_srcdir)/dist/openpts.spec.in
$(top_srcdir)/dist/ptsc.conf.in
$(top_srcdir)/dist/ptsv.conf.in ABOUT-NLS ChangeLog
config.guess config.rpath config.sub depcomp install-sh
ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES)
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
makefile.in 的部分
@SET_MAKE@
#
# Makefile.am
#
# This file is part of the OpenPTS project.
#
# The Initial Developer of the Original Code is International
# Business Machines Corporation. Portions created by IBM
# Corporation are Copyright (C) 2010 International Business
# Machines Corporation. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Common Public License as published by
# IBM Corporation; either version 1 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Common Public License for more details.
#
# You should have received a copy of the Common Public License
# along with this program; if not, a copy can be viewed at
# http://www.opensource.org/licenses/cpl1.0.php.
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am
$(srcdir)/Makefile.in $(top_srcdir)/configure
$(top_srcdir)/dist/openpts.spec.in
$(top_srcdir)/dist/ptsc.conf.in
$(top_srcdir)/dist/ptsv.conf.in ABOUT-NLS ChangeLog
config.guess config.rpath config.sub depcomp install-sh
ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES)
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = dist/openpts.spec dist/ptsc.conf dist/ptsv.conf
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive
html-recursive info-recursive install-data-recursive
install-dvi-recursive install-exec-recursive
install-html-recursive install-info-recursive
install-pdf-recursive install-ps-recursive install-recursive
installcheck-recursive installdirs-recursive pdf-recursive
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=)
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir =
{ test ! -d "$(distdir)"
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';'
&& rm -fr "$(distdir)"; }; }
am__relativize =
dir0=`pwd`;
sed_first='s,^([^/]*)/.*$$,1,';
sed_rest='s,^[^/]*/*,,';
sed_last='s,^.*/([^/]*)$$,1,';
sed_butlast='s,/*[^/]*$$,,';
while test -n "$$dir1"; do
first=`echo "$$dir1" | sed -e "$$sed_first"`;
if test "$$first" != "."; then
if test "$$first" = ".."; then
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2";
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`;
else
first2=`echo "$$dir2" | sed -e "$$sed_first"`;
if test "$$first2" = "$$first"; then
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`;
else
dir2="../$$dir2";
fi;
dir0="$$dir0"/"$$first";
fi;
fi;
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`;
done;
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZI
|
顶2楼,看makefile的话有些依赖关系很复杂,还不如直接看源文件来的实在,清晰
|
看这个太复杂了,要是我的话,看文档,看源代码头文件包含关系,再分析。
|
依赖关系错综复杂,怎么能通过makefile来看呢...
直接看源码,从外围向内剖析,从核心向外扩散.
直接看源码,从外围向内剖析,从核心向外扩散.