"make" file question

D'Arcy J.M. Cain darcy at druid.uucp
Tue Aug 14 01:23:59 AEST 1990


In article <8427 at ccncsu.ColoState.EDU> flatau at 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 at druid)     |
D'Arcy Cain Consulting             |   MS-DOS:  The Andrew Dice Clay
West Hill, Ontario, Canada         |   of operating systems.
+ 416 281 6094                     |



More information about the Comp.unix.questions mailing list