06-17-2005
If you put the
OH3S:$(OH3S)
in then OH3S is both a variable and a target. And then your "gmake OH3S" should work again. At least I think so. I have never done that. I don't use gmake, but with plain old make, if you type the command:
make
(no target at all) it will look for the first target and make that. I gotta believe that gmake does that too. So by making
OH3S:$(OH3S)
the first line, it will be the default target. But must of us would do stuff like
default:$(OH3S)
to make it more clear to a reader. But whatever rule is first is the default.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
I've included some variables in my .bashrc file. But everytime i'm logging in i need to source my .bashrc file to make effect of my variables.
i'm having an account on a highly secured production environment.
I've the following in my ~/.bashrc file
alias cls=clear
How to make... (2 Replies)
Discussion started by: kalyanraj
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
We have a webserver which runs on our unix server, we had to stop it for some work to be carried out, and restarted it earlier this week.
I'm logging in as myself and then root and starting the webserver as follows:
cd /etc/init.d
./northgate.web start
this starts it up fine,... (6 Replies)
Discussion started by: kenny123m
6 Replies
3. UNIX for Advanced & Expert Users
Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error:
make: module: command not found
Why is this? Is there any way to run this command in a Makefile?
NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies
4. Solaris
Hi
I logon to sunos boxes at work that starts in a ksh shell. I would like to login to a bash shell whenever I logon to the sunos boxes instead of having to login and type bash .
I tried editing the .profile and added SHELL= usr/bin/bash however when I login I am still in the ksh shell. I... (4 Replies)
Discussion started by: Esa
4 Replies
5. UNIX for Dummies Questions & Answers
I created a script called title
#!/bin/sh
echo "^0;$*^G"
It will change the terminal window titlebar to what ever I type after the script (title BIG would change titlebar to BIG instead of terminal) Is there a way to make it run so it will work on every terminal window that gets opened.... (1 Reply)
Discussion started by: amason0508
1 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies
7. Shell Programming and Scripting
the problem statement is
Write a shell script, which gets executed the moment the user opens a terminal. It should display the message "Hello your_name, welcome to 172.16.4.120 server”
How to get around this? (2 Replies)
Discussion started by: arindamlive
2 Replies
8. Shell Programming and Scripting
Hi ,
Below is the scenario
A.txt
B.txt
C.csv
..........
i want to move all the above files in to a new path & new folder .This folder is created based on date(for ex: today's fodler name will be 20120222).for Everyday move a new folder based on date has to be created & this folder... (1 Reply)
Discussion started by: jagadeeshn04
1 Replies
9. Shell Programming and Scripting
Hello all,
working on Solaris 10 in ksh.
Basicly, in my function, i'm trying to test that all my unix cmd's are true (exit status 0) else you flag the rcControlRule to 1 without going into spagetti mode code testing every $? in a if statement.
The mdb is probably a little tricky cause it... (3 Replies)
Discussion started by: maverick72
3 Replies
10. Shell Programming and Scripting
so i have to perform a certain task at set times. for instance, i need to run a job at 12:30am every night, and other jobs, i only need to have them run on saturdays.
how do i manipulate the date command to give me the epoch equivalence of what 12:30am would be every day?
im looking for a... (3 Replies)
Discussion started by: SkySmart
3 Replies
MAKE(1) General Commands Manual MAKE(1)
NAME
make - maintain program groups
SYNOPSIS
make [ -f makefile ] [ option ] ... file ...
DESCRIPTION
Make executes commands in makefile to update one or more target names. Name is typically a program. If no -f option is present, `make-
file' and `Makefile' are tried in order. If makefile is `-', the standard input is taken. More than one -f option may appear
Make updates a target if it depends on prerequisite files that have been modified since the target was last modified, or if the target does
not exist.
Makefile contains a sequence of entries that specify dependencies. The first line of an entry is a blank-separated list of targets, then a
colon, then a list of prerequisite files. Text following a semicolon, and all following lines that begin with a tab, are shell commands to
be executed to update the target.
Sharp and newline surround comments.
The following makefile says that `pgm' depends on two files `a.o' and `b.o', and that they in turn depend on `.c' files and a common file
`incl'.
pgm: a.o b.o
cc a.o b.o -lm -o pgm
a.o: incl a.c
cc -c a.c
b.o: incl b.c
cc -c b.c
Makefile entries of the form
string1 = string2
are macro definitions. Subsequent appearances of $(string1) are replaced by string2. If string1 is a single character, the parentheses
are optional.
Make infers prerequisites for files for which makefile gives no construction commands. For example, a `.c' file may be inferred as prereq-
uisite for a `.o' file and be compiled to produce the `.o' file. Thus the preceding example can be done more briefly:
pgm: a.o b.o
cc a.o b.o -lm -o pgm
a.o b.o: incl
Prerequisites are inferred according to selected suffixes listed as the `prerequisites' for the special name `.SUFFIXES'; multiple lists
accumulate; an empty list clears what came before. Order is significant; the first possible name for which both a file and a rule as
described in the next paragraph exist is inferred. The default list is
.SUFFIXES: .out .o .c .e .r .f .y .l .s
The rule to create a file with suffix s2 that depends on a similarly named file with suffix s1 is specified as an entry for the `target'
s1s2. In such an entry, the special macro $* stands for the target name with suffix deleted, $@ for the full target name, $< for the com-
plete list of prerequisites, and $? for the list of prerequisites that are out of date. For example, a rule for making optimized `.o'
files from `.c' files is
.c.o: ; cc -c -O -o $@ $*.c
Certain macros are used by the default inference rules to communicate optional arguments to any resulting compilations. In particular,
`CFLAGS' is used for cc and f77(1) options, `LFLAGS' and `YFLAGS' for lex and yacc(1) options.
Command lines are executed one at a time, each by its own shell. A line is printed when it is executed unless the special target `.SILENT'
is in makefile, or the first character of the command is `@'.
Commands returning nonzero status (see intro(1)) cause make to terminate unless the special target `.IGNORE' is in makefile or the command
begins with <tab><hyphen>.
Interrupt and quit cause the target to be deleted unless the target depends on the special name `.PRECIOUS'.
Other options:
-i Equivalent to the special entry `.IGNORE:'.
-k When a command returns nonzero status, abandon work on the current entry, but continue on branches that do not depend on the current
entry.
-n Trace and print, but do not execute the commands needed to update the targets.
-t Touch, i.e. update the modified date of targets, without executing any commands.
-r Equivalent to an initial special entry `.SUFFIXES:' with no list.
-s Equivalent to the special entry `.SILENT:'.
FILES
makefile, Makefile
SEE ALSO
sh(1), touch(1)
S. I. Feldman Make - A Program for Maintaining Computer Programs
BUGS
Some commands return nonzero status inappropriately. Use -i to overcome the difficulty.
Commands that are directly executed by the shell, notably cd(1), are ineffectual across newlines in make.
MAKE(1)