欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Linux 中makefile的命令包定義及使用

 更新時間:2017年03月29日 09:35:38   投稿:lqh  
這篇文章主要介紹了Linux 中makefile的命令包定義及使用的相關資料,需要的朋友可以參考下

Linux 中makefile的命令包定義及使用

下面以\build\core\product.mk下面的內(nèi)容為例介紹:

<span style="font-size:14px;">define _find-android-products-files 
$(shell test -d device && finddevice -maxdepth 6 -name AndroidProducts.mk) \ 
 $(shell test -d vendor && find vendor -maxdepth 6 -nameAndroidProducts.mk) \ 
 $(SRC_TARGET_DIR)/product/AndroidProducts.mk 
endef</span> 

makefile文件中如出現(xiàn)一些相同的命令序列,可為這些相同的序列定義一個變量,不能和makefile文件中的變量重名,這里是_find-Android-products-files,定義這種命令序列的語法以define開始,以endef結(jié)束。

命令包的使用,就像使用變量一樣:

<span style="font-size:14px;">define get-all-product-makefiles 
$(call get-product-makefiles,$(_find-android-products-files)) 
endef</span> 

$(_find-android-products-files),用$來使用命令包,就像使用函數(shù)和變量一樣
這里call是函數(shù)名,get-product-makefiles和$(_find-android-products-files)是函數(shù)的參數(shù)

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關文章

最新評論