From cbb62ab966b612c0d2b3fcb1dff6c5c58234ffe3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 8 Oct 2004 09:20:21 +0000 Subject: [PATCH] Don't bail out and die if SOURCES is empty. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5222 a1c6a512-1295-4272-9138-f99709370657 --- tools/make.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/make.inc b/tools/make.inc index 25173ae7e0..471d98a9de 100644 --- a/tools/make.inc +++ b/tools/make.inc @@ -12,9 +12,11 @@ $(OBJDIR)/%.o: %.S # to cause an error code to get returned and thus stop the build $(DEPFILE): $(SOURCES) @rm -f $(DEPFILE) - @(for each in $(SOURCES); do \ - obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \ - $(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \ + @(for each in $(SOURCES) x; do \ + if test "x" != "$$each"; then \ + obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \ + $(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \ + fi; \ done; \ echo "oo" >/dev/null )