aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2012-10-24 15:29:24 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2012-10-24 15:29:24 +0400
commit73d7cc0cc80b0c58bfebd2c8c036a9a892dac138 (patch)
tree01787d1324a5027519b9ae208faed4f081806719
parent6459b3433b34763e4ac0a3a1ef101648c19adfe1 (diff)
downloadcibs-73d7cc0cc80b0c58bfebd2c8c036a9a892dac138.tar.gz
$(build32) and $(build64) filters in manifests
-rw-r--r--README.md10
-rw-r--r--rules/32.mk5
-rw-r--r--rules/64.mk5
-rw-r--r--rules/common.mk7
-rw-r--r--rules/ips.mk2
5 files changed, 27 insertions, 2 deletions
diff --git a/README.md b/README.md
index c03decd..88f7d1c 100644
--- a/README.md
+++ b/README.md
@@ -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: