Introduction to makefile

77
Introduction to Makefile Ray Song February 25, 2012 Ray Song Introduction to Makefile

description

http://maskray.me/blog/2012-02-25-introduction-to-makefile

Transcript of Introduction to makefile

Page 1: Introduction to makefile

Introduction to Makefile

Ray Song

February 25, 2012

Ray Song Introduction to Makefile

Page 2: Introduction to makefile

Motivation

I Small programs -> single file -> manual compilationI “not so small” programs

I many filesI multiple componentsI more than one programmers

Ray Song Introduction to Makefile

Page 3: Introduction to makefile

Motivation

I Small programs -> single file -> manual compilationI “not so small” programs

I many filesI multiple componentsI more than one programmers

Ray Song Introduction to Makefile

Page 4: Introduction to makefile

Motivation

I Small programs -> single file -> manual compilationI “not so small” programs

I many filesI multiple componentsI more than one programmers

Ray Song Introduction to Makefile

Page 5: Introduction to makefile

Motivation

I Small programs -> single file -> manual compilationI “not so small” programs

I many filesI multiple componentsI more than one programmers

Ray Song Introduction to Makefile

Page 6: Introduction to makefile

Motivation

I Small programs -> single file -> manual compilationI “not so small” programs

I many filesI multiple componentsI more than one programmers

Ray Song Introduction to Makefile

Page 7: Introduction to makefile

Motivation - cont.

I ProblemsI harder to manageI every change require long compilationI division to components is desired

Ray Song Introduction to Makefile

Page 8: Introduction to makefile

Motivation - cont.

I ProblemsI harder to manageI every change require long compilationI division to components is desired

Ray Song Introduction to Makefile

Page 9: Introduction to makefile

Motivation - cont.

I ProblemsI harder to manageI every change require long compilationI division to components is desired

Ray Song Introduction to Makefile

Page 10: Introduction to makefile

Motivation - cont.

I ProblemsI harder to manageI every change require long compilationI division to components is desired

Ray Song Introduction to Makefile

Page 11: Introduction to makefile

Motivation - cont.

I Solution - Makefile

Ray Song Introduction to Makefile

Page 12: Introduction to makefile

Makefile

I Makefile describesI project structureI instructions for files creation

I A makefile consists of many rules.

Ray Song Introduction to Makefile

Page 13: Introduction to makefile

Makefile

I Makefile describesI project structureI instructions for files creation

I A makefile consists of many rules.

Ray Song Introduction to Makefile

Page 14: Introduction to makefile

Makefile

I Makefile describesI project structureI instructions for files creation

I A makefile consists of many rules.

Ray Song Introduction to Makefile

Page 15: Introduction to makefile

Makefile

I Makefile describesI project structureI instructions for files creation

I A makefile consists of many rules.

Ray Song Introduction to Makefile

Page 16: Introduction to makefile

Rule syntax

TARGETS: PREREQUISITES

RECIPE

I In short, each rule describe instructions (RECIPE) to createfiles (TARGETS) with PREREQUISITES.

I PREREQUISITES are targets must be created prior toTARGETS.

I A target is considered old if its modification timestamp issmaller than one of its dependencies’s.

Ray Song Introduction to Makefile

Page 17: Introduction to makefile

Rule syntax

TARGETS: PREREQUISITES

RECIPE

I In short, each rule describe instructions (RECIPE) to createfiles (TARGETS) with PREREQUISITES.

I PREREQUISITES are targets must be created prior toTARGETS.

I A target is considered old if its modification timestamp issmaller than one of its dependencies’s.

Ray Song Introduction to Makefile

Page 18: Introduction to makefile

Rule syntax

TARGETS: PREREQUISITES

RECIPE

I In short, each rule describe instructions (RECIPE) to createfiles (TARGETS) with PREREQUISITES.

I PREREQUISITES are targets must be created prior toTARGETS.

I A target is considered old if its modification timestamp issmaller than one of its dependencies’s.

Ray Song Introduction to Makefile

Page 19: Introduction to makefile

Makefile – cont.

I TARGETS and PREREQUISITES are file names separatedby spaces.

I Usually there is only one target per rule.

I TARGETS and PREREQUISITES may contain wildcards,e.g. %.c.

I Each line of RECIPE starts with a TAB.

