On Mon, Jan 21, 2002 at 10:46:16AM +0100, Sven wrote: > I want to set a variable $(OPT_BUILT) to yes when i built the opt.opt target, > and to no if i didn't build them. So i can later copy the files to the > ocaml-native-compilers package if it is yes, and have ocaml provide > ocaml-bnest-compilers if it is no. Instead of using a variable you can use a file to pass this information. > OPT_BUILT=no instead of this: do nothing > export OPT_BUILT=yes; \ instead of this: "touch opt_built; \" > if [ $(OPT_BUILT) = yes ]; then \ instead of this: "if [ -f opt_built ]; then \" > if [ $(OPT_BUILT) = no ]; then \ instead of this: "if [ ! -f opt_built ]; then \" You have to think about some tricky cases that can occur using "clean:" target or about file names clashes with ocaml sources but basically I think that this is a good approach. Cheers. -- Stefano "Zack" Zacchiroli <zack@cs.unibo.it> ICQ# 33538863 Home Page: http://www.cs.unibo.it/~zacchiro Undergraduate student of Computer Science @ University of Bologna, Italy - Information wants to be Open -
Attachment:
pgpnGHKSQUweL.pgp
Description: PGP signature