This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[committed] Fix construction of GTFILES_H


Hi,

GTFILES_H is constructed using $(subst FROM,TO,TEXT), which doesn't do 
word splitting, hence if using a srcdir containing a ".c" (like 
"gcc.changed") it will contain completely broken filenames (as not only 
the .c file name suffix is replaced with .h, but also all the other 
occurences).  This then breaks dependencies and hence parallel build.  It 
seems that people don't usually use such srcdir names :-)

The correct way of constructing this is to use $(patsubst), which does 
word splitting, i.e. is suited for dealing with file lists.  I've 
committed this as obvious.


Ciao,
Michael.
-- 
	* Makefile.in (GTFILES_H): Use $(patsubst) instead of $(subst).

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 127769)
+++ Makefile.in	(working copy)
@@ -3094,7 +3094,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/co
   $(srcdir)/targhooks.c $(out_file) $(srcdir)/passes.c $(srcdir)/cgraphunit.c \
   @all_gtfiles@
 
-GTFILES_H = $(subst /,-, $(subst $(srcdir)/,gt-, $(subst .c,.h, \
+GTFILES_H = $(subst /,-, $(patsubst $(srcdir)/%,gt-%, $(patsubst %.c,%.h, \
 		  $(filter %.c, $(GTFILES)))))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))


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