Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Make question?
- Date: Fri, 11 Apr 2003 20:23:35 +1000
- From: Sam Tilders <sam@example.com>
- Subject: Re: [tlug] Make question?
- References: <200304110617.h3B6HBSk010680@example.com>
- Organization: Jovian Projects
- User-agent: KMail/1.4.3
On Fri, 11 Apr 2003 16:17, Jim Breen wrote: > I have a file, which I'll refer to as the "manifest" file. > That file contains information about a set of other files: > "foo", "bah", "bletch", etc. etc. > > What I want to do is check automatically if any of "foo", "bah", > etc. have been touched more recently than "manifest". I could put > this test in a script run by cron to warn me that "manifest" needs > attention. This might be what you're asking... maybe. --------------- all: manifest manifestdepend.mk: manifest printf "manifest: %s\n" `cat manifest` > manifestdepend.mk printf "\techo manifest needs updating\n" >> manifestdepend.mk -include manifestdepend.mk --------------- What this does (I think): When the manifest changes then the manifestdepend.mk file is recreated by catting the manifest into it. This is formatted as a dependency rule. (printf is used, with the shell builtin or otherwise, maybe echo would do as good) I found the contents of the manifestdepend.mk file ended up being: manifest: foo manifest: bah manifest: bletch echo manifest needs updating The following would probably the lines from manifest so don't end up with as many lines in the dependency include file. cat manifest | tr "\n" " " And thus, the manifest file is dependent on the files listed in its contents. If files are added to the manifest then the dependency file gets recreated. If the manifest has more than just the filenames in it then maybe some combination of pipes (cut) would get just the filenames. Also could avoid seeing the commands being run... make does this somehow. -- Sam -- -- Sam Tilders sam@example.com Cogito Ergo Sum - I think, therefore I am. (Descartes)
- Follow-Ups:
- Re: [tlug] Make question?
- From: Godwin Stewart
- References:
- [tlug] Make question?
- From: Jim Breen
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Re: XFree86 4.3.0 and truetype - followup
- Next by Date: Re: [tlug] Make question?
- Previous by thread: Re: [tlug] Make question?
- Next by thread: Re: [tlug] Make question?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links