Dum Ka Biryani, Make For Each Other

3y ago
32 Views
2 Downloads
1.12 MB
63 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Shaun Edmunds
Transcription

Dum Ka Biryani,Make for each otherVersion 1.0February 2011GNU Free Documentation LicenseShakthi com()Dum Ka Biryani, Make for each other1/1

Dum Ka Biryani()Dum Ka Biryani, Make for each other2/1

2.1 What a Rule Looks LikeMakefiletarget : prerequisites .recipe.Tab before recipe!()Dum Ka Biryani, Make for each other3/1

2.2 A Simple MakefileMakefilebiryani : masala.o rice.o onion.o curd.o coriander.o meat.occ -o biryani masala.o rice.o onion.o curd.o coriander.o meat.omasala.o : masala.c masala.h defs.hcc -c masala.crice.o : rice.c rice.h defs.hcc -c rice.conion.o : onion.c defs.hcc -c onion.ccurd.o : curd.c defs.hcc -c curd.ccoriander.o : coriander.c defs.hcc -c coriander.cmeat.o : meat.c defs.hcc -c meat.cclean:rm biryani \masala.o rice.o onion.o curd.o coriander.o meat.o()Dum Ka Biryani, Make for each other4/1

2.4 Variables Make Makefiles SimplerMakefileobjects masala.o rice.o onion.o curd.o coriander.o meat.obiryani : (objects)cc -o biryani (objects)masala.o : masala.c masala.h defs.hcc -c masala.crice.o : rice.c rice.h defs.hcc -c rice.conion.o : onion.c defs.hcc -c onion.ccurd.o : curd.c defs.hcc -c curd.ccoriander.o : coriander.c defs.hcc -c coriander.cmeat.o : meat.c defs.hcc -c meat.cclean:rm biryani (objects)()Dum Ka Biryani, Make for each other5/1

2.5 Letting make Deduce the RecipesMakefileobjects masala.o rice.o onion.o curd.o coriander.o meat.obiryani : (objects)cc -o biryani (objects)masala.o : masala.h defs.hrice.o : rice.h defs.honion.o : defs.hcurd.o : defs.hcoriander.o : defs.hmeat.o : defs.hclean:rm biryani (objects)()Dum Ka Biryani, Make for each other6/1

2.6 Another Style of MakefileMakefileobjects masala.o rice.o onion.o curd.o coriander.o meat.obiryani : (objects)cc -o biryani (objects) (objects) : defs.hmasala.o : masala.hrice.o : rice.hclean:rm biryani (objects)()Dum Ka Biryani, Make for each other7/1

2.7 Rules for Cleaning the DirectoryMakefileobjects masala.o rice.o onion.o curd.o coriander.o meat.obiryani : (objects)cc -o biryani (objects) (objects) : defs.hmasala.o : masala.hrice.o : rice.h.PHONY : cleanclean:-rm biryani (objects)()Dum Ka Biryani, Make for each other8/1

3.1 What Makefiles Contain* Explicit ruleonion.o : onion.c defs.hcc -c onion.c* Implicit rulemasala.o : masala.h* Variable definitionobjects masala.o rice.o onion.o curd.o coriander.o meat.o* Directiveifeq ( (CC), gcc)libs (libs for gcc)elselibs (normal libs)endif* Comments# This is a comment()Dum Ka Biryani, Make for each other9/1

3.2 What Name to Give Your MakefileDefault* GNUMakefile* makefile* Makefile()Dum Ka Biryani, Make for each other10 / 1

3.2 What Name to Give Your MakefileDefault* GNUMakefile* makefile* Makefile make make -f myMakefile make --file myMakefile()Dum Ka Biryani, Make for each other10 / 1

3.3 Including Other Makefiles* Syntaxinclude filenames.* Regex and variables allowedinclude foo *.mk (bar)* To ignore Makefile if not found-include filenames.()Dum Ka Biryani, Make for each other11 / 1

3.3 Including Other Makefiles* Syntaxinclude filenames.* Regex and variables allowedinclude foo *.mk (bar)* To ignore Makefile if not found-include filenames. make make -I make --include-dir()Dum Ka Biryani, Make for each other11 / 1

