Problem with make

andre andre at targon.UUCP
Fri Oct 6 19:15:13 AEST 1989


In article <1989Sep29.164831.26616 at wash08.uucp> rae98 at wash08.UUCP (Robert A. Earl) writes:
>In article <11169 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>>In article <715 at bbking.KSP.Unisys.COM> bcarb at KSP.Unisys.COM (Brian Carb) writes:
>>>test:
>>>	for i in 1 2 3 4; do echo "hello"; done
>>>This always generates an error such as
>>>Syntax error:  do:  command not found
>>
>This worked for me also (NCR Tower 32/850 SVR2).
He probably uses the c-shell.

>I have a secondary question concerning makefiles:
>Can you read in a variable for use in the makefile?
>read a;echo $(a)

>Alternatively, can you pass args through make to be used in the makefile?
>What I really want to do is:
>
>make tar (system_name)
>and have the makefile generate a tar file and send it to system_name.

You can get make macros from your environment,

system=system_name ; export system ; make tar

easier if you have to do it only once, pass it on the command line

make system=system_name tar

and if you really want to ask from the makefile and make must use the
variable use

first:
	read a ; make system="$a" tar

-- 
    \---|    AAA         DDDD  It's not the kill, but the thrill of the chase.
     \  |   AA AAvv   vvDD  DD        Ketchup is a vegetable.
  /\  \ |  AAAAAAAvv vvDD  DD                    {nixbur|nixtor}!adalen.via
_/__\__\| AAA   AAAvvvDDDDDD    Andre van Dalen, uunet!hp4nl!targon!andre



More information about the Comp.unix.questions mailing list