开发者

Understanding makefile

I have an error here,开发者_运维百科 but it should work actually:

make: Fatal error in reader: /x/y/z/compile.mak, line 22: Extra :', ::', or :=' on dependency line`

${COPY_FILES:src/%=${STAGING_DIR}/%} : ${STAGING_DIR}/% : src/%
 mkdir -p ${@D}
 rm -f ${@}
 cp ${<} ${@}
 chmod ${FILE_PERMISSIONS} ${@}

How can this be fixed?

COPY_FILES - is a list of files,
STAGING_DIR - path,
FILE_PERMISSIONS - 444


As the error message so helpfully and succinctly says, you have an extra : on the dependency line. I'm guessing this line:

${COPY_FILES:src/%=${STAGING_DIR}/%} : ${STAGING_DIR}/% : src/%

should probably be:

${COPY_FILES:src/%=${STAGING_DIR}/%} : ${STAGING_DIR}/% src/%
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