How to make automated installation without repetitive confirmation while building software

This article will help people who are tired of having to click "OK" to confirm software installation.
Building software from ports takes quite a lot of time, especially when using bulky programs like ImageMagick or Apache. For example, if you install ImageMagick you will notice that this program has a lot of dependencies. Dependencies are programs which need to be installed before ImageMagick can be installed; ImageMagick can't work without them. The hardest thing about installing ImageMagick is that you need to be in the vicinity of the computer to confirm the installation of each dependent program. Installation will be delayed until you click "OK" to confirm the installation of every dependent program (by this action you confirm options of the current program).
Choosing options when installing programs is a good thing because it gives you the option of building programs with or without certain additional modules or feature which may affect the overall performance of the software. But in most cases the default options should be chosen and don't need to be changed. For such cases, the requests for confirmation of additional options should be turned off. The following code automates the confirmation of the options:
make BATCH=yes install clean
But there are also cases when some options have to be included and some excluded. This can be done by adding some parameters to the command which starts the installation of the program.
make WITH_NAME_OF_YOUR_OPTION1=yes WITH_NAME_OF_YOUR_OPTION2=yes WITHOUT_NAME_OF_YOUR_OPTION1=yes WITHOUT_NAME_OF_YOUR_OPTION2=yes BATCH=yes install clean
Instead of the text in bold:
- WITH_NAME_OF_YOUR_OPTION1, WITH_NAME_OF_YOUR_OPTION2 place the names of the options which must be included;
- WITHOUT_NAME_OF_YOUR_OPTION1, WITHOUT_NAME_OF_YOUR_OPTION2 place the names of the options which must be excluded.