Re:A Tutorial on Portable Makefiles (2017)
by stkdump on Monday August 01, 2022 @03:17PM
(#32310825)
Does it support incremental builds? How does it detect include dependencies? Is it portable?
1. Sure (if you didn’t need incremental builds, why bother with make at all? Just use sh.)
2. It doesn’t, it’s programmers job to make an effort to append a file name to a single line in a single file.
3. It’s portable in the same way autotools are portable, which means you can make it work with relative ease.
# $FreeBSD$
PACKAGE=runtime PROG= setfacl SRCS= file.c mask.c merge.c remove.c setfacl.c util.c
.include <bsd.prog.mk>
So, yeah, at least for code in C you can have something maintainable in make(1), it’s just you need to structure your project in a sensible way.