LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   About make and Makefiles. (https://www.linuxquestions.org/questions/linux-newbie-8/about-make-and-makefiles-851803/)

stf92 12-22-2010 07:38 AM

About make and Makefiles.
 
Hi:

I did 'make' and afterwards saw I should have modified something in the Makefile. I made the modification but, when I again ran make, it said "Nothing to be done for all". How can I force make to do again all the steps in the Makefile? Thanks for reading.

Drakeo 12-22-2010 08:06 AM

make clean, then make, make distclean to clear the config ,if it is part of the make file.

stf92 12-22-2010 08:24 AM

Thanks a lot.

theNbomr 12-22-2010 08:28 AM

And as for why this is...
The fundamental premise of make is that it uses rules (in the Makefile) to do two things:
1.) see if a product is older than the components from which it is built.
2.) execute the commands in each rule for the case when the product is older than its component parts

The original idea of make was probably to improve efficiency by avoiding rebuilding things which are already up-to-date, as compiling and linking can be time consuming and expensive. When computers were slower and more expensive, this was a very significant factor. Generally, developers create Makefile rules like 'clean' which remove all of the products of a build, and so when make is subsequently run, the rules to re-build all products will be invoked.

Today, make has evolved to be an extremely versatile tool with much more functionality, and people see it as a form of packaging. This is largely correct, especially when it is used in conjunction with the autotools components that are used to create Makefiles and configure scripts that generally work properly based on specific target and build-host architectures.

Understanding the basic purpose of developer tools is useful in solving problems related to their use.

--- rod.

stf92 12-22-2010 02:11 PM

Thank you for your post, theNbomr.


All times are GMT -5. The time now is 03:20 PM.