help-make
[Top][All Lists]
Advanced

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

Re: other uses for make??


From: Ronald Landheer-Cieslak
Subject: Re: other uses for make??
Date: Fri, 30 Jul 2004 11:48:36 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707

Josh Cronemeyer wrote:

I have heard of people using make for other things besides compiling
software.  I have an application that I would like to try to use make
on, but not having any experience with make I am not sure if it is
feasable.  Here is my idea.

I have my home page (actually about 400 pages worth) on my ISP's unix
servers.  I make changes to the site on my local machine, and whenever I
make changes I run a perl script that removes the whole site and reloads
the whole site. This is slow! Often I change 20 to 30 pages at a time so
this is easier than uploading via ftp every page that i have changed.

I was thinking that since make can detect changes in files that it would
be able to identify which files were modified and then i would be able
to run my script on just those files. Much faster that way! Sure i could
write my perl script to do this too, but I was hoping to reuse existing
software and to learn about make.

could that work?
Something like this might do the job:

all : $(patsubst %,%.upped,$(wildcard *.html))

%.upped : %
        curl --netrc --upload-file $<  ftp://your.isp.here/path/$<
        touch $@

You may need to use e.g. VPATH to find all the .html files you want. You can, of course, easily add other extentions, if you want :)
HTH

rlc





reply via email to

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