bugmake - Bugs: bug #7575, "make -n" leaves...

 
 

bug #7575: "make -n" leaves intermediate files which are deleted without "-n"

Submitter:  None
Submitted:  Wed 04 Feb 2004 07:46:38 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  3.79.1 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 04 Feb 2004 07:46:38 AM UTC, original submission:  

I use a special pair of rules to autogenerate dependencies.  A "pair" because there are two separate stages -- "gcc -MM" and "sed s/.../.../", and each can generate an error.

This is done with following rules (gcc>2.95, due to "-MF"):

%.d: %.dep
sed   's/$*.o :/$.o $@:/' <$*.dep >$@
%.dep: %.c
$(CC)   -MM $(CPPFLAGS) $< -MF$@ >/dev/null

and "include $(ALLDEPENDS)" where ALLDEPENDS contains list of all .d-files.

Everything is fine -- make regenerates these .d-files upon change of .c or any of included files, and automatically removes intermediate .dep-files.

BUT: when running with "-n" switch, make still performs this .c->.dep->.d sequence (since otherwise it wouldn't be able to have an up-to-date makefile), but DOES NOT remove .dep-files.  So that they remain sitting there forever.

Dmitry Yu. Bolkhovityanov, D.Yu.BolkhovityanovATinp.nsk.su
(BTW, does Savannah registration work? It tells "You are now being sent a confirmation email", but that email never reaches me...)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2004-10-06 psmith Carbon-Copy- Added d --DOT-- yu --DOT-- bolkhovityanov --AT-- inp --DOT-- nsk --DOT-- su

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code