[jamming] bulding more than one exe with a Jamfile

Turner David dturner at cptechno.com
Wed May 5 02:54:21 PDT 2004


> Hello,
> I am new to Jam and do not know how to get jam to
> build multiple executables with a single Jamfile.
> I have a directory full of test programs.
> The arrangement is one '.t.cpp' file per test.
> All tests are linked with the same set of libraries,
> same compiler, same compiler options. So it seems
> reasonable to me to have just one Jamfile that says
> to build all the tests.
> Can this be done please? How?

Just create a small loop and call the relevant rules
in each iteration. For example:

PROGRAMS = program1 program2 program3 ;

for t in $(PROGRAMS)
  Main           $(t) : $(t).c ;
  LinkLibraries  $(t) : $(MYLIBS) ;

Hope this helps,

- David Turner

> Regards,
> Andrew Marlow
> ----
> There is an emerald here the size of a plover's egg!
> _______________________________________________
> jamming mailing list  -  jamming at perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming

This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender.
Any use not in accordance with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.
The E-Mail transmission can not guarantee the integrity of this message.
NDS TECHNOLOGIES FRANCE will not therefore be liable for the message if modified.

More information about the jamming mailing list