I The first rule indicates the default target (not countingtargets that contain wildcards).

Ray Song Introduction to Makefile

Page 20: Introduction to makefile

Makefile – cont.

I TARGETS and PREREQUISITES are file names separatedby spaces.

I Usually there is only one target per rule.

I TARGETS and PREREQUISITES may contain wildcards,e.g. %.c.

I Each line of RECIPE starts with a TAB.

I The first rule indicates the default target (not countingtargets that contain wildcards).

Ray Song Introduction to Makefile

Page 21: Introduction to makefile

Makefile – cont.

I TARGETS and PREREQUISITES are file names separatedby spaces.

I Usually there is only one target per rule.

I TARGETS and PREREQUISITES may contain wildcards,e.g. %.c.

I Each line of RECIPE starts with a TAB.

I The first rule indicates the default target (not countingtargets that contain wildcards).

Ray Song Introduction to Makefile

Page 22: Introduction to makefile

Makefile – cont.

I TARGETS and PREREQUISITES are file names separatedby spaces.

I Usually there is only one target per rule.

I TARGETS and PREREQUISITES may contain wildcards,e.g. %.c.

I Each line of RECIPE starts with a TAB.

I The first rule indicates the default target (not countingtargets that contain wildcards).

Ray Song Introduction to Makefile

Page 23: Introduction to makefile

Makefile – cont.

I TARGETS and PREREQUISITES are file names separatedby spaces.

I Usually there is only one target per rule.

I TARGETS and PREREQUISITES may contain wildcards,e.g. %.c.

I Each line of RECIPE starts with a TAB.

I The first rule indicates the default target (not countingtargets that contain wildcards).

Ray Song Introduction to Makefile

Page 24: Introduction to makefile

make’s mechanism

I make command reads a makefile and records these rules intoits data base.

I GNU Make defaults to search GNUmakefile, makefile,Makefile in order, use the first of these which exists.

I The first goal (terminology used to refer to the list of targetsyou specified on the command line) should be created.

I Prerequisites which appeared in the target must be processedfirst.

I This is a recursive process (depth first search).

I After updating the dependencies , make decides whether it isnecessary to recreated the target. This is the case when it isolder than one of its dependencies. In the case we recreatethe target, execute the associated recipe.

Ray Song Introduction to Makefile

Page 25: Introduction to makefile

make’s mechanism

I make command reads a makefile and records these rules intoits data base.

I GNU Make defaults to search GNUmakefile, makefile,Makefile in order, use the first of these which exists.

I The first goal (terminology used to refer to the list of targetsyou specified on the command line) should be created.

I Prerequisites which appeared in the target must be processedfirst.

I This is a recursive process (depth first search).

I After updating the dependencies , make decides whether it isnecessary to recreated the target. This is the case when it isolder than one of its dependencies. In the case we recreatethe target, execute the associated recipe.

Ray Song Introduction to Makefile

Page 26: Introduction to makefile

make’s mechanism

I make command reads a makefile and records these rules intoits data base.

I GNU Make defaults to search GNUmakefile, makefile,Makefile in order, use the first of these which exists.

I The first goal (terminology used to refer to the list of targetsyou specified on the command line) should be created.

I Prerequisites which appeared in the target must be processedfirst.

I This is a recursive process (depth first search).

I After updating the dependencies , make decides whether it isnecessary to recreated the target. This is the case when it isolder than one of its dependencies. In the case we recreatethe target, execute the associated recipe.

Ray Song Introduction to Makefile

Page 27: Introduction to makefile

make’s mechanism

I make command reads a makefile and records these rules intoits data base.

I GNU Make defaults to search GNUmakefile, makefile,Makefile in order, use the first of these which exists.

I The first goal (terminology used to refer to the list of targetsyou specified on the command line) should be created.

I Prerequisites which appeared in the target must be processedfirst.

I This is a recursive process (depth first search).

I After updating the dependencies , make decides whether it isnecessary to recreated the target. This is the case when it isolder than one of its dependencies. In the case we recreatethe target, execute the associated recipe.

Ray Song Introduction to Makefile

Page 28: Introduction to makefile

make’s mechanism

I make command reads a makefile and records these rules intoits data base.

I GNU Make defaults to search GNUmakefile, makefile,Makefile in order, use the first of these which exists.

I The first goal (terminology used to refer to the list of targetsyou specified on the command line) should be created.

