I m very confused about the make/makefile utility in all unix.
1) My questions is why we need make.
2) Why some source code needs to complile.
3) I download the Bind 9 from Sunfreeware.com. I use pkgadd -d to install the bind. I 'm struck here becasue I can't find /etc/named.conf file. Why is it so.
1) My questions is why we need make.
2) Why some source code needs to complile.
3) I download the Bind 9 from Sunfreeware.com. I use pkgadd -d to install the bind. I 'm struck here becasue I can't find /etc/named.conf file. Why is it so.
Source code doesn't 'NEED' to be compiled - source code can sit out there doing nothing at all. You would need to compile it so that you can create the executable only if you need that software.
If you were not running Bind before (or running an old version 4), then you might need to create the /etc/named.conf. I would have thought there would be an example file but I didn't find one (probably less of a download if they get rid of the stuff you can easily build). Your /etc/named.conf will be specific to your server. There are examples in the named.conf man page which would get you started. Also look at the rndc.conf man page. And suggest you buy "DNS & Bind" from O'Reilly books.
I m very confused about the make/makefile utility in all unix.
1) My questions is why we need make.
2) Why some source code needs to complile.
Hmm ... the Make/Makefile concept is not unique to Unix. MS Visual C++ also uses Makefile to automate the build process of a source project. It just has an interface fancy enough to hide some of its dark corners.
You need to distinguish the roles played by "make" and compilation. Make is a build utility. It defines a language (in the way you write Makefiles) that allows developers to specify exactly the way they would like their source files to be transformed (by means of external commands that carry out the actual transformation), and, most importantly, the interdependencies of source files and their derivatives (such as compiled object code, executables etc.). Finding out the interdependencies is exactly the strength of Make, otherwise we can always put the transformation commands in a batch file (shell script), which will always work but you will miss one of the major offerings of a build system - selective transformation (compilation).
For instance, given this simple Makefile:
which generates the file "output.html" derived from two source files "stylesheet.xsl" and "model.xml" (the dependencies). We confirm we get the generated "output.html":
But if we run "make" again,
It detects the timestamp of "output.html" is newer than stylesheet.xsl and model.xml, so it concludes the previously generated target is up to date, hence a transformation is not required this time. So this is selective transformation. If you have a complex project involving lots of transformations, this will save you a lot of time for compilation if you have the previously generated derivatives. This is what a simple batch file that can't give you (without extra coding). Make manages this for you.
Although Make is frequently used for compilation, it is separate from the actual compilation process (which is performed by the transformation command specified). That is why I used the term "transformation" instead of "compilation" above. In the example above I did not compile any C source files, but I have used Make to automate the process of building in a likewise fashion. Think about Make as a coordinator of the build process. It manages the compilation of a source project, but the actual compilation is done by a compiler, not Make.
xmake is a make-like build utility based on lua. (Link to project site: xmake)
The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...), so that any developer can quickly pick it up and enjoy the... (1 Reply)
Hello,
I'm a recent convert to UNIX and I'm attempting to understand exactly how the make utility is working under the hood.
Now, I understand that each rule has a target, dependencies, and update command, but the thing I'm confused about is exactly how the utility is determining when to... (1 Reply)
Hi,
Could someone tell me why make utility is mostly preferred for compilation and generating executable in UNIX rather than any user created scripts which contains commands for compilation? (2 Replies)
Hi,
I'm trying to create a C program that functions like the make utility in UNIX for personal use. My program would read in from a generic makefile and execute whatever is in that makefile but I'm not sure as to where I should start coding.
I would appreciate any help.
Thanks. (1 Reply)
Hi want to know the syntax of printing something (value or variable) in GNU make utility. I give this in the Makefile:
echo "Hi"
OR
@echo "Hi"
But I only get error this when I run make (at the line where I have echo):
Makefile:9: *** missing separator. Stop.
Whats the problem? How can... (2 Replies)
(Sorry for previous not on enlish! I did not realized it is english forum. )
I am looking for help with Make utility. I could not get help from the 'man' pages.
1. About Macro (as a variable): It is clear about defining any macro in beginning or in command line, but isn't it no way to redefine... (0 Replies)
Hello all
im looking for some kind of utility that convert make files to dsp files
is there any kind of tool/script that does this job?
thanks (1 Reply)
I wrote a makefile, every thing is working fine,
But One of the C header files which is created by me is kept in a different folder other than the current directory,
I have given this PATH to VPATH Variable
Example :- VPATH = /home/user1/projects/victor.h
It gives an error as : file... (4 Replies)
When we run the make utility , make compiles only those files which are undergone changes(other files which have not undergone any changes are not recompiled)
The Following quotes says
When you run the make utility, it examines the modification times of files and determines what needs to be... (4 Replies)
The following is my makefile. When I run "make", it gives me a bunch of error. I've compiled each file separately and there are no compilation errors.
The target is "monprc". Have a look below:
monprc: monprc.o monrep.o dsz.o
cc -o monprc monprc.o monrep.o dsz.o
monprc.o: monprc.c... (1 Reply)