日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

GNU make manual 翻译( 一百零四)

發(fā)布時間:2023/12/13 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 GNU make manual 翻译( 一百零四) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

繼續(xù)翻譯

4.7 Rules without Recipes or Prerequisites ==========================================If a rule has no prerequisites or recipe, and the target of the rule is a nonexistent file, then `make' imagines this target to have been updated whenever its rule is run. This implies that all targets depending on this one will always have their recipe run.An example will illustrate this:clean: FORCErm $(objects)FORCE:Here the target `FORCE' satisfies the special conditions, so the target `clean' that depends on it is forced to run its recipe. There is nothing special about the name `FORCE', but that is one name commonly used this way.As you can see, using `FORCE' this way has the same results as using `.PHONY: clean'. Using `.PHONY' is more explicit and more efficient. However, other versions of `make' do not support `.PHONY'; thus `FORCE' appears in many makefiles. *Note Phony Targets::.

4.7 沒有片段或前提條件的規(guī)則
==========================================

如果一個規(guī)則沒有前提條件或者片段,并且此規(guī)則的目的是一個尚未存在的文件,那么 make 將認(rèn)為此目的在任何一次make 運行時都已經(jīng)被更新。這暗示著每個依賴于此的目的都總是運行其片段。

例子是這樣的:

clean: FORCE
rm $(objects)
FORCE:

這里,目的 FORCE 滿足前面所述的特定的條件,于是依賴此 目的的 目的 clean 被強制執(zhí)行。這里的名字 FORCE 沒有任何特殊之處,但是是一個通常被使用的名字。

如你所見,采用這種方法用 FORCE 和用 .PHONY: clean 是一樣的效果。

使用 .PHONY 更佳的明確和更有效率,但是其他版本的 make ,有的不支持 .PHONY 語法;因此你會在某些 makefile里面看到 FORCE 出現(xiàn)。 *Note Phony Targets::

后文待續(xù)

轉(zhuǎn)載于:https://www.cnblogs.com/gaojian/archive/2012/09/20/2695334.html

總結(jié)

以上是生活随笔為你收集整理的GNU make manual 翻译( 一百零四)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。