User:Cronolio/build/make

From Gentoo Wiki
Jump to:navigation Jump to:search

make is a GNUs build tool which controlling the generation of end-user files from source files. The generation controlled via Makefiles. Below gentoo related information.

Installation

USE flags

Cannot load package information. Is the atom sys-devel/make correct?

Emerge

root #emerge --ask sys-devel/make

Usage

CODE
make [options] [target] ...

Check man make or make --help for options.

CODE Possible solution to show all targets
make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' | sort -u

Environment variables

Variables can come into make process environment from user/shell environment. make on the start checks an environment and transform each one variable to a make variable.

emake

To invoke make in ebuild portage uses emake. It take what written after emake command as an argument and also add additional variables. First variable is MAKEOPTS. Allows for user to pass make options, mostly used for setting number of jobs via make.conf file. Second variable is EXTRA_EMAKE. Used for overriding all make options; for debugging.


See also