4 ms·
The only thing I’m really missing for my usecase with make is the ability to specify goals/targets other than files. E.g., I want a docker image to be present i
by spockz 4y ago
The only thing I’m really missing for my usecase with make is the ability to specify goals/targets other than files. E.g., I want a docker image to be present in the daemon. Basically, calling out to a function. (Probably somebody is going to correct me and say there is something there in the form of conditionals or something..)
- shakna 4y agoGNU Make has Guile built-in, so you've got the whole of Scheme (the language), if you want to do something a bit more complicated.
- avar 4y agoThat's easy to do, but if you want to make it compatible with incremental builds the best way is to create a "I did it already" empty file as a dependency marker. E.g. "build" a ". build/called/apt-install-deps" or whatever.
- spockz 4y agoThis is exactly how I do it now but it is brittle. If either my packages are changed, or the definition of what needs to be installed/pulled changes I need either remove the file or something. I could maybe put all these definitions, packages etc in separate files and then have make watch the time stamps. That saves the issue of changing definitions but doesn’t help when things get deleted from under your feet.
- enriquto 4y ago> E.g., I want a docker image to be present in the daemon. This sounds more like a limitation of docker than of make. I don't use docker, but how on earth something called a "docker image" is not a file?
- spockz 4y agoDocker images can be stored as a file. And maybe are indeed stored on the file system as individual files as well. But building against a specific cr implementation for this seems too brittle.