How about: $(firstword $(wildcard a.file.gz) a.file): b
HTH, Noel "Bhatt, Milan C" wrote: > > Hi, > > I'm looking for a way for make to recognize that a gzipped version of > the target exists even when the non-zipped version doesn't exist. I > think the abstract problem I'm trying to solve is in getting make to > recognize multiple target names as being synonymous. > > Here's an example: > > a.file.gz a.file : b > @ some_command > > I'd like the behavior of the above rule to be like this: > > 1. If the .gz file exists, then a.file.gz becomes the target name. > 2. If the .gz does NOT exist, then a.file becomes the target name. > > The reason I want to have this functionality is to handle the case where > someone unzips the target file and the .gz file no longer exists. > Instead of having gmake try to recreate the .gz target, I'd like to have > it recognize that the unzipped version exists and simply say that the > target is up to date. > > Any ideas on the best way to achieve this? > > Thanks, > Milan > > _______________________________________________ > Help-make mailing list > [EMAIL PROTECTED] > http://mail.gnu.org/mailman/listinfo/help-make -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
