03-10-2009
How to print something in make utility
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 I print something ?
10 More Discussions You Might Find Interesting
1. Programming
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)
Discussion started by: Yifan_Guo
1 Replies
2. Programming
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)
Discussion started by: victorvvk
4 Replies
3. Programming
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)
Discussion started by: victorvvk
4 Replies
4. Solaris
Hi Guys,
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... (2 Replies)
Discussion started by: bigmoon
2 Replies
5. UNIX for Dummies Questions & Answers
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)
Discussion started by: umen
1 Replies
6. Solaris
(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)
Discussion started by: alex_5161
0 Replies
7. Programming
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)
Discussion started by: kratos.
1 Replies
8. Programming
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)
Discussion started by: naan
2 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: kramer_102
1 Replies
10. Programming
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)
Discussion started by: waruqi
1 Replies
LEARN ABOUT OPENSOLARIS
echo
echo(1B) SunOS/BSD Compatibility Package Commands echo(1B)
NAME
echo - echo arguments to standard output
SYNOPSIS
/usr/ucb/echo [-n] [argument]
DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output.
echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi-
ronment variables.
For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows:
o echo your current-working-directory's full pathname
o pipe the output through tr to translate the path's embedded slash-characters into space-characters
o pipe that output through wc -w for a count of the names in your path.
example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w"
See tr(1) and wc(1) for their functionality.
The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if
the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape
characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's
echo() also understands a as the audible bell character; however, these commands do not have an -n option.
OPTIONS
-n Do not add the NEWLINE to the output.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO
csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5)
NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases.
SunOS 5.11 3 Aug 1994 echo(1B)