I am trying to build FreeBSD from source to see how it works. I googled how to do it, and most of the websites explaining how to build the world tell me to run this command inside the directory of the source code:
sudo make -j1 buildworld KERNCONF=MODEDKERNEL -DNO_CLEAN
For some reason, I keep getting this error...
make: invalid option -- 'D'
make: invalid option -- 'N'
Anyone know how to fix this? The Makefile
can be found here
CodePudding user response:
We don't need to see the makefile, because this error is being printed by make due to an invalid command line argument which means it's never even opening the makefile before it fails.
The reason is that -D
, etc. are not valid command line options to GNU make. If you run man make
(or look online for the GNU make
manual) you'll see that -D
is not listed as a valid option.
My suspicion is that when the websites you are reading are suggesting that you run make
, they mean you should run FreeBSD make, which does support a -D
option: https://www.freebsd.org/cgi/man.cgi?make(1)
You are trying to run this using GNU make, which does not have that option.