Newsgroups: comp.unix.questions
Path: utzoo!telly!robohack!druid!darcy
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: "make" file question
Message-ID: <1990Aug13.152359.26872@druid.uucp>
Organization: D'Arcy Cain Consulting, West Hill, Ontario
References: <8427@ccncsu.ColoState.EDU>
Date: Mon, 13 Aug 90 15:23:59 GMT

In article <8427@ccncsu.ColoState.EDU> flatau@handel.UUCP (flatau) writes:
>I have the following "makefile" file
>
>PAT=/ub/path/
>FILES=a.f b.f
>NEW=$(PAT)$(FILES)
>all:
>       echo $(NEW)
>
>===========================
>The output from this "make" is
> /ub/path/a.f b.f
>
>but I would like to have
>/ub/path/a.f /ub/path/b.f
>
>Well, the question is: How to append prefix (/ub/path/) to
>a list of files using "make".
>
I use GNU make and I do this with the following:

NEW=$(foreach i, $(FILES), $(PAT)$i)

-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   MS-DOS:  The Andrew Dice Clay
West Hill, Ontario, Canada         |   of operating systems.
+ 416 281 6094                     |
