[Top][All Lists]

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

Re: make: remote dependencies?

From: Henrik Carlqvist
Subject: Re: make: remote dependencies?
Date: Sat, 18 Apr 2009 00:00:38 +0200
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

kj <> wrote:
> Would it be possible to have remote dependencies in a makefile?

Yes, anything is possible :-)
> I have a task that depends on the status of files that are downloaded
> from a remote location via HTTP.  This task needs to be performed
> only if one of the remote files has changed, in which case, the
> first thing to do is to download these remote files.  Can make
> handle this?

Make is not able to handle it by itself, but make can use any tool capable
of finding out the dates of the remote files.
> More generally, is there a more general way to tell make when to
> consider a target to be out-of-date than by comparing the modification
> dates of two files?

In short no, you will either have to rely on some tool that checks the
date on a remote file and then touches a local file to update the
timestamp of the local file, or you could rely on some tool that only
downloads the remote file if the remote file is newer than the previously
downloaded file.

"curl -I" is one way to find out the time stamp of a remote file on a web

rsync is a very nice tool to mirror files from a remote severe to which
you have ssh access.

regards Henrik
The address in the header is only to prevent spam. My real address is:
hc3(at) Examples of addresses which go to spammers:
root@localhost postmaster@localhost

reply via email to

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