Advertisement
cheako

Add parallel build support to 0ad/debian/rules.

Nov 18th, 2015
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.86 KB | None | 0 0
  1. diff --git a/debian/rules b/debian/rules
  2. index 9415753..6a0fd19 100755
  3. --- a/debian/rules
  4. +++ b/debian/rules
  5. @@ -1,9 +1,14 @@
  6.  #!/usr/bin/make -f
  7.  
  8. -ifeq ($(findstring parallel=,$(DEB_BUILD_OPTIONS)),)
  9. -   export DEB_BUILD_OPTIONS+=parallel=$(shell getconf _NPROCESSORS_ONLN)
  10. +DEB_BUILD_OPTIONS_PARALLEL=$(filter parallel=%,$(DEB_BUILD_OPTIONS))
  11. +fneq (,$(DEB_BUILD_OPTIONS_PARALLEL))
  12. +    NUMJOBS = $(patsubst parallel=%,%,$(DEB_BUILD_OPTIONS_PARALLEL))
  13. +else
  14. +    NUMJOBS = $(shell getconf _NPROCESSORS_ONLN)
  15.  endif
  16.  
  17. +MAKEFLAGS += -j$(NUMJOBS)
  18. +
  19.  include /usr/share/dpkg/architecture.mk
  20.  
  21.  export CBUILD=$(DEB_BUILD_GNU_TYPE)
  22. @@ -24,6 +29,7 @@ override_dh_auto_clean:
  23.  
  24.  override_dh_auto_build:
  25.     build/workspaces/update-workspaces.sh \
  26. +       -j$(NUMJOBS) \
  27.         --bindir=/usr/games \
  28.         --libdir=/usr/lib/games/0ad \
  29.         --datadir=/usr/share/games/0ad \
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement