Linux system command make, clean usage explain

  

First look at what is makefile

makefile defines a series of rules to specify, which files need to be compiled first, which files need to be compiled, which files Need to recompile, or even more complex functional operations, because the makefile is like a shell script, which can also execute operating system commands.

The benefit of makefile is --- "automatic compilation", once written, only need a make command, the entire project is fully automatically compiled, greatly improving the efficiency of software development. Make is a command tool, a command tool to explain the instructions in the makefile. In general, most IDEs have this command, such as: Delphi make, Visual C++ nmake, Linux GNU make. Visible, makefile Become a compilation method in engineering.

make

Compile source code, connect, generate object files, executable files according to the Makefile.

make clean

Clear the object file (the file with the suffix "<;o”") and the executable file generated by the last make command.

make install

Install the compiled executable into the system directory, usually in the /usr/local/bin directory.

make dist

Generate a distribution package file (ie distribution package). This command will package the executable and related files into a tar.gz compressed file for use as a software package.

It will generate a file with a name similar to “PACKAGE-VERSION.tar.gz” in the current directory. PACKAGE and VERSION are the AM_INIT_AUTOMAKE(PACKAGE, VERSION) we defined in configure.in.

make distcheck

Generate a release package and test it to determine the correctness of the release package. This operation will automatically unzip the archive file, then execute the configure command, and execute make to confirm that the compilation does not have an error. Finally, you are prompted that the package is ready and ready for release.

make distclean

Similar to make clean, but also delete all files generated by configure, including Makefile.

Copyright © Windows knowledge All Rights Reserved