make - Support: sr #102515, Alternative to using modification...
You are not allowed to post comments on this tracker with your current authentication level.
sr #102515: Alternative to using modification dates
Submitter: | None | ||
Submitted: | Wed 15 Oct 2003 07:11:11 AM UTC | ||
Votes: | 100 | ||
Category: | None | Priority: | 5 - Normal |
Severity: | 2 - Minor | Status: | None |
Privacy: | Public | Assigned to: | None |
Originator Email: | -email is unavailable- | Open/Closed: | Open |
Operating System: | None |
Tue 04 May 2004 04:57:41 AM UTC, comment #2: |
Anonymous |
Mon 17 Nov 2003 02:57:40 PM UTC, comment #1:
|
Paul D. Smith <psmith>![]() |
Wed 15 Oct 2003 07:11:11 AM UTC, original submission:
|
Anonymous |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2006-02-23 | heini | Carbon-Copy | - | ![]() |
Added heini |
I thought about this some more, and I wonder could it be done in the same way as .d files for tracking dependencies? They are essentially stateful, but don't change the paradigm of make.
So for example, you have some way to generate a target.t.metadata file for each target, with contents something like this:
target.t: source.s[MD5=xyz]
target.t: source.s[size=512]
target.t: source.s[color=red]
target.t: source.s[command=s2t.pl -abc -def]
target.t: source.s[$ENVVAR=envvalue]
etc...
then in the makefile, you just "include" whatever metadata files you want same as you would a .d file, and specify how to generate metadata somehow like this:
meta[MD5]:
md5 -i $@
meta[size]:
wc -c < $@ # or could be builtin
meta[color]:
color -i $@
meta[command]: # might have to be build in
meta[$ENVVAR]: ${ENVVAR} # environment variable setting at the time. needs better syntax I am sure.
meta[uservar]: hello # user variable. need syntax to distinguish commands from strings
# need a way to specify output files for metadata
# need a way to change metadata commands for different rules.
In you rules specify which metadata to generate for a particular type:
%.t: %.s %.s[size]
Of course there is still plenty of problems left, but is the above any more broken in terms of backwards compatability and statelessness than including .d files for dependencies?
I have probably missed or glossed many important issues of course.