help-make
[Top][All Lists]
Advanced

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

deleting of the targets once interrupted.


From: bhaskar . g
Subject: deleting of the targets once interrupted.
Date: Fri, 9 May 2003 10:40:16 +0530

Hi All,

This is regarding earlier reported problem when using gmake 3.79.1 on Windows 
and 3.80 on HP UX.

If I implement this using a sed script the problem is not seen. The sed script 
implementation is as follows:

As per the gmake manual if the make process is interrupted using (^c) it will 
delete the currently building
target.

%.d: %.c
      $(_SDE_ECHO)$(ECHO) Making dependencies for $<
      $(_SDE_ECHO)$(MKDIR) $(dir $@)
      $(_SDE_ECHO) if [ x$(_SDE_ECHO) = x ]; then $(ECHO) $(GCC) -undef -M 
$(_SDE_GCC_CXXOPTIONS) $<; fi
      $(_SDE_ECHO)$(GCC) -undef -M $(_SDE_GCC_CXXOPTIONS) $< \
      | $(SED) 's%\(.*\)\.o[ :]*%$(@:.d=.$(_SDE_O)) $@ : %g'> $@; \
      [ -s $@ ] || $(RM) $@

Thanks in Advance for your help.

Bhaskar.G
SSD/DTG/CTO, Philips Semiconductors,


Philips Innovation Campus,
No. 1, Murphy Road, Ulsoor,
Bangalore 560 008.


Telephone:
+91 80 5579000 Ext 3019


Email:
address@hidden


Online:
BeeGee Online



Winners don't do different things they do things differently



----- Forwarded by Bhaskar G/BTC/SC/PHILIPS on 05/09/2003 09:47 AM -----
                                                                                
                                                       
                                                                                
                                                       
                                                   To:   address@hidden         
                                                    
                                                   cc:                          
                                                       
                                                   Subject:    deleting of the 
targets once interrupted.                               
                                                                                
                                                       
               Bhaskar G                           Classification:              
                 Unclassified                          
                                                                                
                                                       
               02/20/2003 10:30 PM                                              
                                                       
                                                                                
                                                       
                                                                                
                                                       



Hi All,

I am using 3.79.1 on windows with cygwin and encountering the following problem.

my makefile implementation of generating dependency is something like this.

define makecdeps
$(strip $(subst $(_space_)\,$(_space_),$(shell $(GCC) -M $(_SDE_GCC_COPTIONS) 
$<)))
endef

define dependencies
$(patsubst %.o:,$(@:.d=.$(obj)):,$(if $(filter %.c,$<),$(makecdeps))

define run_deps
$(_SDE_ECHO)$(ECHO) Making dependencies for $(notdir $<) ...; \
if [ ! -d $(dir $@) ]; then $(MKDIR) -p $(dir $@); fi; \
$(ECHO) '$@ \'>$@
@$(if $(findstring :,$(dependencies)), $(foreach file,$(dependencies),$(ECHO) 
'$(file) \'>>$@ ;),$(ECHO) ': \'>>$@ ;)
@if [ ! -s $@ ]; then $(RM) -Rf $@; fi
endef

%.d: %.c
      $(run_deps)

When i try to generate the dependency and i would like to interrupt gmake by 
ctrl-c. The following happens
it pops a message saying that deleting <filename>.d file but the file is still 
present and with some of the contents.

Do anyone have any idea what is being done.

regards
bhaskar


The information contained in this message is confidential and may be legally 
privileged. The message is intended solely for the addressee(s). If you are not 
the intended recipient, you are hereby notified that any use, dissemination, or 
reproduction is
strictly prohibited and may be unlawful. If you are not the intended recipient, 
please contact the sender by return e-mail and destroy all copies of the 
original message.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]