Re: ./configure fails to link test program due to missing dependencies
- From
Paul Smith <paul@mad-scientist.net>
- Date
- Sep 25, 2024, 15:33 UTC
- Message-ID
- <5bd2f41c92a00f7799bc543e229b16fa7a473760.camel@mad-scientist.net>
- In-Reply-To
- <xmqqwmj1t0hp.fsf@gitster.g>
On Tue, 2024-09-24 at 10:39 -0700, Junio C Hamano wrote:
> Our dependance of heavy use of GNU-ism in our Makefiles makes an > argument that make is the common denominator a fairly weak one, so > the single one that eventually we use does not have to be "make", > but it has to be something available widely and easy to learn.
Regardless of what one might imagine :), I am not advocating GNU Make as the perfect solution: it certainly has downsides and disadvantages.
But, it also has benefits that should not be ignored: for example, it's highly portable and it consists of a single binary that can be copied anywhere and run from anywhere with no other prerequisites or need for any setup or privileges. Also it's extremely flexible since it just runs shell scripts. That also makes portability much more "do it yourself" than other tools of course.
Meson is portable, but that's because it's written in Python: that means you have to have a Python interpreter already available (currently Python 3.7 or better), and the ability to add new modules to it. Admittedly this is not a super-high bar in 2024, but it's a non- trivial requirement if you're trying to start from scratch.
Things like cmake provide abstractions that can make building code simple, but it can be surprisingly difficult to get them to perform more advanced tricks like generating source files, linker map files, etc. It can be done, but it's... not always easy. And it has some weird behaviors (for example how cached variables are handled will certainly confuse you at first).