File: buildopts.mk

package info (click to toggle)
dpkg 1.23.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 59,120 kB
  • sloc: ansic: 40,205; perl: 30,746; sh: 18,907; cpp: 6,054; makefile: 5,226; sed: 127
file content (23 lines) | stat: -rw-r--r-- 886 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This Makefile fragment (since dpkg 1.20.1) parses option arguments from
# DEB_BUILD_OPTIONS, and exposes these as variables.
#
# Defines the following variables:
#
#   DEB_BUILD_OPTION_PARALLEL: The argument for the parallel=N option.
#     $(DEB_BUILD_OPTIONS)                "parallel=2"  "parallel="  ""
#     $(DEB_BUILD_OPTION_PARALLEL)        "2"           ""           unset
#     $(DEB_BUILD_OPTION_PARALLEL:%=-j%)  "-j2"         ""           ""
#
# Note:
# - Only documented variables are considered public interfaces.
# - Expects to be included from the source tree root directory.

ifndef dpkg_buildopts_mk_included
dpkg_buildopts_mk_included = yes

dpkg_buildopts_parallel := $(filter parallel=%,$(DEB_BUILD_OPTIONS))
ifdef dpkg_buildopts_parallel
  DEB_BUILD_OPTION_PARALLEL = $(patsubst parallel=%,%,$(dpkg_buildopts_parallel))
endif

endif # dpkg_buildopts_mk_included