help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recognition of Gzipped files


From: Bhatt, Milan C
Subject: Recognition of Gzipped files
Date: Thu, 9 Oct 2003 11:46:28 -0700

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]