ๅฆๆๆๅ็ๅฐๆกๆๆไปคๆฏๆ้่คๅท่ก็,้้ Makefile ๅฏไปฅ้ๆๅ
งๅฎน,ๆๆนไพฟ็ๆฏๅค็ตๅไพๅบๅท่ก。
ๅปบ็ซไธๅๆชๆกๅ็จฑ็บ Makefile:
ๅบๆฌๆ็จ
init:
echo first command
echo second command
$ make init
echo first command
first command
echo second command
second command
ๅฎ้่ผธๅบ
ๅฆๆไฝ ไธๅธๆ terminal ๅฐๅบไฝ ไธ็ๅฝไปคๅ งๅฎน,ๆๅนพ็จฎๅฏซๆณๅฏไปฅ้ฟๅ 。
.SILENT: init
init:
echo first command
echo second command
.SILENT: #ๅฝฑ้ฟๅ
จ้จ
init:
echo first command
echo second command
init:
@echo first command
@echo second command
ๅค้ๆญฅ้ฉ
first_check:
echo first check
second_check:
echo second check
init: first_check second_check
echo init
$ make init
echo first check
first check
echo second check
second check
echo init
init
่ฎๆธ
file=default
init:
@echo file is $(file)
$ make
file is default
$ make file=new
file is new
่ฎๆธๅฏไปฅ็ถ็ฑๅธถๅ ฅๆนๅผ่ฆ่。