Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [ANALYSED] kernel object compilation failure unnoticed ?



On Fri, Mar 05, 2010 at 04:54:29PM +0100, Nicolas Joly wrote:
 > # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
 > # NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
 > NORMAL_C?=      @${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"; \
 >                 ${_MKSHECHO}\
 >                 ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
 >                 ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
 >                 ${COMPILE_CTFCONVERT}
 > [...]
 > 
 > With COMPILE_CTFCONVERT addition, which in my case is a simple echo,
 > the compilation command exit status is discarded and echo result will
 > be used instead.

argh! energizer-bunny-makefiles strike again...

PEOPLE: YOU NEED "|| exit 1" WHEN WRITING COMPLEX SHELL STUFF IN MAKE
RECIPES.

 > While the `;' could be replaced with `&&' construct; i wonder if there
 > is a better way to solve this, avoiding awful `a && b && c && d ...'
 > lines.

There is not, at least not until make grows support for multi-line
variable definitions, which isn't likely to happen anytime soon.

(While one could create a make variable containing a newline and
insert that, it wouldn't be an improvement.)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index