3.6 Overriding Part of Another MakefileGNUmakefilemeat:cc -c vegetables.c%: force@ (MAKE) -f Makefile @force: ;()Dum Ka Biryani, Make for each other12 / 1

3.6 Overriding Part of Another MakefileGNUmakefilemeat:cc -c vegetables.c%: force@ (MAKE) -f Makefile @force: ; make make meat()Dum Ka Biryani, Make for each other12 / 1

3.7 How make Reads a MakefileFirst phase* Reads all makefiles* Reads included makefiles* Internalize variables, values, implicit and explicit rules* Constructs dependency graph of targets and pre-requisites* immediate: expansion in phase oneSecond phase* Determines which targets need to be re-built* Invokes the necessary rules* deferred: expansion in phase two()Dum Ka Biryani, Make for each other13 / 1

3.7 How make Reads a MakefileVariable assignment* immediate deferred* immediate ? deferred* immediate : immediate* immediate deferred or immediateimmediate, if variable was previously set as a simple variable (: )deferred, otherwiseSecond phase* Determines which targets need to be re-built* Invokes the necessary rules* deferred: expansion in phase two()Dum Ka Biryani, Make for each other14 / 1

3.7 How make Reads a MakefileConditional Directives* immediateRule DefinitionMakefiletarget : prerequisites .recipe.Makefileimmediate : immediate ; deferreddeferred()Dum Ka Biryani, Make for each other15 / 1

4.2 Rule Syntax* First target as default, if not specified.* A rule tells make two things: when the targets are out of date(prerequisites), and how to update them (recipe) when necessary.Makefiletarget : prerequisites .recipe.Makefiletarget : prerequisites ; reciperecipe.()Dum Ka Biryani, Make for each other16 / 1

4.4 Using Wildcard Characters in File NamesMakefileclean :rm -f *.oWildcard expansion does not happen in variable definitionMakefileobjects *.oUse Wildcard function!Makefileobjects (wildcard *.o)()Dum Ka Biryani, Make for each other17 / 1

4.5 Searching Directories for PrerequisitesVPATH make variableVPATH src:./headersvpath DirectiveMakefilevpath pattern directoriesvpath %.h ./headersTo clear search paths:Makefilevpath patternvpath %.hvpath()Dum Ka Biryani, Make for each other18 / 1

4.5.4 Writing Recipes with Directory SearchAutomatic variables ˆall prerequisites @ target first prerequisiteMakefilecoriander.o : coriander.ccc -c (CFLAGS) -o @Makefilemasala.o : masala.c masala.h defs.hcc -c (CFLAGS) -o @()Dum Ka Biryani, Make for each other19 / 1

4.6 Phony TargetsError in submake ignored:MakefileSUBDIRS masala rice onionsubdirs :for dir in (SUBDIRS); do \ (MAKE) -C dir; \doneMakefileSUBDIRS masala rice onion.PHONY : subdirs (SUBDIRS)subdirs: (SUBDIRS) (SUBDIRS): (MAKE) -C @()Dum Ka Biryani, Make for each other20 / 1

4.12 Static Pattern Rules* Override implicit rule.* No uncertainity.Makefiletargets . : target-pattern: prereq-patterns .recipe.Makefileobjects curd.o coriander.o masala.oall: (objects) (objects): %.o: %.c (CC) -c (CFLAGS) -o @()Dum Ka Biryani, Make for each other21 / 1

5.1 Recipe Syntax* Follows shell syntax.* Backslash-newline pairs are preserved and passed to the shell.Makefileall :@echo In a cooking vessel\add a layer of semi-cooked Basmati rice@echo Add meat on this\rice layer@echo Add another layer \of rice@echo Sprinkle the ingredients with water and cook()Dum Ka Biryani, Make for each other22 / 1

5.1 Recipe Syntax* Follows shell syntax.* Backslash-newline pairs are preserved and passed to the shell.Makefileall :@echo In a cooking vessel\add a layer of semi-cooked Basmati rice@echo Add meat on this\rice layer@echo Add another layer \of rice@echo Sprinkle the ingredients with water and cook makeIn a cooking vessel add a layer of semi-cooked Basmati riceAdd meat on this rice layerAdd another layer of riceSprinkle the ingredients with water and cook()Dum Ka Biryani, Make for each other22 / 1

