Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to include bsd.prog.mk in both GNU and BSD make?

I am new to the World of makeFile, I have a basic question.

I have a make file with the content.

.include <bsd.prog.mk>

I am getting the error when executing the make file

 Makefile:: *** missing separator.  Stop.

The reason I am getting the error since I am executing the makefile in the Linux environment instead of the FreeBSD system.

so, Is there any way to include the bsd.prog.mk file in both Linux and BSD systems, if Linux supports it, if not then what is the similar file to include to keep the MakeFile behavior the same.

like image 573
rahul Kushwaha Avatar asked Nov 16 '25 00:11

rahul Kushwaha


1 Answers

You need a compatible Make implementation (and build system files). The problem is the default Make implementation on most GNU/Linux systems is GNU Make, which is incompatible with FreeBSD's.

Luckily FreeBSD uses bmake nowadays, which is packaged for most systems, if it isn't available in yours, you can download it here: https://crufty.net/help/sjg/bmake.html (and build it yourself).

like image 60
Ismael Luceno Avatar answered Nov 18 '25 13:11

Ismael Luceno



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!