From d1740256b23a200cbf5069bf2b8efbfaecdce8ac Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Thu, 3 Mar 2016 00:45:43 +0530 Subject: fixed typos and spellings, added content --- make.html.markdown | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'make.html.markdown') diff --git a/make.html.markdown b/make.html.markdown index bf934c58..ed452521 100644 --- a/make.html.markdown +++ b/make.html.markdown @@ -2,6 +2,7 @@ language: make contributors: - ["Robert Steed", "https://github.com/robochat"] + - ["Divay Prakash", "https://github.com/divayprakash"] filename: Makefile --- @@ -9,16 +10,16 @@ A Makefile defines a graph of rules for creating a target (or targets). Its purpose is to do the minimum amount of work needed to update a target to the most recent version of the source. Famously written over a weekend by Stuart Feldman in 1976, it is still widely used (particularly -on Unix) despite many competitors and criticisms. +on Unix and Linux) despite many competitors and criticisms. -There are many varieties of make in existence, this article assumes that -we are using GNU make which is the standard on Linux. +There are many varieties of make in existence, however this article +assumes that we are using GNU make which is the standard on Linux. ```make # Comments can be written like this. -# Files should be named Makefile and then be can run as `make `. +# File should be named Makefile and then can be run as `make `. # Otherwise we use `make -f "filename" `. # Warning - only use TABS to indent in Makefiles, never spaces! @@ -27,13 +28,16 @@ we are using GNU make which is the standard on Linux. # Basics #----------------------------------------------------------------------- +# Rules are of the format +# target: +# where prerequisites are optional. + # A rule - this rule will only run if file0.txt doesn't exist. file0.txt: echo "foo" > file0.txt # Even comments in these 'recipe' sections get passed to the shell. # Try `make file0.txt` or simply `make` - first rule is the default. - # This rule will only run if file0.txt is newer than file1.txt. file1.txt: file0.txt cat file0.txt > file1.txt @@ -99,8 +103,8 @@ process: ex1.txt file0.txt %.png: %.svg inkscape --export-png $^ -# Pattern rules will only do anything if make decides to create the \ -target. +# Pattern rules will only do anything if make decides to create the +# target. # Directory paths are normally ignored when matching pattern rules. But # make will try to use the most appropriate rule available. @@ -185,7 +189,7 @@ var := hello var2 ::= $(var) hello #:= and ::= are equivalent. -# These variables are evaluated procedurely (in the order that they +# These variables are evaluated procedurally (in the order that they # appear), thus breaking with the rest of the language ! # This doesn't work -- cgit v1.2.3 From 717f515fcf3c7757447235ed9fa5fbdbfc4848b2 Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Sat, 12 Mar 2016 13:35:59 +0530 Subject: fixed --- make.html.markdown | 1 - 1 file changed, 1 deletion(-) (limited to 'make.html.markdown') diff --git a/make.html.markdown b/make.html.markdown index ed452521..c7950178 100644 --- a/make.html.markdown +++ b/make.html.markdown @@ -2,7 +2,6 @@ language: make contributors: - ["Robert Steed", "https://github.com/robochat"] - - ["Divay Prakash", "https://github.com/divayprakash"] filename: Makefile --- -- cgit v1.2.3