5.1.2 Using Variables in RecipesMakefileLIST masala rice onionall:for i in (LIST); do \echo i; \done()Dum Ka Biryani, Make for each other23 / 1

5.1.2 Using Variables in RecipesMakefileLIST masala rice onionall:for i in (LIST); do \echo i; \done makemasalariceonion()Dum Ka Biryani, Make for each other23 / 1

5.4 Parallel Execution* -j number, number of recipies to execute in parallel.* -l number, number (limit) of jobs to run in parallel.()Dum Ka Biryani, Make for each other24 / 1

5.4 Parallel Execution* -j number, number of recipies to execute in parallel.* -l number, number (limit) of jobs to run in parallel. make make -j make --jobs make -l make --max-load()Dum Ka Biryani, Make for each other24 / 1

5.5 Errors in Recipes* Ignore errors in a recipe line.Makefileclean :-rm -f *.o()Dum Ka Biryani, Make for each other25 / 1

5.7 Recursive Use of make* Recursive make commands should always use the variable MAKE.Makefilesubsystem :cd subdir && (MAKE)Makefilesubsystem : (MAKE) -C subdir()Dum Ka Biryani, Make for each other26 / 1

5.7.2 Communicating Variables to Sub-makeMakefilevariable valueexport variable .unexport variable .Makefileexport variable valueexport variable : valueexport variable value()Dum Ka Biryani, Make for each other27 / 1

5.8 Defining Canned RecipesMakefiledefine mix-masala @echo "Adding green chillies"@echo "Adding ginger garlic paste"@echo "Adding cinnamon, cardamom"@echo "Adding fried onions"@echo "Adding coriander and mint leaves"endefmix: (mix-masala)()Dum Ka Biryani, Make for each other28 / 1

5.8 Defining Canned RecipesMakefiledefine mix-masala @echo "Adding green chillies"@echo "Adding ginger garlic paste"@echo "Adding cinnamon, cardamom"@echo "Adding fried onions"@echo "Adding coriander and mint leaves"endefmix: (mix-masala) make makeAddingAddingAddingAddingAddingmixgreen chilliesginger garlic pastecinnamon, cardamomfried onionscoriander and mint leaves()Dum Ka Biryani, Make for each other28 / 1

6.2 The Two Flavors of Variables* Recursively Expanded variableMakefilespice (chillies)chillies (both)both green chillies and red chillie powderall: ; echo (spice)()Dum Ka Biryani, Make for each other29 / 1

6.2 The Two Flavors of Variables* Recursively Expanded variableMakefilespice (chillies)chillies (both)both green chillies and red chillie powderall: ; echo (spice) makegreen chillies and red chillie powder()Dum Ka Biryani, Make for each other29 / 1

6.2 The Two Flavors of Variables* Simply Expanded variableMakefilechillie : red chilliespice : (chillie) powder, green chillieschillie : green chilliesall:echo (spice)echo (chillie)()Dum Ka Biryani, Make for each other30 / 1

6.2 The Two Flavors of Variables* Simply Expanded variableMakefilechillie : red chilliespice : (chillie) powder, green chillieschillie : green chilliesall:echo (spice)echo (chillie) makered chillie powder, green chilliesgreen chillies()Dum Ka Biryani, Make for each other30 / 1

6.2 The Two Flavors of Variables* Conditional Variable assignment operatorMakefileifeq ( (origin RICE), undefined)RICE Basmati riceendifMakefileRICE ? Basmati rice()Dum Ka Biryani, Make for each other31 / 1

6.3.1 Substitution ReferencesMakefilemasala : chillies.o onions.o garlic.o ginger.obiryani : (masala:.o .c)Makefilemasala : chillies.o onions.o garlic.o ginger.obiryani : (masala:%.o %.c)* ’biryani’ is set to ’chillies.c onions.c garlic.c ginger.c’()Dum Ka Biryani, Make for each other32 / 1

