wb1j+@andrew.cmu.edu (William M. Bumgarner) (04/11/89)
Don't work together.... I have a set of seperately compiled code resources in seperate files. I would like to copy them all to one file... great, no problem, use REZ. It works, BUT in a very ugly fashion. Currently, I use: rez -o CDXSet -t XSTK -c WILD -a -ov < CDXset.r with CDXset.r having an include "file"; for each file that needs to be included So what is the problem? I already have a variable in the make file, {COMPLETE}, that contains a list of the individual code files... CDXset OPTION-F {COMPLETE} rez.... < CDXset.r But the list of {COMPLETE} changes fairly often as I move code resources into, outof or consolidate... I don't really want to have to update both {COMPLETE} and CDXset.r for every code change. So I tried (and didn't expect to work): rez -o CDXSet -t XSTK -c WILD -a -ov < {COMPLETE} in the dependency. Didn't work... fine. include {COMPLETE} fails also... Tried: for x in {COMPLETE} (like UserStartUp) set x external rez -o CDXSet -t XSTK -c WILD -a -ov < CDXset.r end w/CDXset.r containing the line include {x} after a little experimentation, I discovered that REZ will not evaluate variables or scripts in the .r files... using include "{MPW}MPW shell"; doesn't append all resources from the MPW shell, but returns: # rez - File not found (OS error -43), resource file "{MPW}MPW shell" not found. IT DID NOT EVALUATE THE VARIABLE! It looks as if I am stuck with a rather kludgy solution for an annoying problem. I don't really think I'm looking for a solution, just raving a bit... But if anyone has a solution, alternate method, I'm certainly open to suggestions... thanks, b.bum wb1j+@andrew.cmu.edu
rick@Jessica.stanford.edu (Rick Wong) (04/11/89)
In article <IYEKE8y00VQEE3ql1Q@andrew.cmu.edu> wb1j+@andrew.cmu.edu (William M. Bumgarner) writes: > >Tried: > >for x in {COMPLETE} (like UserStartUp) > set x external > rez -o CDXSet -t XSTK -c WILD -a -ov < CDXset.r >end >w/CDXset.r containing the line include {x} > >after a little experimentation, I discovered that REZ will not evaluate >variables or scripts in the .r files... > Rez uses a different "syntax" for shell variables. Try something like: #include $$Shell("MyShellVariable"); By the way, in your for-loop above, I don't think you want the line "set x external" -- that will overwrite the value of x with the string "external". Rather, you should say "export x" (and you only need to do it once, before the for-loop). Rick Wong Stanford University rick@jessica.stanford.edu
lsr@Apple.COM (Larry Rosenstein) (04/12/89)
In article <IYEKE8y00VQEE3ql1Q@andrew.cmu.edu> wb1j+@andrew.cmu.edu (William M. Bumgarner) writes: > after a little experimentation, I discovered that REZ will not evaluate > variables or scripts in the .r files... using include "{MPW}MPW shell"; > doesn't append all resources from the MPW shell, but returns: You need to use the builtin function $$Shell to get the value of a shell variable. For example: #include $$Shell("MPW")"MPW shell"; I think you will have to have some kind of loop to process multiple files. The include directives in Rez won't accept a list of files. One possibility is to keep the list of files in a text file and mechanically generate the CDXset.r file and set the shell variable {COMPLETE} when that file changes. You can add a dependency line to your make file to take care of this, and the shell script for mechanically generating CDXset.r and {COMPLETE} should be pretty simple. Larry Rosenstein, Apple Computer, Inc. Object Specialist Internet: lsr@Apple.com UUCP: {nsc, sun}!apple!lsr AppleLink: Rosenstein1