[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make "Giving up" silently (besides exit code)
From: |
John Orr |
Subject: |
Make "Giving up" silently (besides exit code) |
Date: |
Tue, 24 Apr 2007 13:05:13 +1000 |
User-agent: |
KMail/1.7.1 |
Hi,
I wonder if anyone can help me - I'm using make 3.81 on Suse Linux 9.2.
I hit a problem today where I had an error in a make file, such that a target
was reliant upon a prerequiste for which there was no rule. It was my fault.
The problem, however, was that make gave no error message at all - it just
exited with status 2.
When I ran it with the -d option, the end of the output was
Considering target file `common/protocol/include/dl26/mipv6.h'.
File `common/protocol/include/dl26/mipv6.h' does not exist.
Considering target file `common/protocol/include/dl26/mipv6.h.built'.
File `common/protocol/include/dl26/mipv6.h.built' does not exist.
Considering target file `common/protocol/mipv6/dl26/mipv6.c.built'.
File `common/protocol/mipv6/dl26/mipv6.c.built' does not exist.
Considering target file `common/utils/dl26/g_ntformat'.
Looking for an implicit rule for `common/utils/dl26/g_ntformat'.
No implicit rule found for `common/utils/dl26/g_ntformat'.
Finished prerequisites of target file `common/utils/dl26/g_ntformat'.
No need to remake target `common/utils/dl26/g_ntformat'.
Pruning file `common/protocol/dl26/locid.h.exists'.
Pruning file `common/protocol/mipv6/mipv6.s'.
Finished prerequisites of target file
`common/protocol/mipv6/dl26/mipv6.c.built'.
Giving up on target file `common/protocol/mipv6/dl26/mipv6.c.built'.
Finished prerequisites of target file
`common/protocol/include/dl26/mipv6.h.built'.
Giving up on target file `common/protocol/include/dl26/mipv6.h.built'.
Finished prerequisites of target file
`common/protocol/include/dl26/mipv6.h'.
Giving up on target file `common/protocol/include/dl26/mipv6.h'.
Finished prerequisites of target file
`common/protocol/mipv6/dl26/mipv6dec.o'.
Giving up on target file `common/protocol/mipv6/dl26/mipv6dec.o'.
Finished prerequisites of target file `common/protocol/mipv6'.
Giving up on target file `common/protocol/mipv6'.
My problem is - I know to use the -d flag in this situation to see what's
really going on - but most people I work with don't. They get no info at all.
How can I detect this problem and give a meaningful error message? I could
modify make's remake.c source file perhaps - but is there a better way?
The output without -d is nothing (beside explicit $(info ) statements which
I've deleted to avoid confusing anyone:
quokka:/<5>intel/src> make --warn-undefined-variables --check-symlink-times
--no-builtin-variables --makefile=local.mk r_BUILDDIR=dl26 "DONT_USE_P4=1"
"DONT_DO_FINDMODULES=1" ./COMPONENT_CONTENTS=common
common/COMPONENT_CONTENTS=common/protocol
common/protocol/COMPONENT_CONTENTS=common/protocol/mipv6 DONT_DO_FINDMODULES=1
common/protocol/mipv6
quokka:/<5>intel/src> echo $?
2
quokka:/<5>intel/src>
I can happily provide a full -dpq dump if it helps.
Looking at remake.c, I find
if (depth == 0 && keep_going_flag
&& !just_print_flag && !question_flag)
error (NILF,
_("Target `%s' not remade because of errors."), file->name);
Presumably this if statement failed to print because I didn't have the
keep_going_flag (-k?) set?
Thanks for any tips you can give,
John
*********************************************************************************************************
"This e-mail (and any attachments) is confidential and privileged information
of Catapult Communications"
*********************************************************************************************************
- Make "Giving up" silently (besides exit code),
John Orr <=