telling 'make' to ignore dependencies when the top target has been created

前端 未结 5 488
天涯浪人
天涯浪人 2021-02-05 05:34

I\'m running the following kind of pipeline:

digestA: hugefileB hugefileC
    cat $^ > $@
    rm $^

hugefileB:
    touch $@

hugefileC:
    touch $@
<         


        
5条回答
  •  既然无缘
    2021-02-05 05:42

    The correct way is to not delete the files, as that removes the information that make uses to determine whether to rebuild the files.

    Recreating them as empty does not help because make will then assume that the empty files are fully built.

    If there is a way to merge digests, then you could create one from each of the huge files, which is then kept, and the huge file automatically removed as it is an intermediate.

提交回复
热议问题