Don't build project folders in parallel.
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 4 Dec 2018 10:31:54 +0000 (21:31 +1100)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 4 Dec 2018 10:37:16 +0000 (21:37 +1100)
.drone.yml
Bootloaders/makefile
Demos/Device/ClassDriver/makefile
Demos/Device/LowLevel/makefile
Demos/DualRole/ClassDriver/makefile
Demos/Host/ClassDriver/makefile
Demos/Host/LowLevel/makefile
Projects/XPLAINBridge/makefile
Projects/makefile

index 8d67939..ba140e3 100644 (file)
@@ -2,10 +2,10 @@ kind: pipeline
 name: default
 
 steps:
 name: default
 
 steps:
-- name: Build
+- name: Projects
   image: abcminiuser/docker-avr8-toolchain
   commands:
   image: abcminiuser/docker-avr8-toolchain
   commands:
-  - make --quiet all
+  - make -j --quiet all
 
 - name: Bootloaders
   image: abcminiuser/docker-avr8-toolchain
 
 - name: Bootloaders
   image: abcminiuser/docker-avr8-toolchain
index 33e1396..1942df6 100644 (file)
@@ -22,20 +22,9 @@ ifeq ($(MAKELEVEL), 10)
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
-# Need to special-case building without a per-project object directory
-ifeq ($(OBJDIR),)
-   # If no target specified, force "clean all" and disallow parallel build
-   ifeq ($(MAKECMDGOALS),)
-      MAKECMDGOALS := clean all
-      .NOTPARALLEL:
-   endif
-
-   # If one of the targets is to build, force "clean" beforehand and disallow parallel build
-   ifneq ($(findstring all, $(MAKECMDGOALS)),)
-      MAKECMDGOALS := clean $(MAKECMDGOALS)
-      .NOTPARALLEL:
-   endif
-endif
+# Build each directory sequentially, even if we are building using multiple
+# cores within each project
+.NOTPARALLEL:
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
index 77ed706..e582bd7 100644 (file)
@@ -22,20 +22,9 @@ ifeq ($(MAKELEVEL), 10)
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
-# Need to special-case building without a per-project object directory
-ifeq ($(OBJDIR),)
-   # If no target specified, force "clean all" and disallow parallel build
-   ifeq ($(MAKECMDGOALS),)
-      MAKECMDGOALS := clean all
-      .NOTPARALLEL:
-   endif
-
-   # If one of the targets is to build, force "clean" beforehand and disallow parallel build
-   ifneq ($(findstring all, $(MAKECMDGOALS)),)
-      MAKECMDGOALS := clean $(MAKECMDGOALS)
-      .NOTPARALLEL:
-   endif
-endif
+# Build each directory sequentially, even if we are building using multiple
+# cores within each project
+.NOTPARALLEL:
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
index 77ed706..e582bd7 100644 (file)
@@ -22,20 +22,9 @@ ifeq ($(MAKELEVEL), 10)
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
-# Need to special-case building without a per-project object directory
-ifeq ($(OBJDIR),)
-   # If no target specified, force "clean all" and disallow parallel build
-   ifeq ($(MAKECMDGOALS),)
-      MAKECMDGOALS := clean all
-      .NOTPARALLEL:
-   endif
-
-   # If one of the targets is to build, force "clean" beforehand and disallow parallel build
-   ifneq ($(findstring all, $(MAKECMDGOALS)),)
-      MAKECMDGOALS := clean $(MAKECMDGOALS)
-      .NOTPARALLEL:
-   endif
-endif
+# Build each directory sequentially, even if we are building using multiple
+# cores within each project
+.NOTPARALLEL:
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
index b33ecf2..b8e5e2a 100644 (file)
@@ -22,20 +22,9 @@ ifeq ($(MAKELEVEL), 10)
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
-# Need to special-case building without a per-project object directory
-ifeq ($(OBJDIR),)
-   # If no target specified, force "clean all" and disallow parallel build
-   ifeq ($(MAKECMDGOALS),)
-      MAKECMDGOALS := clean all
-      .NOTPARALLEL:
-   endif
-
-   # If one of the targets is to build, force "clean" beforehand and disallow parallel build
-   ifneq ($(findstring all, $(MAKECMDGOALS)),)
-      MAKECMDGOALS := clean $(MAKECMDGOALS)
-      .NOTPARALLEL:
-   endif
-endif
+# Build each directory sequentially, even if we are building using multiple
+# cores within each project
+.NOTPARALLEL:
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
index bbe5023..566baed 100644 (file)
@@ -22,20 +22,9 @@ ifeq ($(MAKELEVEL), 10)
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
-# Need to special-case building without a per-project object directory
-ifeq ($(OBJDIR),)
-   # If no target specified, force "clean all" and disallow parallel build
-   ifeq ($(MAKECMDGOALS),)
-      MAKECMDGOALS := clean all
-      .NOTPARALLEL:
-   endif
-
-   # If one of the targets is to build, force "clean" beforehand and disallow parallel build
-   ifneq ($(findstring all, $(MAKECMDGOALS)),)
-      MAKECMDGOALS := clean $(MAKECMDGOALS)
-      .NOTPARALLEL:
-   endif
-endif
+# Build each directory sequentially, even if we are building using multiple
+# cores within each project
+.NOTPARALLEL:
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
index bbe5023..566baed 100644 (file)
@@ -22,20 +22,9 @@ ifeq ($(MAKELEVEL), 10)
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
-# Need to special-case building without a per-project object directory
-ifeq ($(OBJDIR),)
-   # If no target specified, force "clean all" and disallow parallel build
-   ifeq ($(MAKECMDGOALS),)
-      MAKECMDGOALS := clean all
-      .NOTPARALLEL:
-   endif
-
-   # If one of the targets is to build, force "clean" beforehand and disallow parallel build
-   ifneq ($(findstring all, $(MAKECMDGOALS)),)
-      MAKECMDGOALS := clean $(MAKECMDGOALS)
-      .NOTPARALLEL:
-   endif
-endif
+# Build each directory sequentially, even if we are building using multiple
+# cores within each project
+.NOTPARALLEL:
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
index 92344e5..0bcf777 100644 (file)
@@ -36,7 +36,7 @@ all:
 # identical OBJDIR directory, we need to enforce the use of this project's object file
 # directory as the one where the build object files are to be stored, by giving it a
 # path relative to the current folder.
 # identical OBJDIR directory, we need to enforce the use of this project's object file
 # directory as the one where the build object files are to be stored, by giving it a
 # path relative to the current folder.
-OBJDIR      := ./obj
+OBJDIR      := ./xpb-obj
 
 # Include LUFA-specific DMBS extension modules
 DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
 
 # Include LUFA-specific DMBS extension modules
 DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA
index 992dff8..3f5cd57 100644 (file)
@@ -22,20 +22,9 @@ ifeq ($(MAKELEVEL), 10)
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
    $(error EMERGENCY ABORT: INFINITE RECURSION DETECTED)
 endif
 
-# Need to special-case building without a per-project object directory
-ifeq ($(OBJDIR),)
-   # If no target specified, force "clean all" and disallow parallel build
-   ifeq ($(MAKECMDGOALS),)
-      MAKECMDGOALS := clean all
-      .NOTPARALLEL:
-   endif
-
-   # If one of the targets is to build, force "clean" beforehand and disallow parallel build
-   ifneq ($(findstring all, $(MAKECMDGOALS)),)
-      MAKECMDGOALS := clean $(MAKECMDGOALS)
-      .NOTPARALLEL:
-   endif
-endif
+# Build each directory sequentially, even if we are building using multiple
+# cores within each project
+.NOTPARALLEL:
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null
 
 %: $(PROJECT_DIRECTORIES)
        @echo . > /dev/null