I Prerequisites which appeared in the target must be processedfirst.

I This is a recursive process (depth first search).

I After updating the dependencies , make decides whether it isnecessary to recreated the target. This is the case when it isolder than one of its dependencies. In the case we recreatethe target, execute the associated recipe.

Ray Song Introduction to Makefile

Page 29: Introduction to makefile

make’s mechanism

I make command reads a makefile and records these rules intoits data base.

I GNU Make defaults to search GNUmakefile, makefile,Makefile in order, use the first of these which exists.

I The first goal (terminology used to refer to the list of targetsyou specified on the command line) should be created.

I Prerequisites which appeared in the target must be processedfirst.

I This is a recursive process (depth first search).

I After updating the dependencies , make decides whether it isnecessary to recreated the target. This is the case when it isolder than one of its dependencies. In the case we recreatethe target, execute the associated recipe.

Ray Song Introduction to Makefile

Page 30: Introduction to makefile

make’s mechanism - cont.

I make virtually construct a dependency DAG (directed acyclicgraph).

I make ensures minimum compilation as long as the projectstructure is written properly.

I Do not write something like:

prog: main.c sum1.c sum2.c

gcc –o prog main.c sum1.c sum2.c

which requires compilation of all project when something ischanged

Ray Song Introduction to Makefile

Page 31: Introduction to makefile

make’s mechanism - cont.

I make virtually construct a dependency DAG (directed acyclicgraph).

I make ensures minimum compilation as long as the projectstructure is written properly.

I Do not write something like:

prog: main.c sum1.c sum2.c

gcc –o prog main.c sum1.c sum2.c

which requires compilation of all project when something ischanged

Ray Song Introduction to Makefile

Page 32: Introduction to makefile

make’s mechanism - cont.

I make virtually construct a dependency DAG (directed acyclicgraph).

I make ensures minimum compilation as long as the projectstructure is written properly.

I Do not write something like:

prog: main.c sum1.c sum2.c

gcc –o prog main.c sum1.c sum2.c

which requires compilation of all project when something ischanged

Ray Song Introduction to Makefile

Page 33: Introduction to makefile

make’s mechanism - cont.

I make virtually construct a dependency DAG (directed acyclicgraph).

I make ensures minimum compilation as long as the projectstructure is written properly.

I Do not write something like:

prog: main.c sum1.c sum2.c

gcc –o prog main.c sum1.c sum2.c

which requires compilation of all project when something ischanged

Ray Song Introduction to Makefile

Page 34: Introduction to makefile

make’s mechanism - cont.

I make virtually construct a dependency DAG (directed acyclicgraph).

I make ensures minimum compilation as long as the projectstructure is written properly.

I Do not write something like:

prog: main.c sum1.c sum2.c

gcc –o prog main.c sum1.c sum2.c

which requires compilation of all project when something ischanged

Ray Song Introduction to Makefile

Page 35: Introduction to makefile

make’s mechanism - cont.

I make virtually construct a dependency DAG (directed acyclicgraph).

I make ensures minimum compilation as long as the projectstructure is written properly.

I Do not write something like:

prog: main.c sum1.c sum2.c

gcc –o prog main.c sum1.c sum2.c

which requires compilation of all project when something ischanged

Ray Song Introduction to Makefile

Page 36: Introduction to makefile

Automatic variables

I $@

I $ˆ

I $<

I others including $, $?, $+, $|, $%, $(%D), %(F), . . .

Ray Song Introduction to Makefile

Page 37: Introduction to makefile

Automatic variables

I $@

I $ˆ

I $<

I others including $, $?, $+, $|, $%, $(%D), %(F), . . .

Ray Song Introduction to Makefile

Page 38: Introduction to makefile

Automatic variables

I $@

I $ˆ

I $<

I others including $, $?, $+, $|, $%, $(%D), %(F), . . .

Ray Song Introduction to Makefile

Page 39: Introduction to makefile

Automatic variables

I $@

I $ˆ

I $<

I others including $, $?, $+, $|, $%, $(%D), %(F), . . .

Ray Song Introduction to Makefile

Page 40: Introduction to makefile

Example

convert: cmdline.o convert.o

g++ $ˆ -o $@

convert.o: convert.cpp convert.h

g++ -c $<

