Re: [dev] Decouple build system from program settings
On 5 December 2014 at 12:12, FRIGN wrote: > So just for the sake of consistency, given the two colours are a > program property, it should be in config.h (even if it is only 2 > lines, who cares? There's not going to be a binary change and especially > no difference after the CPP-vomit). Exactly. -Anselm
Re: [dev] Decouple build system from program settings
On Fri, 5 Dec 2014 12:06:05 +0100 "Dmitrij D. Czarkoff" wrote: > So I expect people to read config.mk. It would be my second direction after config.h (if you are used to the suckless style) > This was my initial thought, but config.def.h with 2 lines doesn't seem > sane. Although it is saner then mixing configuration of build system > and program options in one file. Yeah, just create a config.def.h. I don't see the problem with the config.mk-approach, but I bet most people agree with me that config.mk is there to fiddle with the build config(.def).h is there to fiddle with the program properties So just for the sake of consistency, given the two colours are a program property, it should be in config.h (even if it is only 2 lines, who cares? There's not going to be a binary change and especially no difference after the CPP-vomit). Cheers FRIGN -- FRIGN
Re: [dev] Decouple build system from program settings
FRIGN said: > This is just wrong. Or do you expect people to dig > in the code to change the colours? No. Dmitrij D. Czarkoff said: > diff --git a/config.mk b/config.mk ... > # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS and add -DHAVE_BSD_AUTH > # On OpenBSD and Darwin remove -lcrypt from LIBS > +# Redefine COLOR1 and COLOR2 to set custom colors So I expect people to read config.mk. > Better yet, if you want to make the separation, create > a config.h and put the option in there. This was my initial thought, but config.def.h with 2 lines doesn't seem sane. Although it is saner then mixing configuration of build system and program options in one file. -- Dmitrij D. Czarkoff
Re: [dev] Decouple build system from program settings
On Fri, 5 Dec 2014 11:54:00 +0100 "Dmitrij D. Czarkoff" wrote: > diff --git a/slock.c b/slock.c > index d281965..1ddc35b 100644 > --- a/slock.c > +++ b/slock.c > @@ -1,4 +1,3 @@ > - > /* See LICENSE file for license details. */ > #define _XOPEN_SOURCE 500 > #if HAVE_SHADOW_H > @@ -23,6 +22,9 @@ > #include > #endif > > +#define COLOR1 "black" > +#define COLOR2 "#005577" This is just wrong. Or do you expect people to dig in the code to change the colours? Better yet, if you want to make the separation, create a config.h and put the option in there. Cheers FRIGN -- FRIGN