From 92c0ea2540562213770f4f36eb9c4e0009eaf95c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Sep 2010 18:12:42 +0200 Subject: Add support for relative paths --- build/meta/autoconf-functions.make | 6 ++++-- build/meta/automake-functions.make | 6 ++++-- build/meta/vc10proj-functions.make | 13 ++++++++----- build/meta/vc9proj-functions.make | 13 ++++++++----- 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) -- cgit v1.1