6.3.2 Computed Variable NamesMakefilegreeny coriandercoriander green coriander leavesleaves : ( (greeny))all:@echo (leaves)()Dum Ka Biryani, Make for each other33 / 1

6.3.2 Computed Variable NamesMakefilegreeny coriandercoriander green coriander leavesleaves : ( (greeny))all:@echo (leaves) makegreen coriander leaves()Dum Ka Biryani, Make for each other33 / 1

6.6 Appending More Text to VariablesMakefileobjects masala.o rice.o onion.o curd.o.objects coriander.oMakefileCFLAGS (includes) -O.CFLAGS -pg()Dum Ka Biryani, Make for each other34 / 1

6.7 The override DirectiveMakefileoverride variable valueoverride variable : valueoverride variable more textMakefileoverride CFLAGS -goverride define masala more-masalaendef()Dum Ka Biryani, Make for each other35 / 1

6.9 Undefining VariablesMakefilewater : saffron waterleaves mint leavesundefine waterundefine leavesMakefileoverride undefine CFLAGS()Dum Ka Biryani, Make for each other36 / 1

6.11 Target-specific Variable ValuesMakefiletarget . : variable-assignmentMakefileprog : CFLAGS -gprog : masala.o rice.o onion.o()Dum Ka Biryani, Make for each other37 / 1

6.12 Pattern-specific Variable ValuesMakefilepattern . : variable-assignmentMakefile%.o : CFLAGS -OMakefile%.o: %.c (CC) -c (CFLAGS) (CPPFLAGS) -o @lib/%.o: CFLAGS : -fPIC -g%.o: CFLAGS : -gall: rice.o lib/masala.o()Dum Ka Biryani, Make for each other38 / 1

7.1 Example of a ConditionalMakefilelibs for gcc -lgnunormal libs biryani : (objects)ifeq ( (CC), gcc)libs (libs for gcc)elselibs (normal libs)endif()Dum Ka Biryani, Make for each other39 / 1

7.2 Syntax of lsetext-if-false rueendifelse conditional-directivetext-if-trueelsetext-if-false endif()Dum Ka Biryani, Make for each other40 / 1

7.2 Syntax of ConditionalsFour conditional directives:* ifeqifeq ( (CC), gcc)* ifneqifneq ( (STRIP), strip)* ifdefifdef (LIBS)* ifndefifndef (CFLAGS)()Dum Ka Biryani, Make for each other41 / 1

8.1 Function Call SyntaxMakefile (function arguments) {function arguments}Makefilecomma : ,empty : space: (empty) (empty)masala: chillies onion garlic gingerlist: (subst (space), (comma), (masala))’list’ is now ’chillies,onion,garlic,ginger’()Dum Ka Biryani, Make for each other42 / 1

8.2 Functions for String Substitution and AnalysisMakefile (subst from,to,text ) (patsubst pattern,replacement,text ) (strip string ) (findstring find,in ) (filter pattern.,text ) (filter-out pattern.,text ) (sort list ) (word n, text )()Dum Ka Biryani, Make for each other43 / 1

8.3 Functions for File NamesMakefile (dir names. ) (notdir names. ) (suffix names. ) (basename names. ) (addsuffix suffix,names. ) (addprefix prefix,names. ) (join list1, list2 ) (wildcard pattern )()Dum Ka Biryani, Make for each other44 / 1

8.4 Functions for ConditionalsMakefile (if condition,then-part[,else-part] ) (or condition1[,condition2[,condition3.]] ) (and condition1[,condition2[,condition3.]] )()Dum Ka Biryani, Make for each other45 / 1

