Makefile dependencies don't work for phony target

后端 未结 4 1509
孤城傲影
孤城傲影 2020-12-31 02:29

Here is a reduced version of my Makefile:

.PHONY: all 

all: src/server.coffee
  mkdir -p bin
  ./node_modules/.bin/coffee -c -o bin src/server.coffee
         


        
4条回答
  •  再見小時候
    2020-12-31 02:54

    There needs to be some target file to compare against the modification time of server.coffee file. Since you don't have a concrete target make cannot know if the output is newer then the dependency or not, so it will always build all.

提交回复
热议问题