cmdline.o: cmdline.cpp cmdline.h convert.h

g++ -c $<

Ray Song Introduction to Makefile

Page 41: Introduction to makefile

Equivalent (implicit rules)

I make can dedude appropriate recipes according to suffixes

convert: cmdline.o convert.o

convert.o: convert.cpp convert.h

cmdline.o: cmdline.cpp cmdline.h convert.h

Ray Song Introduction to Makefile

Page 42: Introduction to makefile

Equivalent (implicit rules) - cont.

convert: cmdline.o

convert.o: convert.h

cmdline.o: cmdline.h convert.h

Ray Song Introduction to Makefile

Page 43: Introduction to makefile

Another example

%.o: %.c

gcc -c $<

Ray Song Introduction to Makefile

Page 44: Introduction to makefile

Passing parameters

test: FORCE

echo $(VAR)

FORCE:

I make VAR=hello

I make VAR=world

Ray Song Introduction to Makefile

Page 45: Introduction to makefile

Passing parameters

test: FORCE

echo $(VAR)

FORCE:

I make VAR=hello

I make VAR=world

Ray Song Introduction to Makefile

Page 46: Introduction to makefile

Force targets

I Targets without recipes or prerequisites

Ray Song Introduction to Makefile

Page 47: Introduction to makefile

Phony targets

I They do not correspond to real file.

I Provide some utility, e.g. cleaning intermediate files, archivingthe whole project, creating TAGS file for some editors

I Forced to run its recipe upon executing.

Ray Song Introduction to Makefile

Page 48: Introduction to makefile

Phony targets

I They do not correspond to real file.

I Provide some utility, e.g. cleaning intermediate files, archivingthe whole project, creating TAGS file for some editors

I Forced to run its recipe upon executing.

Ray Song Introduction to Makefile

Page 49: Introduction to makefile

Phony targets

I They do not correspond to real file.

I Provide some utility, e.g. cleaning intermediate files, archivingthe whole project, creating TAGS file for some editors

I Forced to run its recipe upon executing.

Ray Song Introduction to Makefile

Page 50: Introduction to makefile

Example

all : prog1 prog2 prog3

.PHONY : all

prog1 : prog1.o utils.o

cc -o prog1 prog1.o utils.o

prog2 : prog2.o

cc -o prog2 prog2.o

prog3 : prog3.o sort.o utils.o

cc -o prog3 prog3.o sort.o utils.o

Ray Song Introduction to Makefile

Page 51: Introduction to makefile

Practical options of make

I -n, print the commands to be run but do not execute them

I -t, touch files instead of running the recipes

I -B, unconditionally make all targets (overide timestamps)

I -W file, pretend file has been just modified

I -p, print the data base that results from reading the makefiles

I -d, debug mode

I others, RTFM

Ray Song Introduction to Makefile

Page 52: Introduction to makefile

Practical options of make

I -n, print the commands to be run but do not execute them

I -t, touch files instead of running the recipes

I -B, unconditionally make all targets (overide timestamps)

I -W file, pretend file has been just modified

I -p, print the data base that results from reading the makefiles

I -d, debug mode

I others, RTFM

Ray Song Introduction to Makefile

Page 53: Introduction to makefile

Practical options of make

I -n, print the commands to be run but do not execute them

I -t, touch files instead of running the recipes

I -B, unconditionally make all targets (overide timestamps)

I -W file, pretend file has been just modified

I -p, print the data base that results from reading the makefiles

I -d, debug mode

I others, RTFM

Ray Song Introduction to Makefile

Page 54: Introduction to makefile

Practical options of make

I -n, print the commands to be run but do not execute them

I -t, touch files instead of running the recipes

I -B, unconditionally make all targets (overide timestamps)

I -W file, pretend file has been just modified

I -p, print the data base that results from reading the makefiles

I -d, debug mode

I others, RTFM

Ray Song Introduction to Makefile

Page 55: Introduction to makefile

Practical options of make

I -n, print the commands to be run but do not execute them

I -t, touch files instead of running the recipes

I -B, unconditionally make all targets (overide timestamps)

I -W file, pretend file has been just modified

I -p, print the data base that results from reading the makefiles

I -d, debug mode

I others, RTFM

Ray Song Introduction to Makefile

Page 56: Introduction to makefile

Practical options of make

I -n, print the commands to be run but do not execute them

