Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!targon!andre From: andre@targon.UUCP (andre) Newsgroups: comp.unix.questions Subject: Re: Problem with make Keywords: make for sysV Message-ID: <640@targon.UUCP> Date: 6 Oct 89 09:15:13 GMT References: <715@bbking.KSP.Unisys.COM> <11169@smoke.BRL.MIL> <1989Sep29.164831.26616@wash08.uucp> Reply-To: andre@targon.UUCP (andre) Organization: Nixdorf Computer BV., DO, P.O. Box 29,Vianen, The Netherlands Lines: 40 In article <1989Sep29.164831.26616@wash08.uucp> rae98@wash08.UUCP (Robert A. Earl) writes: >In article <11169@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >>In article <715@bbking.KSP.Unisys.COM> bcarb@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