From 6640978129e8d3153027060ca79ba17e62114d25 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Fri, 21 Nov 2008 15:07:15 +0000 Subject: Altered mkdepfile to use a single gcc call and post-process the output. This speeds up the dependency generation, especially in cygwin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19169 a1c6a512-1295-4272-9138-f99709370657 --- tools/functions.make | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tools/functions.make') diff --git a/tools/functions.make b/tools/functions.make index dd87377f87..083e3eafeb 100644 --- a/tools/functions.make +++ b/tools/functions.make @@ -29,19 +29,17 @@ c2obj = $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR),$(BUILDDIR),$(1)))) # calculate dependencies for a list of source files $(2) and output them # to a file $(1) - mkdepfile = $(shell \ - for each in $(2); do \ - obj=`echo $$each | sed -e 's/\.[cS]/.o/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ - $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h -MT "$$obj" $$each 2>/dev/null; \ - done | sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ + $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \ + $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) | \ + sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \ -e "s: max_language_size.h: $(BUILDDIR)/max_language_size.h:" \ -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ -e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \ - > $(1); ) + > $(1) ) # function to create .bmp dependencies bmpdepfile = $(shell \ -- cgit v1.2.3