8.5 The foreach FunctionMakefile (foreach var,list,text )Makefilefind files (wildcard (dir)/*)dirs : masala rice leavesfiles : (foreach dir, (dirs), (find files))()Dum Ka Biryani, Make for each other46 / 1

8.6 The call FunctionMakefile (call variable,param,param,. )Makefilereverse (2) (1)make (call reverse,cook,mix)’make’ contains ’mix cook’()Dum Ka Biryani, Make for each other47 / 1

8.7 The value FunctionMakefile (value variable )MakefileLIST PATHall:@echo (LIST)@echo (value LIST)()Dum Ka Biryani, Make for each other48 / 1

8.7 The value FunctionMakefile (value variable )MakefileLIST PATHall:@echo (LIST)@echo (value LIST) n:/usr/sbin:/sbin()Dum Ka Biryani, Make for each other48 / 1

8.9 The origin FunctionMakefile (origin variable )How the variable was defined:* undefined* default* environment* environment override* file* command line* automatic()Dum Ka Biryani, Make for each other49 / 1

8.10 The flavor FunctionMakefile (flavor variable )Flavor of the variable:* undefined* recursively expanded variable* simply expanded variable()Dum Ka Biryani, Make for each other50 / 1

8.11 The shell FunctionMakefilecontents : (shell cat onion.c)Makefilefiles : (shell echo *.c)()Dum Ka Biryani, Make for each other51 / 1

ReferencesGNU Make:http://www.gnu.org/software/make/GNU Make Manual:http://www.gnu.org/software/make/manual/Dum Ka Biryani, Make for each other l#dum-ka-biryani-make-for-each-otherSymbols in LaTeX and le/sque/symbols/()Dum Ka Biryani, Make for each other52 / 1

5.1 Recipe Syntax * Follows shell syntax. * Backslash-newline pairs are preserved and passed to the shell. Makefile all : @echo In a cooking vessel\ add a layer of semi-cooked Basmati rice @echo Add meat on this\ rice layer @echo Add another layer \

Related Documents:

Empty Biryani Ghee Rice Jeera Methi Pulav Mac n Cheese Millet Biryani Millet Pongal . Papad Pickle Pulav Potato and Chana Biryani Ragi Mudde Rice Sambar Rice Seeraka Samba Chicken Biryani Semiya Dum Biryani Vangi Bhath Vegetable Biryani Veg Curries 4. Aloo Gobhi Masala Aloo Matar . Each dish has the recipe with preparatory steps (if any), a .

From: “Pentatonix - That's Christmas to Me” . know dum dum that your ba dum-by dum boy would one dum day dum walk on wa - ter? dum dum Mar-y did you 3 11 (mel.)! music

Laffy Taffy, Dum Dum, Mints . Description: 1. Student council members decorated the school with red ribbon. 2. Student Council promoted D.A.S.H. throughout the week by passing out candy with a message. 3. On Monday, members passed out Dum Dum with the message "Don't be a Dum Dum - Don't do drugs" before school start. 4.

Vijayawada Spl Chicken Biryani 12.99 Tender chicken cooked in a special sauce from Vijayawada and served with flavored basmati rice Ulavacharu Panner Biryani 13.99 Traditional recipe prepared with cooked horse gram water, paneer served with aromatic basmati rice. Ulavacharu Chicken Biryani 12.99 Traditional recipe prepared with cooked horse .

8 elec-626-4c drive motor gearbox,dum dumore: housing all silver 1 9 elec-627-5l drive motor brake l,hb,dum dumore: housing all silver 1 10 elec-626-4a drive motor shaft seal,dum dumore: housing all silver 1 11 elec-626-4b drive motor housing gasket,dum dumore: housing all silver 1 12 elec-626-4g drive motor gears,hb,dum dumore: housing all .

is a line of ten syllables: da-DUM da-DUM da-DUM da-DUM da-DUM. Here’s a . Silver/grey duct tape Electrical tape A knife (please let your parent or guardian use this.) Directions: 1. Ask a parent or guardian to cut the pool noodle in half. 2. Cover the bottom quarter of the

characters move back and forth between prose and poetry. It was a convention of the theater of his day that most dramatic verse was written in iambic pentameter – ten syllables, with the beat falling on every second syllable (da Dum, da Dum, da Dum, da Dum, da Dum): “If music be the food of love play on.”

“Pentameter” means there should be five iambs in a line, so iambic pentameter is a line of ten syllables: da-DUM da-DUM da-DUM da-DUM da-DUM. Here’s a classic line, with the unstressed part of each iamb in regular text and the stressed part of each iamb in bold: “I’d rather be a hammer than a nail.”