OSDN Git Service

build: remove duplicates from order-only directory prerequisite list
authorDiego Biurrun <diego@biurrun.de>
Sun, 10 Jul 2011 19:05:45 +0000 (21:05 +0200)
committerDiego Biurrun <diego@biurrun.de>
Sun, 10 Jul 2011 20:16:21 +0000 (22:16 +0200)
This reduces startup latency for make invocations, which is especially
noticeable on systems that are slow or have slow I/O, like Windows.

common.mak

index da51495..8a2aa7c 100644 (file)
@@ -39,9 +39,9 @@ $(HOSTOBJS): %.o: %.c
 $(HOSTPROGS): %$(HOSTEXESUF): %.o
        $(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
 
-$(OBJS):     | $(dir $(OBJS))
-$(HOSTOBJS): | $(dir $(HOSTOBJS))
-$(TESTOBJS): | $(dir $(TESTOBJS))
+$(OBJS):     | $(sort $(dir $(OBJS)))
+$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))
+$(TESTOBJS): | $(sort $(dir $(TESTOBJS)))
 $(TOOLOBJS): | tools
 
 OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS))