[clug] Dependency resolution for non-source code
paulway at mabula.net
Sun Feb 6 04:24:10 MST 2011
-----BEGIN PGP SIGNED MESSAGE-----
I need something like a Makefile, but I'm not sure how to put what I have in one.
Basically I produce .wav files, which then get transcoded into .mp3 and .ogg
files, possibly more than one each (e.g. high bitrate, low bitrate), and then
torrent files produced for the resultant .mp3 and .ogg files. Occasionally I
might need to regenerate all the files, if some bit of metadata has changed,
or just some of them - if I add a new tracker to the torrent files, for
instance. The names too obey logical patterns but are not the same throughout.
I know how to create rules in GNU make that match a pattern and produce an
output (e.g. %.o: %.c), but that process would then have to derive the
metadata for that particular file - I want to add the metadata in as I
generate the compressed files.
Alternately, I can write a program to work out the commands to run and even
provide the order, but I haven't yet worked through the dependency resolution
and the whole 'determining which files need to be updated' process.
I looked at WAF and I can see that it would do the dependencies just fine and
is much nicer than GNU make syntax, but I'm struggling to find how to pass the
metadata around and how to make a sort of generic target or pattern matcher.
I'll keep reading though - I'm only up to part 5.2 of the WAF book.
I looked at Perl's Algorithm::Dependency::Ordered but its examples are near
nonexistent, it's completely static (you put in the dependencies and it tells
you which order to go through them - you can't update this on the fly and ask
for the next task AFAICS) and it initialises its graph at object creation
time, rather than being able to add a bunch of objects on the fly.
What should I be using?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the linux