[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help in Updating Multiple Targets
From: |
Mike Gibson |
Subject: |
Re: Help in Updating Multiple Targets |
Date: |
Mon, 5 May 2003 09:17:02 -0600 |
User-agent: |
KMail/1.5.1 |
I don't quite get what you assignment is, but I get the impression that you're
trying to create rules based on the contents of a flat file. You could use
$(eval ...) and $(shell ...) to do this. Like, say you've got a comma
delimited flat file of targets in the first column, prereqs in the second,
and rules in the third, you could do something like this to get it into your
makefile
----------
define parse_flatfile
$(shell awk -F "," -f $(1) -- '{print $$1" : "$$2"\n\t"$$3}')
endef
$(eval $(call parse_flatfile,flatfilename.txt))
----------
I didn't test this, so take it for what it's worth.
On Monday 05 May 2003 05:41 am, Ramanathan wrote:
> Hi All ,
> I hit upon this while working on an assignment.
>
> Goal : update tools in a target dir based on time stamp of tools in src
> dir.
>
> FYI : First I planned to create a generic makefile and call perl script
> that will do above. Also was
> able to do it. And then I had this suggestion regd. which I have few
> doubts
>
>
> can I use a flat file to define like this ?
>
> file name target path to copy
> . . . . . .
> . . . . . .
>
> If I am correct, make uses time stamp to update targets.
> So from a generic make file, read this config file and update target using
> time stamp.
>
> Can any one share ideas on how to go about this using makefile if possible
> ?
>
> TIA,
> Rams
>
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-make