Hi All. I'm struggling with writing a relatively complex makefile, and right now I'm trying to set some variables based on a target. Can anyone lend some insight? Let's say I have a target named sfp400ma.lib. To make this particular target (there are many targets, all differing by a little bit), I need to set some variables that will be passed to the compiler on its command line. 1) Based on just the "sfp" part, I want to set a variable. This I do like this: sf%.lib : VAR1 = SOMETHING 2) Based on just the "ma" part, I want to set another variable. This I do like this: %ma.lib : VAR2 = SOMETHING_ELSE I'm having difficulty figuring out how to write the makefile so that _both_ of these variables are assigned when I make the target: make sfp400ma.lib What I'm faced with is make only pattern-matches the first time, and leaves the second variable undefined. I suspect there's some way to strip various characters out of the target name and set variables based on that, but after reading the GNU make docs I still can't see how it's done. Any ideas? Thanks, -- ______________________________________ Andrew E. Kalman, Ph.D. aek@pumpkininc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics