diff options
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | rules/32.mk | 5 | ||||
-rw-r--r-- | rules/64.mk | 5 | ||||
-rw-r--r-- | rules/common.mk | 7 | ||||
-rw-r--r-- | rules/ips.mk | 2 |
5 files changed, 27 insertions, 2 deletions
@@ -74,7 +74,15 @@ are in "work/manifests" directory. * `ips-repo` - IPS repository to publish, e. g. `make publish ips-repo=http://example.com:1234` Any variable defined in Makefile will be passed to `pkgmogrify` and -can be used in IPS manifests (*.p5m). +can be used in IPS manifests (*.p5m). These variables passed additionally: +`build32` = `#` or empty, and `build64` = `#` or empty. These variables can +be used to cut off some line in package manifest (by commenting out). +By default these vars are `#` (pound). +If module `32.mk` is included, `build32` becomes '' (empty), so lines like: + + $(build32) file path=usr/lib/libfoo.so.1 + +become uncommented. Same for modules `64.mk`. ## git.mk diff --git a/rules/32.mk b/rules/32.mk index 907f90f..3bd29ba 100644 --- a/rules/32.mk +++ b/rules/32.mk @@ -31,6 +31,11 @@ protodirs += $(destdir.32) %-32-stamp: bits = 32 +# build32 = \#, not it is emtpy and lines like +# $(build32) file path=... +# in manifests are included +build32 := + __32_mk := included endif diff --git a/rules/64.mk b/rules/64.mk index 81c7390..29b63b7 100644 --- a/rules/64.mk +++ b/rules/64.mk @@ -31,6 +31,11 @@ protodirs += $(destdir.64) %-64-stamp: bits = 64 +# build64 = \#, not it is emtpy and lines like +# $(build64) file path=... +# in manifests are included +build64 := + __64_mk := included endif diff --git a/rules/common.mk b/rules/common.mk index e9861e9..820b8f0 100644 --- a/rules/common.mk +++ b/rules/common.mk @@ -24,8 +24,13 @@ # include guard: ifeq (,$(__common_mk)) +skip := \# + +build32 := $(skip) +build64 := $(skip) + # Default: -bits := 32 +bits := 64 # Prepended to commands which require root privileges # May be overriden in /etc/cibs/cibs.conf to, for example, pfexec diff --git a/rules/ips.mk b/rules/ips.mk index 5503147..f0f082e 100644 --- a/rules/ips.mk +++ b/rules/ips.mk @@ -44,6 +44,8 @@ pkg-define += \ -DMACH="$(mach)" \ -DMACH32="$(mach32)" \ -DMACH64="$(mach64)" \ +-Dbuild32="$(build32)" \ +-Dbuild64="$(build64)" \ # Where to find files: |