Hi Quentin,

> I think that you can also drop the || altogether,
> make will just tell you whatever problem it encountered
> while trying to invoque cscope.
> 
> > -   @mkdir -p ${DESTDIR}${MANPREFIX}/man1
> > -   @cp sent.1 ${DESTDIR}${MANPREFIX}/man1/sent.1
> > -   @chmod 644 ${DESTDIR}${MANPREFIX}/man1/sent.1
> > +   mkdir -p ${DESTDIR}${MANPREFIX}/man1
> > +   cp sent.1 ${DESTDIR}${MANPREFIX}/man1/sent.1
> 
> I'd cp -f here too.

I agree.

> >  # includes and libs
> > -INCS = -I. -I/usr/include -I/usr/include/freetype2 -I${X11INC}
> > -LIBS = -L/usr/lib -lc -lm -L${X11LIB} -lXft -lfontconfig -lX11
> > +INCS = -I/usr/include/freetype2 -I${X11INC}
> > +LIBS = -lm -L${X11LIB} -lXft -lfontconfig -lX11
> 
> The -L option should go into LDFLAGS

Since $LIBS is only used to provide $LDFLAGS, we could copy it's contents
directly into $LDFLAGS and drop $LIBS. Good catch.

> >  # flags
> >  CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600
> > -CFLAGS += -g -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
> > -LDFLAGS += -g ${LIBS}
> > -#CFLAGS += -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
> > -#LDFLAGS += ${LIBS}
> > +CFLAGS = -std=c99 -pedantic -Wall -Wstrict-prototypes 
> > -Wold-style-definition -Os ${INCS} ${CPPFLAGS}
> 
> The -std option isn't necessary with the default CC.
> I'd remove any warning from production build,
> warnings are for development,
> then developpers can set whatever warnings they like.
> 
> >  # compiler and linker
> > -CC ?= cc
> > +CC = cc
> 
> This should be removed altogether if you want a standard Makefile,
> then CC will just be the expected c99.

I'd keep the `-std` option and the CC assignment.
We want to be C99 compliant regardless of which compiler the user decides to 
use.
Additionally, CC is a configuration option in all suckless programs and
to be consistent here seems reasonable, in my opinion.

-- 
Best Regards,
Tom Schwindl

Reply via email to