The typical build targets for make and other build systems is a file or directory. I am building a system similar BSD-ports for emacs packages.
I just realized that my target for each package was not truly accurate – it’s not that the file edan.el needs to be newer than its prerequisites. It must be newer than the prerequisites and it must contain
(provide '[% pkg %])
Where pkg is the package that has just been downloaded, unpacked, and byte-compiled.
Is there a way to do this with make? Does any other build system handle this sort of thing?
It’s always the case that you want the target to contain the right data. You don’t want
foo.oto have no relation to the contents offoo.c, for example. The timestamps are merely a proxy for this. You have to trust that the tools actually do the right thing.It sounds like the real complication here is that the dependencies are dynamic. The file
edan.eldepends on the list of all currently installed and managed packages, which can change. But you can, of course, represent this data as a file. I expect you already do have a file that has a list of the active packages, actually.(You possibly also want to depend on the actual packages too. You should be able to write a script to munge this data into a depend file that is include in the main
Makefile.)