开发者

What exactly does "Clean and Build" do?

开发者 https://www.devze.com 2023-03-05 19:25 出处:网络
Maybe this seems like a naive question. I have some functionality in my project that suddenly doesn\'t work, an when I \"Clean and Build\", it works again.

Maybe this seems like a naive question.

I have some functionality in my project that suddenly doesn't work, an when I "Clean and Build", it works again. What might be the problem that is being so开发者_StackOverflow社区lved by performing this Clean and Build?

Your input is highly appreciated.


The actions on a Make and clean are derermined by the makefile. You can look at the Makefile itself to see what is there.

make by itself corresponds to the very first rule in the makefile. make clean corresponds to the clean rule in the makefile

Also, you can use

make -n

and

make -n clean

These will show you the sequence of command(s) that are actually executed when make or make clean are run.

As a general convention, make by itself is a rule for compiling so it executes the compile commands necessary to build the project.

make clean is used for cleaning the project. It deletes the object files and the executable, and any other files necessary to allow a clean build of the project on next make.

Why doing make clean followed by a make helps?

It can be due to a number of reasons and its hard for me to tell you what may be going on. Can you give some more details on the failure mode?


with help of "build and clean" you can remove the old build files and make the new files.so that the updates will be effectively shown in the views.

0

精彩评论

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