[英]Makefile.def vs Makefile.am
我的工作在Linux上的binutils-2.29。 在父目錄沒有Makefile.am
,但在所有的子目錄有Makefile.am
。
在父目錄這些都是Makefile文件存在:
Makefile Makefile.def Makefile.in Makefile.tpl
在側Makefile.tpl
有它說評論Makefile
從生成Makefile.tpl
由autogen Makefile.def
但里面的子目錄沒有Makefile.def
,當我運行autoreconf && automake
它產生Makefile
從Makefile.am
究竟是什么區別Makefile.def
和Makefile.am
?
Makefile.def和Makefile.am之間到底有什么區別?
讓我們看一下GCC,這也是使用binutils
大型項目。 引用重新生成GCC配置 :
Makefile.in文件有時很大,可以通過Makemake.am文件自動生成。 某些Makefile.in文件(用於在生成樹中生成Makefile)是由autogen從Makefile.tpl和Makefile.def文件生成的。 Autogen是一種(可編寫GUILE腳本的)工具,旨在簡化包含大量重復文本的程序的創建和維護。
所以,不同的是真的,你希望如何以及在何處存儲輸入的部分文件autogen
會努力。 對於GCC,它的Makefile.tpl
存儲一個模板 (用於生成輸出Makefile,而Makefile.def
存儲的定義將由autogen使用。
例如,在Makefile.tpl
您會找到以下用於填充HOST_LIB_PATH
變量的模板(請注意,它使用host_modules
變量):
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the host machine work.
HOST_LIB_PATH = [+ FOR host_modules +][+
IF lib_path +]$(HOST_LIB_PATH_[+module+])[+ ENDIF lib_path +][+
ENDFOR host_modules +]
在Makefile.def
有一個host_modules
的定義:
host_modules= { module= bfd; bootstrap=true; };
host_modules= { module= opcodes; bootstrap=true; };
// ...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.