%% "=?iso-8859-1?Q?H=E4gglund=2C_Ulf?=" <[EMAIL PROTECTED]> writes:

There's no need for HTML on the mailing lists.  Please use plain text.
Thanks!

  uh> GNU Make version 3.79, by Richard Stallman and Roland
  uh> McGrath.Built for i686-pc-linux-gnu.

  uh> I am trying to port a recursive Makefile-structure designed for
  uh> the SunOS5 make utility to use the GNU make . This implies that I
  uh> have rather complex pattern matching rules that dynamically builds
  uh> the prerequisites for the target. In the original Sun Makefile
  uh> this looks as follows:

  uh> my_lib_OBJS = foo.o fie.o

  uh> $(LIBRARY:%=%.a):  $$($$(@F:%.a=%)_OBJS:%.o=%.o)
  uh>     $(LD) $(LDFLAGS) $($(TARGETNAME)_LDFLAGS) -r -o $@ etc....

This syntax isn't supported by GNU make.

  uh> After reading the documentation for GNU make and a number of
  uh> fruitless attempts it seems that GNU make is not allowing this. My
  uh> question is:

I think the documentation is pretty clear on this.  Try looking, for
example, at the chapter "Incompatibilities and Missing Features", where
this is explicitly mentioned along with a workaround using GNU make
syntax which may or may not meet your needs (it covers much but not all
of the potential uses for this syntax).

  uh> 1. Shall GNU make support the same features?

Do you mean, will it in the future?  I'm not sure.  There is a patch
around which implements some of the Sun syntax.  I'm not sure it'll do
what you want above ($$ variable reference inside another $$ variable
reference).  I haven't examined the patch myself.

Personally, I think this syntax is unclean and a bad way to implement
the functionality you want.  I'm hoping to implement a more generic
feature which will allow this type of behavior, plus more, in the
future.

  uh> 2. If not, is there a way workaround this?

See the manual.

You can do the things that static pattern rules don't allow by using
automatically generated makefiles, although this is slightly more
complicated.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.ultranet.com/~pauld/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

Reply via email to