1 message in com.perforce.jammingCreating makefile-like targets| From | Sent On | Attachments |
|---|---|---|
| Dian...@whistle.com | 28 Aug 1996 07:56 |
| Subject: | Creating makefile-like targets![]() |
|---|---|
| From: | Dian...@whistle.com (Dian...@whistle.com) |
| Date: | 08/28/1996 07:56:02 AM |
| List: | com.perforce.jamming |
Well, this works for me:
Jamfile:
Version what : cut perl yes ;
Rules file:
rule Version { NOTFILE what ; ALWAYS what ; DEPENDS $(<) : $(>) ; SEARCH on $(>) = /usr/bin ; }
actions quietly Version { /usr/bin/what $(>) ; }
Results:
commute1% jam what ...updating 1 target(s)... /usr/bin/cut Copyright (c) 1989, 1993 cut.c 8.1 (Berkeley) 6/6/93 /usr/bin/perl malloc.c 4.3 (Berkeley) 9/16/83 yaccpar 1.9 (Berkeley) 02/21/93 /usr/bin/yes Copyright (c) 1987, 1993 yes.c 8.1 (Berkeley) 6/6/93 ...updated 1 target(s)...
Note that you won't be able to 'what' an individual entity this way, unless you give each entity its own Jamfile entry.
Hope this helps,
Diane (dia...@whistle.com)
------ Included Message -----
I guess my real question is how to set up a target that doesn't have any real dependancies and only gets executed when it is explicitly specified. A simple example would be to have a Jamfile that compiles foo.c and stores it in a library libfoo.a by default. However, if I execute 'jam what' have jam issue the 'what' command on the library and the .c. The what target doesn't have dependancies and should only happen if I ask for it explicitly.
The first part (compile foo.c) is just the Library rule:
Library libfoo.a : foo.c ;
What I don't know how to do is set up the second half of the example. I have tried things like:
rule Version { What $(>) ; }
actions What { what $(<) }
NOTFILE what ; Version what : foo.o libfoo.a ;
But that doesn't work.
Thanks,
Walt
------------------------------------------------------------------------------ Walt Hillis
Electronic Data Systems internet: wa...@fms2000.stl.gtd.eds.com M.S. 1015 phone: (314) 344-4156 13736 Riverport Dr. fax: (314) 344-5466 Maryland Hgts, MO 63043-4826
------------------------------------------------------------------------------
------ End Message -----




