Issue 30779 - dmake doesn't echo recipe lines when creating files to be .INCLUDEd
Summary: dmake doesn't echo recipe lines when creating files to be .INCLUDEd
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-27 19:59 UTC by quetschke
Modified: 2004-12-02 18:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2004-06-27 19:59:14 UTC
I found this problem while trying to debug issue 30739. The recipes
following recipe "$(MISC)$/s_%.dpcc : %.cxx" from rules.mk *never*
echoed any recipe commands, not even when using -n or/and removing
the @ signs. (If failed because makedepend was missing.)

After a long while I found out that this only happens for files
created by inference that are to be used with .INCLUDE. See
solenv/inc/target.mk:2251:.INCLUDE : $(DEPFILES).

I tracked this down to an ?erroneous? setting of the A_SILENT flag in Glob_attr.

I document the order of the function calls here to reduce my own lookup times
next time.

Print_cmnd:make.c:1177 Echos the command unless echo == 0
   is called in line 1139 from:

Exec_commands:make.c:992 sets echo to true when A_SILENT is set in l_attr.
   l_attr gets set to attr in line 1183
   attr gets set to Glob_attr in 1022.
   is called in line 678 from:

Make:make.c:283 
   is called in line 702 from:

TryFiles:dmake.c:680
   is called in line 703 from:

_do_special:rulparse.c:533
   sets A_SILENT in Glob_attr unconditionally just before calling TryFiles
   in line 700. TryFiles is used to look for/infer the files to be loaded.

I don't see any reason why A_SILENT should be set especially for this, and the
following patch "fixes" this behavior:

--- dmake/rulparse.c    25 Mar 2003 14:02:13 -0000      1.5
+++ dmake/rulparse.c    27 Jun 2004 18:57:25 -0000
@@ -697,7 +697,7 @@
               t_attr cattr = prqlst->cl_prq->ce_attr;
 
               prqlst->cl_next = NIL(LINK);
-              Glob_attr |= ((attr&A_IGNORE)|A_SILENT);
+              Glob_attr |= (attr&A_IGNORE);
               prqlst->cl_prq->ce_attr &= ~A_FRINGE;
 
               fil = TryFiles(prqlst);
Comment 1 hjs 2004-06-28 16:43:13 UTC
a huge step for debugging dmake problems. do you expect any sideeffects?
Comment 2 quetschke 2004-06-28 18:28:29 UTC
I haven't tried a full build with this patch yet, but generally
the A_SILENT flag is only checked for echoing recepies. The fix
might produce some extra logfile noise, but one can always put
an @ in front of the annoying recipe lines.

But verbosity is not a real problem, I still think dmake is missing
a switch to issue recipes even if they are hidden by @ signs (like
-n + execution).
(This would actually be easy to do.)

I'll keep the fix in my local branch for a few builds and when
no extra problems arrise I'll commit it to 0704.
Comment 3 quetschke 2004-07-06 01:04:51 UTC
Test builds were successful, committed to cws_src680_ooo20040704.
Comment 4 hjs 2004-12-02 18:19:56 UTC
.