One step further, how to let make accept some clues like:
It seems quite common to see makefile accept some argument as
The advantage for this format is the order of the argument will not matter, and the -- format can provide some clues on the parameters to be passed.
Got lost with most online makefile tutorials, especially with those automatic variables $@, $<, $|, $* and $? etc. Before coming to those tricks I feel should catch the straight-forward format first. Thank you again!
I'm trying to pass a filename, or all the files in the current directory to the ls command with a script. Unsuccessful so far, here are a few of my attempts:
#!/bin/ksh
read fname
#if (( $# > 0 )); then
$fname | ls -l
#fi
this produces a long listing of all the files in my current... (4 Replies)
I've written a script (bgrep) for a more advanced grep command (& attached a cut down version below). I'm trying allow all grep options to be used, or in any combination.
The script works fine if I type say
bgrep -i -files product
it will return a non-case sensitive list of matches for... (3 Replies)
Hi,
How to pass parameter to makefile?
Please let me know if any one knows and also please put an example of makefile with this feature.
thanks,
Manju. (3 Replies)
Hi,
I have a script which adds the user credentials to an ldap server. Im passing the variables as below..
/path/my_script $uname $pwd $environ ${deposit}
If i enter some special characters like ';' in $pwd, script returns an error which is set to display if the user enters... (5 Replies)
Hi
I have a script to which I pass multiple arguments, for example lets say the script name is "abc". I run the script like
./abc def /file <directory location>
In the above "def" is the first argument and "/file" is the second argument. I expect <directory location> that is passed after... (4 Replies)
I need to pass arguments to a shell script.My batch is calling some java program.
#################
x=$1
y=$2
java -classpath program
###################
if first parameter and second parameter is null then
java -classpath program
if first parameter is not null and second parameter is... (3 Replies)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Hi,
i have a file.txt with data
Bangalore
Chennai
Hyd
filename of the script is: new.sh
result=`cat file.txt | grep $1`
if
then
echo pass
else
echo fail
fi
i am executing the file in the cmd line as "sh new.sh Bangalore"
o/p is pass
if i give "sh new.sh delhi"
o/p is... (6 Replies)
Hi,
I want to run a target of makfile using script by passing different arguments to it again n again. I i need to grep certain things from the log file.
eg
make abc KAB=8 BAC=8 >& KAB_BAC.log
grep "timeA" KAB_BAC.log
grep "timeB" KAB_BAC.log
(i want to store the difference of the two time... (0 Replies)
I have a makefile and want to allow passing -01 -02 -03 for the user to define
the level of optimization he wants. Doing this gets make to send an error.
make -03
make: invalid option -- '0'
make: invalid option -- '3'
Usage: make ... (5 Replies)
Discussion started by: kristinu
5 Replies
LEARN ABOUT DEBIAN
jmkmf
JMKMF(1) General Commands Manual JMKMF(1)NAME
jmkmf - runs jmake with the correct options
SYNOPSIS
jmkmf [ top-level dir [ current dir ] ]
DESCRIPTION
Jmkmf is a wrapper which calls jmake with the correct options, defining the symbols TOPDIR (location of the top-level directory) and CURDIR
(current directory). The generated Makefile.SH is then ran through /bin/sh to produce a Makefile.
Jmkmf is useful when you generate a makefile for the first time.
When ran without arguments, jmkmf will scan the directories upwards, looking for a .package file marking the top of your sources. It will
then derive the top-level directory and the name of the current directory by itself.
Once you have a Makefile.SH generated by jmake, and have run Configure already, you can use make Makefile.SH to build the Makefile.SH again
and make Makefile to run the Makefile.SH through /bin/sh. To use the recursive commands, you have to append an 's' at the end of the name
as in make Makefiles.SH and make Makefiles.
AUTHOR
Raphael Manfredi <ram@hptnos02.grenoble.hp.com>
FILES
Jmakefile High level description of makefile
The file marking the top of your package tree
SEE ALSO jmake(1), packinit(1).
ram JMKMF(1)