Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GNU make cheat-sheet [closed]

Tags:

gnu-make

I'm learning to work with GNU make and I'm reading the manual (which is very good) but I'm missing a cheat-sheet for quick reference. Is there any good?

Note: It's quite hard to find to google this.

like image 756
Martin Vseticka Avatar asked Oct 19 '11 11:10

Martin Vseticka


People also ask

What is $@ in makefile?

$@ is the name of the target being generated, and $< the first prerequisite (usually a source file). You can find a list of all these special variables in the GNU Make manual.

What does AT symbol mean in makefile?

The @ symbol is commonly seen at the beginning of an action lines and means that the action line itself is not be be echoed on the screen as it is executed. Macros are commonly used in makefiles to decrease the amount of typing required.

What is $( make in makefile?

And in your scenario, $MAKE is used in commands part (recipe) of makefile. It means whenever there is a change in dependency, make executes the command make --no-print-directory post-build in whichever directory you are on.


2 Answers

Here is one by Frank Schacherer.

like image 103
Clement J. Avatar answered Sep 22 '22 02:09

Clement J.


I have made my own. It is definitely not a perfect one but it served me well:

  • http://martinvseticka.eu/temp/make/presentation.html
  • http://martinvseticka.eu/temp/make/normal.html

Note: The source for the slides is the official manual.

like image 37
Martin Vseticka Avatar answered Sep 21 '22 02:09

Martin Vseticka