diff options
Diffstat (limited to 'CC/foreign/make/RULES')
-rw-r--r-- | CC/foreign/make/RULES | 113 |
1 files changed, 40 insertions, 73 deletions
diff --git a/CC/foreign/make/RULES b/CC/foreign/make/RULES index d04ac9b..79e6b2b 100644 --- a/CC/foreign/make/RULES +++ b/CC/foreign/make/RULES @@ -2,8 +2,10 @@ { "doc": [ "Data produced by Configure and Make build and install." , "" - , "Commands have access to a unique temporary directory via \"$TMPDIR\"" - , "and to the installed \"deps\" via \"$LOCALBASE\"." + , "All variables accessible to commands and options are: \"TMPDIR\"," + , "\"LOCALBASE\", \"CC\", \"CXX\", \"CFLAGS\", \"CXXFLAGS\", \"LDFLAGS\"," + , "\"AR\", and \"PREFIX\". \"LOCALBASE\" contains the path to the" + , "installed artifacts from \"deps\"." ] , "target_fields": ["project"] , "string_fields": @@ -18,17 +20,11 @@ , "post_cmds" , "out_files" , "out_dirs" - , "var_cc" - , "var_cxx" - , "var_ccflags" - , "var_cxxflags" - , "var_ldflags" - , "var_ar" - , "var_prefix" - , "var_destdir" ] , "config_vars": - [ "CC" + [ "ARCH" + , "HOST_ARCH" + , "CC" , "CXX" , "CFLAGS" , "CXXFLAGS" @@ -52,7 +48,10 @@ ] , "configure": ["Run ./configure if non-empty."] , "configure_options": - ["The configure options (the \"--prefix\" option is automatically set."] + [ "The configure options (the \"--prefix\" option is automatically set." + , "Variables can be accessed via \"$(<varname>)\", e.g., \"$(TMPDIR)\"" + , "for variable \"$TMPDIR\"." + ] , "targets": [ "The Make targets to build in the specified order" , "(default: [\"install\"])." @@ -64,8 +63,10 @@ , "taken, with the default value being \"/\"." ] , "options": - [ "Make options for the configuration phase." - , "(e.g., [\"-f\", \"Makefile\", \"ARCH=x86\"])" + [ "Make options for the configuration phase" + , "(e.g., [\"-f\", \"Makefile\", \"ARCH=x86\", \"LD=$(CC)\"]). Variables" + , "can be accessed via \"$(<varname>)\", e.g., \"$(TMPDIR)\" for" + , "variable \"$TMPDIR\"." ] , "jobs": [ "Number of jobs to run simultaneously. If omitted, Make's default" @@ -94,22 +95,6 @@ , "relative to the install directory." , "Note that \"out_files\" and \"out_dirs\" may not overlap." ] - , "var_cc": - ["Variable name used to specify the C compiler (default: \"CC\")."] - , "var_cxx": - ["Variable name used to specify the C++ compiler (default: \"CXX\")."] - , "var_ccflags": - ["Variable name used to specify the C flags (default: \"CFLAGS\")."] - , "var_cxxflags": - ["Variable name used to specify the C++ flags (default: \"CXXFLAGS\")."] - , "var_ldflags": - ["Variable name used to specify the link flags (default: \"LDFLAGS\")."] - , "var_ar": - ["Variable name used to specify the archiver (default: \"AR\")."] - , "var_prefix": - ["Variable name used to specify the prefix (default: \"PREFIX\")."] - , "var_destdir": - ["Variable name used to specify the destdir (default: \"DESTDIR\")."] } , "config_doc": { "CC": @@ -179,6 +164,11 @@ { "stage_field": ["", "stage_singleton_field"] , "make-build": "make-build" , "strip-prefix": ["./", "..", "strip-prefix"] + , "for host": ["transitions", "for host"] + } + , "config_transitions": + { "defaults": + [{"type": "empty_map"}, {"type": "CALL_EXPRESSION", "name": "for host"}] } , "expression": { "type": "let*" @@ -227,14 +217,10 @@ , ["make_jobs", {"type": "FIELD", "name": "jobs"}] , ["pre_cmds", {"type": "FIELD", "name": "pre_cmds"}] , ["post_cmds", {"type": "FIELD", "name": "post_cmds"}] - , ["var_cc", {"type": "FIELD", "name": "var_cc"}] - , ["var_cxx", {"type": "FIELD", "name": "var_cxx"}] - , ["var_ccflags", {"type": "FIELD", "name": "var_ccflags"}] - , ["var_cxxflags", {"type": "FIELD", "name": "var_cxxflags"}] - , ["var_ldflags", {"type": "FIELD", "name": "var_ldflags"}] - , ["var_ar", {"type": "FIELD", "name": "var_ar"}] - , ["var_prefix", {"type": "FIELD", "name": "var_prefix"}] - , ["var_destdir", {"type": "FIELD", "name": "var_destdir"}] + , ["defaults-transition", {"type": "empty_map"}] + , [ "host-defaults-transition" + , {"type": "CALL_EXPRESSION", "name": "for host"} + ] , ["full_install_dir", {"type": "CALL_EXPRESSION", "name": "make-build"}] , [ "install_dir" , { "type": "ACTION" @@ -284,8 +270,10 @@ { "doc": [ "Library produced by Configure and Make build and install." , "" - , "Commands have access to a unique temporary directory via \"$TMPDIR\"" - , "and to the installed \"deps\" via \"$LOCALBASE\"." + , "All variables accessible to commands and options are: \"TMPDIR\"," + , "\"LOCALBASE\", \"CC\", \"CXX\", \"CFLAGS\", \"CXXFLAGS\", \"LDFLAGS\"," + , "\"AR\", and \"PREFIX\". \"LOCALBASE\" contains the path to the" + , "installed artifacts from \"deps\"." ] , "target_fields": ["project", "deps"] , "string_fields": @@ -310,17 +298,11 @@ , "hdr_prefix" , "lib_prefix" , "pc_prefix" - , "var_cc" - , "var_cxx" - , "var_ccflags" - , "var_cxxflags" - , "var_ldflags" - , "var_ar" - , "var_prefix" - , "var_destdir" ] , "config_vars": - [ "CC" + [ "ARCH" + , "HOST_ARCH" + , "CC" , "CXX" , "CFLAGS" , "CXXFLAGS" @@ -434,22 +416,6 @@ , "directory components are joined with \"/\". Defaults to" , "\"lib/pkgconfig\" if not set." ] - , "var_cc": - ["Variable name used to specify the C compiler (default: \"CC\")."] - , "var_cxx": - ["Variable name used to specify the C++ compiler (default: \"CXX\")."] - , "var_ccflags": - ["Variable name used to specify the C flags (default: \"CFLAGS\")."] - , "var_cxxflags": - ["Variable name used to specify the C++ flags (default: \"CXXFLAGS\")."] - , "var_ldflags": - ["Variable name used to specify the link flags (default: \"LDFLAGS\")."] - , "var_ar": - ["Variable name used to specify the archiver (default: \"AR\")."] - , "var_prefix": - ["Variable name used to specify the prefix (default: \"PREFIX\")."] - , "var_destdir": - ["Variable name used to specify the destdir (default: \"DESTDIR\")."] } , "config_doc": { "CC": @@ -517,6 +483,11 @@ , "strip-prefix": ["./", "..", "strip-prefix"] , "prebuilt result": ["CC/prebuilt", "prebuilt result"] , "install-deps": ["CC", "install-with-deps stage"] + , "for host": ["transitions", "for host"] + } + , "config_transitions": + { "defaults": + [{"type": "empty_map"}, {"type": "CALL_EXPRESSION", "name": "for host"}] } , "expression": { "type": "let*" @@ -654,14 +625,10 @@ , ["make_jobs", {"type": "FIELD", "name": "jobs"}] , ["pre_cmds", {"type": "FIELD", "name": "pre_cmds"}] , ["post_cmds", {"type": "FIELD", "name": "post_cmds"}] - , ["var_cc", {"type": "FIELD", "name": "var_cc"}] - , ["var_cxx", {"type": "FIELD", "name": "var_cxx"}] - , ["var_ccflags", {"type": "FIELD", "name": "var_ccflags"}] - , ["var_cxxflags", {"type": "FIELD", "name": "var_cxxflags"}] - , ["var_ldflags", {"type": "FIELD", "name": "var_ldflags"}] - , ["var_ar", {"type": "FIELD", "name": "var_ar"}] - , ["var_prefix", {"type": "FIELD", "name": "var_prefix"}] - , ["var_destdir", {"type": "FIELD", "name": "var_destdir"}] + , ["defaults-transition", {"type": "empty_map"}] + , [ "host-defaults-transition" + , {"type": "CALL_EXPRESSION", "name": "for host"} + ] , ["full_install_dir", {"type": "CALL_EXPRESSION", "name": "make-build"}] , [ "install_dir" , { "type": "ACTION" |