Parallelize depend file generation

This commit is contained in:
Matias N
2020-11-18 13:44:58 -03:00
committed by Alan Carvalho de Assis
parent 2df6547d50
commit d5b6ec450f
35 changed files with 194 additions and 54 deletions
+10 -2
View File
@@ -156,10 +156,18 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, bin/Make.dep, $^)
$(call DELFILE, $^)
makekdepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, kbin/Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
$(Q) $(MAKE) makedepfile
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
$(Q) $(MAKE) makekdepfile CFLAGS="$(CFLAGS) $(KDEFINE)"
endif
ifeq ($(CONFIG_LIB_ZONEINFO_ROMFS),y)
$(Q) $(MAKE) -C zoneinfo depend BIN=$(BIN)
+1 -1
View File
@@ -37,7 +37,7 @@ include $(TOPDIR)/Make.defs
all:
.PHONY: clean distclean
# Clean Targets:
clean:
+5 -1
View File
@@ -118,8 +118,12 @@ context: .tzbuilt romfs
# Create dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend
+5 -1
View File
@@ -49,9 +49,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend
+10 -2
View File
@@ -235,10 +235,18 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, bin/Make.dep, $^)
$(call DELFILE, $^)
makekdepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, kbin/Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile gensources $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
$(Q) $(MAKE) makedepfile
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
$(Q) $(MAKE) makekdepfile CFLAGS="$(CFLAGS) $(KDEFINE)"
endif
$(Q) touch $@
+1 -1
View File
@@ -37,7 +37,7 @@ include $(TOPDIR)/Make.defs
all:
.PHONY: clean distclean
# Clean Targets:
clean:
+5 -1
View File
@@ -91,8 +91,12 @@ $(BIN): $(OBJS)
dirlinks::
makedepfile: $(CXXSRCS:.cxx=.ddx) $(CPPSRCS:.cpp=.ddp)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend