aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-06 18:12:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-06 18:12:42 +0200
commit92c0ea2540562213770f4f36eb9c4e0009eaf95c (patch)
tree8204568cefedca02b3b39164e62df7faaa0ea823
parentd3e3fa46e880fd74ee7da195efda91ff710f7d92 (diff)
Add support for relative paths
-rw-r--r--build/meta/autoconf-functions.make6
-rw-r--r--build/meta/automake-functions.make6
-rw-r--r--build/meta/vc10proj-functions.make13
-rw-r--r--build/meta/vc9proj-functions.make13
4 files changed, 24 insertions, 14 deletions
diff --git a/build/meta/autoconf-functions.make b/build/meta/autoconf-functions.make
index 1f64f8d..c1c9b2f 100644
--- a/build/meta/autoconf-functions.make
+++ b/build/meta/autoconf-functions.make
@@ -8,10 +8,12 @@
#
# Arguments:
#
-# $1 - optional template, default is $(src_base)/configure.ac
+# $1 - optional template path, if doesn't start with /, assume relative
+# to src_base default is $(src_base)/configure.ac
#
$(out_base)/%: meta-autoconf = \
-$(call meta-autoconf-body,$(if $1,$1,$(src_base)/configure.ac),$(subst \
+$(call meta-autoconf-body,$(if $1,$(if $(filter \
+/%,$1),$1,$(src_base)/$1),$(src_base)/configure.ac),$(subst \
$(src_root),,$(src_base)))
# $1 - template
diff --git a/build/meta/automake-functions.make b/build/meta/automake-functions.make
index 114779f..84627e0 100644
--- a/build/meta/automake-functions.make
+++ b/build/meta/automake-functions.make
@@ -8,10 +8,12 @@
#
# Arguments:
#
-# $1 - optional template, default is $(src_base)/Makefile.am
+# $1 - optional template path, if doesn't start with /, assume relative
+# to src_base default is $(src_base)/Makefile.am
#
$(out_base)/%: meta-automake = \
-$(call meta-automake-body,$(if $1,$1,$(src_base)/Makefile.am),$(subst \
+$(call meta-automake-body,$(if $1,$(if $(filter \
+/%,$1),$1,$(src_base)/$1),$(src_base)/Makefile.am),$(subst \
$(src_root),,$(src_base)))
# $1 - template
diff --git a/build/meta/vc10proj-functions.make b/build/meta/vc10proj-functions.make
index ff9265b..5781de8 100644
--- a/build/meta/vc10proj-functions.make
+++ b/build/meta/vc10proj-functions.make
@@ -8,14 +8,17 @@
#
# Arguments:
#
-# $1 - template path
+# $1 - template path, if doesn't start with /, assume relative to src_base
+# $2 - output name (optional)
#
$(out_base)/%: meta-vc10proj = \
-$(call meta-vc10proj-body,$1,$(subst $(src_root),,$(src_base)))
+$(call meta-vc10proj-body,$(if $(filter /%,$1),$1,$(src_base)/$1),$(if \
+$2,$2,$(notdir $1)),$(subst $(src_root),,$(src_base)))
# $1 - template
-# $2 - difference between src_base and src_root with leading '\'
+# $2 - output name
+# $3 - difference between src_base and src_root with leading '\'
#
$(out_base)/%: meta-vc10proj-body = \
-$(call message,meta $(dist_prefix)$2/$(notdir $1),$(bld_root)/meta/vc10proj \
--o $(dist_prefix)$2/$(notdir $1) $1)
+$(call message,meta $(dist_prefix)$3/$2,$(bld_root)/meta/vc10proj \
+-o $(dist_prefix)$3/$2 $1)
diff --git a/build/meta/vc9proj-functions.make b/build/meta/vc9proj-functions.make
index 8329230..5b6905a 100644
--- a/build/meta/vc9proj-functions.make
+++ b/build/meta/vc9proj-functions.make
@@ -8,14 +8,17 @@
#
# Arguments:
#
-# $1 - template path
+# $1 - template path, if doesn't start with /, assume relative to src_base
+# $2 - output name (optional)
#
$(out_base)/%: meta-vc9proj = \
-$(call meta-vc9proj-body,$1,$(subst $(src_root),,$(src_base)))
+$(call meta-vc9proj-body,$(if $(filter /%,$1),$1,$(src_base)/$1),$(if \
+$2,$2,$(notdir $1)),$(subst $(src_root),,$(src_base)))
# $1 - template
-# $2 - difference between src_base and src_root with leading '\'
+# $2 - output name
+# $3 - difference between src_base and src_root with leading '\'
#
$(out_base)/%: meta-vc9proj-body = \
-$(call message,meta $(dist_prefix)$2/$(notdir $1),$(bld_root)/meta/vc9proj \
--o $(dist_prefix)$2/$(notdir $1) $1)
+$(call message,meta $(dist_prefix)$3/$2,$(bld_root)/meta/vc9proj \
+-o $(dist_prefix)$3/$2 $1)