ldomctl, ldomd: Honour DEBUG in Makefile

2019-11-19 Thread Klemens Nanni
As of now, `export DEBUG=... ;  make' will ignore my flags.

I guess kettenis wanted symbols by default, so leave a default DEBUG
value that allows overwriting instead of omitting DEBUG as usual.

OK?


Index: ldomctl/Makefile
===
RCS file: /cvs/src/usr.sbin/ldomctl/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- ldomctl/Makefile28 Jul 2019 15:30:45 -  1.9
+++ ldomctl/Makefile19 Nov 2019 22:16:19 -
@@ -8,7 +8,7 @@ PROG=   ldomctl
 SRCS=  ldomctl.c ds.c mdesc.c util.c mdstore.c pri.c config.c parse.y
 CFLAGS+=-Wall
 CFLAGS+=-I${.CURDIR}/../ldomd -I${.CURDIR}
-DEBUG= -g
+DEBUG?=-g
 
 .else
 
Index: ldomd/Makefile
===
RCS file: /cvs/src/usr.sbin/ldomd/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- ldomd/Makefile  28 Jul 2019 15:30:45 -  1.5
+++ ldomd/Makefile  19 Nov 2019 22:16:23 -
@@ -8,7 +8,7 @@ PROG=   ldomd
 SRCS=  ldomd.c ds.c mdesc.c util.c var-config.c
 CFLAGS+=-Wall
 CFLAGS+=-I${.CURDIR}/../ldomctl
-DEBUG= -g
+DEBUG?=-g
 
 .else
 



Re: ldomctl, ldomd: Honour DEBUG in Makefile

2019-11-19 Thread Theo de Raadt
Seems accidentally left over from development.  As a rule we don't
ship with -g.

Klemens Nanni  wrote:

> As of now, `export DEBUG=... ;  make' will ignore my flags.
> 
> I guess kettenis wanted symbols by default, so leave a default DEBUG
> value that allows overwriting instead of omitting DEBUG as usual.
> 
> OK?
> 
> 
> Index: ldomctl/Makefile
> ===
> RCS file: /cvs/src/usr.sbin/ldomctl/Makefile,v
> retrieving revision 1.9
> diff -u -p -r1.9 Makefile
> --- ldomctl/Makefile  28 Jul 2019 15:30:45 -  1.9
> +++ ldomctl/Makefile  19 Nov 2019 22:16:19 -
> @@ -8,7 +8,7 @@ PROG= ldomctl
>  SRCS=ldomctl.c ds.c mdesc.c util.c mdstore.c pri.c config.c parse.y
>  CFLAGS+=-Wall
>  CFLAGS+=-I${.CURDIR}/../ldomd -I${.CURDIR}
> -DEBUG= -g
> +DEBUG?=  -g
>  
>  .else
>  
> Index: ldomd/Makefile
> ===
> RCS file: /cvs/src/usr.sbin/ldomd/Makefile,v
> retrieving revision 1.5
> diff -u -p -r1.5 Makefile
> --- ldomd/Makefile28 Jul 2019 15:30:45 -  1.5
> +++ ldomd/Makefile19 Nov 2019 22:16:23 -
> @@ -8,7 +8,7 @@ PROG= ldomd
>  SRCS=ldomd.c ds.c mdesc.c util.c var-config.c
>  CFLAGS+=-Wall
>  CFLAGS+=-I${.CURDIR}/../ldomctl
> -DEBUG=   -g
> +DEBUG?=  -g
>  
>  .else
>  
> 



Re: ldomctl, ldomd: Honour DEBUG in Makefile

2019-11-20 Thread Klemens Nanni
On Tue, Nov 19, 2019 at 10:32:39PM -0700, Theo de Raadt wrote:
> Seems accidentally left over from development.  As a rule we don't
> ship with -g.
I'm also happy to remove DEBUG as usual.

OK?


Index: ldomctl/Makefile
===
RCS file: /cvs/src/usr.sbin/ldomctl/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- ldomctl/Makefile28 Jul 2019 15:30:45 -  1.9
+++ ldomctl/Makefile20 Nov 2019 15:50:02 -
@@ -8,7 +8,6 @@ PROG=   ldomctl
 SRCS=  ldomctl.c ds.c mdesc.c util.c mdstore.c pri.c config.c parse.y
 CFLAGS+=-Wall
 CFLAGS+=-I${.CURDIR}/../ldomd -I${.CURDIR}
-DEBUG= -g
 
 .else
 
Index: ldomd/Makefile
===
RCS file: /cvs/src/usr.sbin/ldomd/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- ldomd/Makefile  28 Jul 2019 15:30:45 -  1.5
+++ ldomd/Makefile  20 Nov 2019 15:49:56 -
@@ -8,7 +8,6 @@ PROG=   ldomd
 SRCS=  ldomd.c ds.c mdesc.c util.c var-config.c
 CFLAGS+=-Wall
 CFLAGS+=-I${.CURDIR}/../ldomctl
-DEBUG= -g
 
 .else
 



Re: ldomctl, ldomd: Honour DEBUG in Makefile

2019-11-21 Thread Mark Kettenis
> From: "Theo de Raadt" 
> Date: Tue, 19 Nov 2019 22:32:39 -0700
> 
> Seems accidentally left over from development.  As a rule we don't
> ship with -g.

Indeed.  I don't see why these should be different.

> Klemens Nanni  wrote:
> 
> > As of now, `export DEBUG=... ;  make' will ignore my flags.
> > 
> > I guess kettenis wanted symbols by default, so leave a default DEBUG
> > value that allows overwriting instead of omitting DEBUG as usual.
> > 
> > OK?
> > 
> > 
> > Index: ldomctl/Makefile
> > ===
> > RCS file: /cvs/src/usr.sbin/ldomctl/Makefile,v
> > retrieving revision 1.9
> > diff -u -p -r1.9 Makefile
> > --- ldomctl/Makefile28 Jul 2019 15:30:45 -  1.9
> > +++ ldomctl/Makefile19 Nov 2019 22:16:19 -
> > @@ -8,7 +8,7 @@ PROG=   ldomctl
> >  SRCS=  ldomctl.c ds.c mdesc.c util.c mdstore.c pri.c config.c parse.y
> >  CFLAGS+=-Wall
> >  CFLAGS+=-I${.CURDIR}/../ldomd -I${.CURDIR}
> > -DEBUG= -g
> > +DEBUG?=-g
> >  
> >  .else
> >  
> > Index: ldomd/Makefile
> > ===
> > RCS file: /cvs/src/usr.sbin/ldomd/Makefile,v
> > retrieving revision 1.5
> > diff -u -p -r1.5 Makefile
> > --- ldomd/Makefile  28 Jul 2019 15:30:45 -  1.5
> > +++ ldomd/Makefile  19 Nov 2019 22:16:23 -
> > @@ -8,7 +8,7 @@ PROG=   ldomd
> >  SRCS=  ldomd.c ds.c mdesc.c util.c var-config.c
> >  CFLAGS+=-Wall
> >  CFLAGS+=-I${.CURDIR}/../ldomctl
> > -DEBUG= -g
> > +DEBUG?=-g
> >  
> >  .else
> >  
> > 
>