3 ms·
> Is the above code fragment hand coded or generated? It is a handwritten example, there is no code generation involved. However, standard rules can be defined
by jnxx 6y ago
> Is the above code fragment hand coded or generated?
It is a handwritten example, there is no code generation involved. However, standard rules can be defined by patterns for specific file extensions.
Basically how redo works is that it runs the builds scripts to generate a target for the first time (these are shell scripts ending with *.do), and along the way it records every dependency for each target in an sqlite database, using a very small number of shell commands to define them in a declarative way. To re-built, it then uses this database of dependencies.
Because it knows all the dependencies, and because the build product is always $3 and then mv'd to the target, it can build everything in parallel by default.