1 message in com.perforce.jamming[jamming] targets and variables
FromSent OnAttachments
Wern...@gnu.org04 Apr 2001 07:30 
Subject:[jamming] targets and variables
From:Wern...@gnu.org (Wern@gnu.org)
Date:04/04/2001 07:30:21 AM
List:com.perforce.jamming

I have a problem with setting variables for a specific target.

In our library (FreeType) we have two compile `modes'

. compile master1.c which itself includes file11.c, file12.c, ... compile master2.c which itself includes file21.c, file22.c, ... ... build library from master1.o, master2.o, ...

This is the default.

. compile file11.c, file12.c, ..., file21.c, file22.c, ... ... build library from file11.o, file12.o, ...

This should be target `multi'.

The solution with GNU make is to scan MAKECMDGOAL which contains all command line targets. If `multi' has been found, a variable `MULTI' has been set which can then be used during the parse phase to select the proper set of files to compile. It seems to me that this feature is not available with jam. Is this intentional?

I tried some hours for a workaround but wasn't successful (I know that `jam -sMULTI=true' would work).

A MAKECMDGOAL variable within jam would be useful for other things also. For example, another target in FreeType is `devel' which bypasses the configure script and sets a bunch of special compilation flags.

Werner