yes, it is crystal-clear in bsd.own.mk Even though maybe the man page and bsd.README should be tweaked, or we should handle it in bsd.own.mk for reflecting the current manual. But I think it doesn’t worth it,
Sent from my iPhone > On 8 Aug 2019, at 04:26, Stuart Henderson <[email protected]> wrote: > >> On 2019-08-07, Edgar Pettijohn <[email protected]> wrote: >> >>> On Aug 6, 2019 8:51 PM, Gleydson Soares <[email protected]> wrote: >>> >>>> On Tue, Aug 06, 2019 at 06:55:15PM -0500, Edgar Pettijohn wrote: >>>> I'm trying to build smtpd with `-g'. I tried the following: >>>> >>>> deathstar$ make -DDEBUG >>>> ===> smtpd >>>> yacc -o parse.c /usr/src/usr.sbin/smtpd/smtpd/../parse.y >>>> cc -O2 -pipe 1 -fstack-protector-all -I/usr/src/usr.sbin/smtpd/smtpd/.. >>>> -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations >>>> -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare >>>> -Werror-implicit-function-declaration -DIO_TLS -DQUEUE_PROFILING -MD -MP >>>> -c /usr/src/usr.sbin/smtpd/smtpd/../aliases.c >>>> cc: error: no such file or directory: '1' >>>> *** Error 1 in smtpd (<sys.mk>:87 'aliases.o') >>>> *** Error 1 in /usr/src/usr.sbin/smtpd (<bsd.subdir.mk>:48 'all') >>>> >>>> I then tried: >>>> >>>> deathstar$ cat /etc/mk.conf >>>> DEBUG=1 >>>> >>>> deathstar$ make >>>> ===> smtpd >>>> yacc -o parse.c /usr/src/usr.sbin/smtpd/smtpd/../parse.y >>>> cc -O2 -pipe 1 -fstack-protector-all -I/usr/src/usr.sbin/smtpd/smtpd/.. >>>> -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations >>>> -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare >>>> -Werror-implicit-function-declaration -DIO_TLS -DQUEUE_PROFILING -MD -MP >>>> -c /usr/src/usr.sbin/smtpd/smtpd/../aliases.c >>>> cc: error: no such file or directory: '1' >>>> *** Error 1 in smtpd (<sys.mk>:87 'aliases.o') >>>> *** Error 1 in /usr/src/usr.sbin/smtpd (<bsd.subdir.mk>:48 'all') >>>> >>>> It builds without DEBUG defined. Any suggestions? >>> >>> DEBUG=-g >>> see mk.conf manpage. >>> >> >> The manual says that defining DEBUG adds -g to assembly not that DEBUG >> should be set to -g. Either way I will give it a shot tomorrow. If it works >> seems like the manual could be a little more informative. > > The wording in mk.conf(5) seems a little off, but that is exactly what > you should do. For a one-off, you can use "make DEBUG=-g" instead of > setting it in /etc/mk.conf. >

