diff options
-rw-r--r-- | CC/foreign/make/EXPRESSIONS | 32 | ||||
-rw-r--r-- | CC/foreign/make/RULES | 14 |
2 files changed, 35 insertions, 11 deletions
diff --git a/CC/foreign/make/EXPRESSIONS b/CC/foreign/make/EXPRESSIONS index abe072d..be468e7 100644 --- a/CC/foreign/make/EXPRESSIONS +++ b/CC/foreign/make/EXPRESSIONS @@ -2,6 +2,7 @@ { "vars": [ "source_dir" , "subdir" + , "make_targets" , "make_prefix" , "make_options" , "make_jobs" @@ -209,6 +210,13 @@ , "$1": {"type": "var", "name": "subdir", "default": []} } ] + , [ "make_targets" + , { "type": "if" + , "cond": {"type": "var", "name": "make_targets"} + , "then": {"type": "var", "name": "make_targets"} + , "else": ["install"] + } + ] , [ "script" , { "type": "singleton_map" , "key": "run_make.sh" @@ -239,9 +247,21 @@ , "readonly VAR_DESTDIR=$2" , "shift 2" ] - , [ "make \"$@\" -C \"source/${SUBDIR}\" ${VAR_DESTDIR}=$(pwd)/install >build.log || (cat build.log && exit 1)" - , "find ./install -type l -delete" - ] + , { "type": "foreach" + , "range": {"type": "var", "name": "make_targets"} + , "var": "target" + , "body": + { "type": "join" + , "$1": + [ "make \"$@\" -C \"source/${SUBDIR}\" ${VAR_DESTDIR}=$(pwd)/install " + , { "type": "join_cmd" + , "$1": [{"type": "var", "name": "target"}] + } + , " >>build.log || (cat build.log && exit 1)" + ] + } + } + , ["find ./install -type l -delete"] , { "type": "if" , "cond": {"type": "var", "name": "post_cmds"} , "then": @@ -282,12 +302,6 @@ , "else": ["DESTDIR"] } , {"type": "var", "name": "make_options"} - , { "type": "if" - , "cond": {"type": "var", "name": "make_target"} - , "then": - [{"type": "join", "$1": {"type": "var", "name": "make_target"}}] - , "else": ["install"] - } , [ { "type": "join" , "$1": { "type": "++" diff --git a/CC/foreign/make/RULES b/CC/foreign/make/RULES index 7ae684f..b982946 100644 --- a/CC/foreign/make/RULES +++ b/CC/foreign/make/RULES @@ -3,6 +3,7 @@ , "target_fields": ["project"] , "string_fields": [ "subdir" + , "targets" , "prefix" , "options" , "jobs" @@ -41,6 +42,10 @@ [ "The subdirectory that contains the configure and Makefile. Individual" , "directory components are joined with \"/\"." ] + , "targets": + [ "The Make targets to build in the specified order" + , "(default: [\"install\"])." + ] , "prefix": [ "The prefix used for the Make target. The path will be made absolute" , "and individual directory components are joined with \"/\". If no" @@ -199,6 +204,7 @@ } ] , ["subdir", {"type": "FIELD", "name": "subdir"}] + , ["make_targets", {"type": "FIELD", "name": "targets"}] , ["make_prefix", {"type": "FIELD", "name": "prefix"}] , ["make_options", {"type": "FIELD", "name": "options"}] , ["make_jobs", {"type": "FIELD", "name": "jobs"}] @@ -265,7 +271,7 @@ , "name" , "version" , "stage" - , "target" + , "targets" , "prefix" , "options" , "jobs" @@ -322,7 +328,10 @@ [ "The library version, used for pkg-config files. Individual version" , "components are joined with \".\"." ] - , "target": ["The Make target to build (default: [\"install\"])."] + , "targets": + [ "The Make targets to build in the specified order" + , "(default: [\"install\"])." + ] , "prefix": [ "The prefix used for the Make target. The path will be made absolute" , "and individual directory components are joined with \"/\". If no" @@ -590,6 +599,7 @@ } ] , ["subdir", {"type": "FIELD", "name": "subdir"}] + , ["make_targets", {"type": "FIELD", "name": "targets"}] , ["make_prefix", {"type": "FIELD", "name": "prefix"}] , ["make_options", {"type": "FIELD", "name": "options"}] , ["make_jobs", {"type": "FIELD", "name": "jobs"}] |