aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--rules/archive.mk1
-rw-r--r--rules/autotools.mk4
-rw-r--r--rules/common.mk8
-rw-r--r--rules/git.mk2
-rw-r--r--rules/ips-manifest.mk12
6 files changed, 13 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index cdf77ce..708ba51 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ cibs-inst-root := /usr/share/cibs
include $(cibs-root)/rules/$(package).mk
-version := 0.2.0
+version := 0.3.0
install-stamp: rules-mogrify-stamp
diff --git a/rules/archive.mk b/rules/archive.mk
index 04f5a13..6811e9a 100644
--- a/rules/archive.mk
+++ b/rules/archive.mk
@@ -26,7 +26,6 @@ ifeq (,$(__archive_mk))
.SECONDEXPANSION:
-protodirs += $(sourcedir)
build-depends += archiver/gnu-tar
archive-validator := $(cibs-root)/scripts/validate-archive
diff --git a/rules/autotools.mk b/rules/autotools.mk
index 0e51401..d9b76b6 100644
--- a/rules/autotools.mk
+++ b/rules/autotools.mk
@@ -27,7 +27,7 @@ ifeq (,$(__autotools_mk))
include $(cibs-root)/rules/common.mk
-configure := $(sourcedir)/configure
+configure := $(topdir)/$(sourcedir)/configure
configure-env = \
CC="$(CC)" \
CXX="$(CXX)" \
@@ -62,7 +62,7 @@ build-%-stamp:
touch $@
install-%-stamp: target = install
-install-%-stamp: make-vars = DESTDIR="$(protodir)"
+install-%-stamp: make-vars = DESTDIR="$(topdir)/$(protodir)"
install-%-stamp:
cd "$(builddir)" && $(MAKE) $(target) $(make-vars)
touch $@
diff --git a/rules/common.mk b/rules/common.mk
index 3ab7f74..fa30a57 100644
--- a/rules/common.mk
+++ b/rules/common.mk
@@ -18,7 +18,7 @@
# CDDL HEADER END
#
#
-# Copyright (C) 2012, Nexenta Systems, Inc. All rights reserved.
+# Copyright (C) 2012, 2013. Nexenta Systems, Inc. All rights reserved.
#
# include guard:
@@ -42,13 +42,11 @@ mach64 := amd64
variants :=
-workdir-base := work
-workdir := $(CURDIR)/$(workdir-base)
+topdir := $(CURDIR)
+workdir := work
sourcedir := $(workdir)/source
define add-variant
-protodir-base.$1 = $(workdir-base)/proto/$1
-builddir-base.$1 = $(workdir-base)/build/$1
protodir.$1 = $(workdir)/proto/$1
builddir.$1 = $(workdir)/build/$1
diff --git a/rules/git.mk b/rules/git.mk
index 23a96c7..b631f1a 100644
--- a/rules/git.mk
+++ b/rules/git.mk
@@ -24,8 +24,6 @@
# include guard
ifeq (,$(__git_mk))
-protodirs += $(sourcedir)
-
build-depends += developer/versioning/git
download-stamp: check-build-dep-stamp
diff --git a/rules/ips-manifest.mk b/rules/ips-manifest.mk
index d2b2907..3bea4be 100644
--- a/rules/ips-manifest.mk
+++ b/rules/ips-manifest.mk
@@ -49,16 +49,18 @@ pkg-define += \
-D build64="$(build64)" \
# Add $(protodir.<variant>) to use in manifest:
-# file $(protodir.64) path=usr/include/header.64.h
-pkg-define += $(foreach _,$(variants),-D protodir.$(_)="$(protodir-base.$(_))")
+# file $(protodir.64)/usr/include/header.h path=usr/include/header.64.h
+pkg-define += $(foreach _,$(variants),-D protodir.$(_)="$(protodir.$(_))")
# Same for $(builddir.xxx):
-pkg-define += $(foreach _,$(variants),-D builddir.$(_)="$(builddir-base.$(_))")
+pkg-define += $(foreach _,$(variants),-D builddir.$(_)="$(builddir.$(_))")
+
+pkg-define += -D sourcedir="$(sourcedir)"
# Where to find files:
-pkg-protos = $(protodirs:%=-d "%")
+pkg-protos = -d .
+pkg-protos += $(protodirs:%=-d "%")
pkg-protos += $(foreach _,$(variants),-d "$(protodir.$(_))")
-pkg-protos += -d .
transformations := \
$(transdir)/defaults \