Can you make it?

After my post about AppleTV conversion with FFmpeg I’ve been working on trying to streamline my conversion procedure even further. The low-quality of the conversion is rarely an issue for me since what I’m uploading in there is usually something I watch before I can get to the DVDs. I have sometimes to add borders or subtitles would disappear over the edge of the TV, but not always since the content might not be subtitled.

Unfortunately it seems like GNU make has issues where paths with spaces are involved, and there are some other things that are clumsy and require me to write the same rule twice to get it to properly work. At the end it doesn’t seem like GNU make is the right tool for the job, so I gone looking for something different.

The rake option was discarded right away since rake does not parallel-execute, so I went on looking for something. I just needed a make-workalike, rather than a build system, or even a scripting language with proper support for parallelising, something like bash’s for construct but having a number of concurrent jobs applicable to it.

Looking for that in Google I came through an article about Make alternatives on freshmeat. It looked promising at the start but then committed the mistake of confusing make itself and higher level build systems, and went on for most of the time to speak about alternative build system. It still had a few names, among which I took out cook that at first looked interesting.

The syntax seems to be similar enough to make to be easy to grasp, and still allows much more flexibility than the standard make. So what’s the catch? Well, the catch begins with it using yet another strange SCM (like Pidgin’s monotone wasn’t annoying enough), but it doesn’t stop here.

Out of habit I check the ebuilds when I want to try new software, it helps to know whether the original code is so messy that we have to patch the hell out of it; in addition to this for buildsystems, having complex ebuilds means that the build system architects themselves don’t have very clear ideas on what it’s needed. Seems like this was a good idea:

src_compile() {
        econf || die "./configure failed"
        # doesn't seem to like parallel
        emake -j1 || die
}

src_install() {
        # we'll hijack the RPM_BUILD_ROOT variable which is intended for a
        # similiar purpose anyway
        make RPM_BUILD_ROOT="${D}" install || die
}

So a make-replacement that on its homepage declares to be able to build in parallel… has a build system that does not build in parallel? Indeed the makefile is an absolute mess; while it’s true that you don’t need to know one tool to write a replacement for it (that is not a drop-in replacement), it still would help. I could understand the mistake with multiple output rules since the cook syntax diverges from make’s in that regard; I started understanding much less the mistakes about temporary file creation, but I was really put off by the fact that it does not even know how to use the -o switch at the compiler to get it to output to a filename that is different from basename.o.

Let me say one thing: before you decide to write a tool that is better than $something, try at least to know $something well enough so that you don’t reinvent the wheel, squared.

Exit mobile version