The UNIX make utility helps one organize projects and write programs in a modula
ID: 3814480 • Letter: T
Question
The UNIX make utility helps one organize projects and write programs in a modular and robust way. Modern software development is based on teamwork. By keeping track of dependency relationship among the parts of large, complex projects, make helps coordinate the efforts of many contributors. Study the usage of make by the command
man make
and thus answer the following:
a)
What is the name of the default file that make reads the command? What do you do if you want to use a file name which is different from the default one? What is the option that brings you to a new directory before doing anything else? Give an example. How do you find out the version of a make utility? What is the version that you use? How do you specify a directory to search for included makefiles. Give an example.
b)
Explanation / Answer
What is the name of the default file that make reads the command?
‘make’ will look for the makefiles GNUmakefile, makefile, and Makefile, in that order.
What do you do if you want to use a file name which is different from the default one?
We can use
-f file, --file=file, --makefile=FILE
Use file as a makefile.
What is the option that brings you to a new directory before doing anything else? Give an example.
-C dir, --directory=dir
Example: make -C lex
Where lex is the directory
The above command will move into directory lex/ and search for default make files, and start executing them.
How do you find out the version of a make utility?
--version is used to get the version of the make utility
What is the version that you use?
Make utility installed in my computer is GNU Make 3.81
How do you specify a directory to search for included makefiles. Give an example.
-I dir, --include-dir=dir
Specifies a directory dir to search for included makefiles.
Example: make -I lex
Where lex is the directory and this should work well
I tried to be specific, since the question you asked doesn't need any explanation I guess. If for yourself need clarification on any of the above answers, please feel free to comment below in the comment section. I shall be glad to help you with you doubts.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.