Skip to content

marcosps/makefile-examples

Repository files navigation

Example of how to use some Make features

Use the following make invocations to see different behaviors from variables or other make features:

$ make -f CheckDirExists.mk

$ make -f IncludeCheck.mk

$ make -f TargetOverride.mk

$ make -f DuplicatedTargets.mk target1

$ make -f TestVarExposure.mk VAR3=ble

$ make

$ make all

$ make test-check

$ make all dummy1 dummy2


# because of the '+' sign, the bla dir will be created
$ make --just-print

References for the commands

call

Canned Recipes, define

$(MAKE), '+'

'-'

MAKEFILE_LIST, .DEFAULT_GOAL

filter, lastword, patsubst, words

include

echo, --just-print, @

export

MAKECMDGOALS

MAKEFLAGS

abspath, dir, notdir, realpath

CURDIR

Automatic variables, $*, $<, $^

Set variable from command-line

Double-Colon Rules

Substitution References

PHONY targets

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published