This is the mail archive of the automake-prs@sourceware.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: automake/501: abbreviating the .Po-related output somewhat


The following reply was made to PR automake/501; it has been noted by GNATS.

From: Paul Eggert <eggert@CS.UCLA.EDU>
To: automake-gnats@sources.redhat.com
Cc:  
Subject: Re: automake/501: abbreviating the .Po-related output somewhat
Date: Tue, 29 Aug 2006 00:25:34 -0700

 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
 
 > I think a really bad case were if the dependency file was
 > corrupted in a way that the next `make' invocation would
 > die.  Could a parallel make invocation reading the incomplete
 > file be an issue (note that Makefiles can include .Po
 > files from different directories, with subdir-objects)?
 
 Good point.  If the file is longer than the block size GCC will write
 it out a buffer at a time.
 
 I suppose we could fix this in GCC, but that would take some
 time to percolate through.
 
 So, for now, how about this fix instead?  It changes the output of
 "make" from:
 
    if gcc -std=gnu99  -I. -I. -I../lib  -I../lib   -g -O2 -MT dd.o -MD -MP -MF ".deps/dd.Tpo" -c -o dd.o dd.c; \
    then mv -f ".deps/dd.Tpo" ".deps/dd.Po"; else rm -f ".deps/dd.Tpo"; exit 1; fi
 
 to:
 
    gcc -std=gnu99  -I. -I. -I../lib  -I../lib   -g -O2 -MTdd.o -MD -MP -MF.deps/dd.Tpo -c -o dd.o dd.c
    mv -f .deps/dd.Tpo .deps/dd.Po
 
 An advantage of this approach is that it avoids a subsidiary 'sh'
 process, since GNU 'make' can execute gcc and mv directly.
 
 
 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* lib/am/depend2.am (?GENERIC?%EXT%.o): Abbreviate output a bit by
 	not bothering to quote the .Po file name (the quoting doesn't
 	suffice in general anyway), and by not bothering to remove junk
 	.Tpo files (as they'll be removed later).  This also lets 'make'
 	run faster by avoiding a subshell.
 
 --- lib/am/depend2.am	23 Mar 2006 06:35:15 -0000	1.60
 +++ lib/am/depend2.am	29 Aug 2006 07:14:17 -0000
 @@ -65,10 +65,11 @@ if %?NONLIBTOOL%
  if %FASTDEP%
  ## In fast-dep mode, we can always use -o.
  ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
 -?!GENERIC?	if %COMPILE% -MT %OBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %OBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
 -?SUBDIROBJ??GENERIC?	depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
 -?GENERIC?	if %COMPILE% -MT %OBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %OBJ% %SOURCE%; \
 -	then mv -f "%DEPBASE%.Tpo" "%DEPBASE%.Po"; else rm -f "%DEPBASE%.Tpo"; exit 1; fi
 +?!GENERIC?	%COMPILE% -MT%OBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %OBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 +?GENERIC??!SUBDIROBJ?	%COMPILE% -MT%OBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %OBJ% %SOURCE%
 +?GENERIC??SUBDIROBJ?	depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
 +?GENERIC??SUBDIROBJ?	%COMPILE% -MT%OBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %OBJ% %SOURCE% &&\
 +	mv -f %DEPBASE%.Tpo %DEPBASE%.Po
  else !%FASTDEP%
  if %AMDEP%
  	source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
 @@ -89,10 +90,11 @@ endif !%FASTDEP%
  if %FASTDEP%
  ## In fast-dep mode, we can always use -o.
  ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
 -?!GENERIC?	if %COMPILE% -MT %OBJOBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`; \
 -?SUBDIROBJ??GENERIC?	depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
 -?GENERIC?	if %COMPILE% -MT %OBJOBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %OBJOBJ% `$(CYGPATH_W) '%SOURCE%'`; \
 -	then mv -f "%DEPBASE%.Tpo" "%DEPBASE%.Po"; else rm -f "%DEPBASE%.Tpo"; exit 1; fi
 +?!GENERIC?	%COMPILE% -MT%OBJOBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
 +?GENERIC??!SUBDIROBJ?	%COMPILE% -MT%OBJOBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %OBJOBJ% `$(CYGPATH_W) '%SOURCE%'`
 +?GENERIC??SUBDIROBJ?	depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
 +?GENERIC??SUBDIROBJ?	%COMPILE% -MT%OBJOBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %OBJOBJ% `$(CYGPATH_W) '%SOURCE%'` &&\
 +	mv -f %DEPBASE%.Tpo %DEPBASE%.Po
  else !%FASTDEP%
  if %AMDEP%
  	source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
 @@ -115,10 +117,11 @@ if %?LIBTOOL%
  if %FASTDEP%
  ## In fast-dep mode, we can always use -o.
  ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
 -?!GENERIC?	if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
 -?SUBDIROBJ??GENERIC?	depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
 -?GENERIC?	if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tpo" %-c% -o %LTOBJ% %SOURCE%; \
 -	then mv -f "%DEPBASE%.Tpo" "%DEPBASE%.Plo"; else rm -f "%DEPBASE%.Tpo"; exit 1; fi
 +?!GENERIC?	%LTCOMPILE% -MT%LTOBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 +?GENERIC??!SUBDIROBJ?	%LTCOMPILE% -MT%LTOBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCE%
 +?GENERIC??SUBDIROBJ?	depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
 +?GENERIC??SUBDIROBJ?	%LTCOMPILE% -MT%LTOBJ% -MD -MP -MF%DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCE% &&\
 +	mv -f %DEPBASE%.Tpo %DEPBASE%.Plo
  else !%FASTDEP%
  if %AMDEP%
  	source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]