I -t, touch files instead of running the recipes

I -B, unconditionally make all targets (overide timestamps)

I -W file, pretend file has been just modified

I -p, print the data base that results from reading the makefiles

I -d, debug mode

I others, RTFM

Ray Song Introduction to Makefile

Page 57: Introduction to makefile

Practical options of make

I -n, print the commands to be run but do not execute them

I -t, touch files instead of running the recipes

I -B, unconditionally make all targets (overide timestamps)

I -W file, pretend file has been just modified

I -p, print the data base that results from reading the makefiles

I -d, debug mode

I others, RTFM

Ray Song Introduction to Makefile

Page 58: Introduction to makefile

Other usage

I Makefile’s mechanism is not limited to programsI LaTeX sourcesI website deploymentI describe any task where some files need updating as a result of

changes of other files

Ray Song Introduction to Makefile

Page 59: Introduction to makefile

Other usage

I Makefile’s mechanism is not limited to programsI LaTeX sourcesI website deploymentI describe any task where some files need updating as a result of

changes of other files

Ray Song Introduction to Makefile

Page 60: Introduction to makefile

Other usage

I Makefile’s mechanism is not limited to programsI LaTeX sourcesI website deploymentI describe any task where some files need updating as a result of

changes of other files

Ray Song Introduction to Makefile

Page 61: Introduction to makefile

Other usage

I Makefile’s mechanism is not limited to programsI LaTeX sourcesI website deploymentI describe any task where some files need updating as a result of

changes of other files

Ray Song Introduction to Makefile

Page 62: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 63: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 64: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 65: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 66: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 67: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 68: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 69: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 70: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 71: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 72: Introduction to makefile

Additional features

I Variables (two flavors: simple and recursive, the latter is alsocalled macros)

I Functions including string substitution, file namemanipulation, foreach, even the the root of evil – eval

I VPATH

I Ability to manipulate archives(.a)

I Including other makefiles

I Conditionals

I Secondary expansion

I Order-only prerequisites

I Static patterns

I Double-colon rules

I Target/pattern-specific variable values

Ray Song Introduction to Makefile

Page 73: Introduction to makefile

Acknowledgements

I This slide incorporate some stuff from Roded Sharan’shttp://www.cs.tau.ac.il/~roded/courses/softp-b06/

Makefile.ppt

I Markdownhttp://daringfireball.net/projects/markdown/ inwhich this slide source is written.

I Pandoc http://johnmacfarlane.net/pandoc/ by whichthis slide is generated.

I Haskell http://www.haskell.org/ in which Pandoc isimplemented.

Ray Song Introduction to Makefile

Page 74: Introduction to makefile

Acknowledgements

I This slide incorporate some stuff from Roded Sharan’shttp://www.cs.tau.ac.il/~roded/courses/softp-b06/

Makefile.ppt

I Markdownhttp://daringfireball.net/projects/markdown/ inwhich this slide source is written.

I Pandoc http://johnmacfarlane.net/pandoc/ by whichthis slide is generated.

I Haskell http://www.haskell.org/ in which Pandoc isimplemented.

Ray Song Introduction to Makefile

Page 75: Introduction to makefile

Acknowledgements

I This slide incorporate some stuff from Roded Sharan’shttp://www.cs.tau.ac.il/~roded/courses/softp-b06/

Makefile.ppt

I Markdownhttp://daringfireball.net/projects/markdown/ inwhich this slide source is written.

I Pandoc http://johnmacfarlane.net/pandoc/ by whichthis slide is generated.

I Haskell http://www.haskell.org/ in which Pandoc isimplemented.

Ray Song Introduction to Makefile

Page 76: Introduction to makefile

Acknowledgements

I This slide incorporate some stuff from Roded Sharan’shttp://www.cs.tau.ac.il/~roded/courses/softp-b06/

Makefile.ppt

I Markdownhttp://daringfireball.net/projects/markdown/ inwhich this slide source is written.

I Pandoc http://johnmacfarlane.net/pandoc/ by whichthis slide is generated.

I Haskell http://www.haskell.org/ in which Pandoc isimplemented.

Ray Song Introduction to Makefile

Page 77: Introduction to makefile

References

I GNU Make Manualhttp://www.gnu.org/software/make/manual/

Ray Song Introduction to Makefile