From owner-freebsd-questions Thu Mar 28 17:39:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 5E9AB37B41A for ; Thu, 28 Mar 2002 17:39:11 -0800 (PST) Received: from hades.hell.gr (patr530-a072.otenet.gr [212.205.215.72]) by mailsrv.otenet.gr (8.12.2/8.12.2) with ESMTP id g2T1d1g1020138; Fri, 29 Mar 2002 03:39:09 +0200 (EET) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.2/8.12.2) with ESMTP id g2T1d0om007060; Fri, 29 Mar 2002 03:39:00 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from charon@localhost) by hades.hell.gr (8.12.2/8.12.2/Submit) id g2T1d0wf007059; Fri, 29 Mar 2002 03:39:00 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Fri, 29 Mar 2002 03:39:00 +0200 From: Giorgos Keramidas To: Julian Elischer Cc: questions@freebsd.org Subject: Re: Stupid "make" question Message-ID: <20020329013900.GC6932@hades.hell.gr> References: <3CA3C03E.F1607CE8@vicor-nb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CA3C03E.F1607CE8@vicor-nb.com> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-03-28 17:15, Julian Elischer wrote: > Maybe a Make guru can help me on this: > > I want to embed the following snippet into a Makefile, > but it'd defeating me.... > > # > # find the files being patched and revert them using CVS > # > unpatch: > FILES=`grep Index ${FREEBSD_PATCHES}/*/*.patch | awk '{print $2}'`; \ > rm $$FILES ; cd src;cvs update $$FILES ) (Note that you have a mismatched closing parenthesis in the snippet above.) > any ideas? Sure. You might want to use != to catch shell output in a variable, and then simply use that in unpatch. FILES!= grep Index ${FREEBSD_PATCHES}/*/*.patch | awk '{print $2}' rm ${FILES} ( cd src ; cvs update ${FILES} ) I haven't tested this, though, so I might be terribly wrong here... - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message