开发者

Understanding makefile

开发者 https://www.devze.com 2023-02-20 07:46 出处:网络
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`

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

精彩评论

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