top | item 38776540

(no title)

ataylor284_ | 2 years ago

Make's killer feature was conditionally rebuilding based on changed dependencies. Back in the day, it was easy for a medium to largish software project to take many hours, or even days to fully rebuild. C and C++ were especially bad, especially "every file transitively includes every header" type projects. Make saved a lot of that pain, even if linking still sucked.

I love make and still spin up a minimalist Makefile like in the article regularly for tiny projects, but I'd hate to have to actually maintain one for a real world project.

discuss

order

ataylor284_|2 years ago

You could do something like this to get dependencies almost for free:

    .depends: $(SRCS)
        $(CC) $(CFLAGS) -MM $(SRCS) -o .depends

    -include .depends

t43562|2 years ago

I see people now with long javascript builds that waste time doing many things repeatedly - it's quite ironic. Eventually people find crap to fill up the performance that's available.

The problem is that now the tools aren't designed as composable bits that you can really parallelise with a makefile. C/C++ are designed that way and if they didn't use header files I'd consider them perfect from the build system's point of view :-). Golang and java for example are a nuisance.

Too|2 years ago

A lot can be said about js tooling but honestly it works good once it is set up. Most modern js tooling provides --watch flags and hot module reloading. Vite is one popular option. Just save one file and the change instantly takes effect in the browser, even on a large project. Never seen any makefile based c++ project come close to that experience.