diff options
-rw-r--r-- | CC/foreign/cmake/EXPRESSIONS | 3 | ||||
-rw-r--r-- | CC/foreign/cmake/RULES | 35 | ||||
-rw-r--r-- | CC/foreign/make/EXPRESSIONS | 1 | ||||
-rw-r--r-- | CC/foreign/make/RULES | 34 |
4 files changed, 48 insertions, 25 deletions
diff --git a/CC/foreign/cmake/EXPRESSIONS b/CC/foreign/cmake/EXPRESSIONS index 425c7a2..ae05337 100644 --- a/CC/foreign/cmake/EXPRESSIONS +++ b/CC/foreign/cmake/EXPRESSIONS @@ -166,6 +166,7 @@ [ [ "set -eu" , "mkdir scratch" , "readonly TMPDIR=\"$(pwd)/scratch\"" + , "readonly LOCALBASE=\"$(pwd)/localbase\"" ] , { "type": "if" , "cond": {"type": "var", "name": "pre_cmds"} @@ -181,7 +182,7 @@ , [ "readonly CMAKE_SUBDIR=\"$1\"" , "readonly CMAKE_AR=$(which $2)" , "shift 2" - , "cmake \"$@\" -S\"source/${CMAKE_SUBDIR}\" -Bbuild -DCMAKE_AR=${CMAKE_AR} -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_PREFIX_PATH=\"$(pwd)/localbase\" -DPKG_CONFIG_ARGN=--define-prefix --no-warn-unused-cli >configure.log 2>&1 || (cat configure.log && exit 1)" + , "cmake \"$@\" -S\"source/${CMAKE_SUBDIR}\" -Bbuild -DCMAKE_AR=${CMAKE_AR} -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_PREFIX_PATH=\"$LOCALBASE\" -DPKG_CONFIG_ARGN=--define-prefix --no-warn-unused-cli >configure.log 2>&1 || (cat configure.log && exit 1)" ] , [ { "type": "join" , "separator": " " diff --git a/CC/foreign/cmake/RULES b/CC/foreign/cmake/RULES index e4d16e0..170026f 100644 --- a/CC/foreign/cmake/RULES +++ b/CC/foreign/cmake/RULES @@ -1,5 +1,10 @@ { "data": - { "doc": ["Data produced by CMake configure, build, and install."] + { "doc": + [ "Data produced by CMake configure, build, and install." + , "" + , "Commands have access to a unique temporary directory via \"$TMPDIR\"" + , "and to the installed \"deps\" via \"$LOCALBASE\"." + ] , "target_fields": ["project"] , "string_fields": [ "subdir" @@ -48,16 +53,17 @@ , "pre_cmds": [ "List of commands executed in the project directory before calling" , "CMake. Useful for renaming files or directories. Note that data" - , "between \"pre_cmds\" and \"post_cmds\" can be exchanged via $TMPDIR," - , "which is uniquely reserved for this action." + , "between \"pre_cmds\" and \"post_cmds\" can be exchanged via" + , "\"$TMPDIR\" which is uniquely reserved for this action." ] , "post_cmds": [ "List of commands executed in the install directory after successful" , "installation but before the output files are collected. Useful for" , "renaming files or directories. Note that data between \"pre_cmds\" and" - , "\"post_cmds\" can be exchanged via $TMPDIR, which is uniquely reserved" - , "for this action. The CMake source and build directory can be accessed" - , "via $CMAKE_SOURCE_DIR and $CMAKE_BINARY_DIR, respectively." + , "\"post_cmds\" can be exchanged via \"$TMPDIR\", which is uniquely" + , "reserved for this action. The CMake source and build directory can be" + , "accessed via \"$CMAKE_SOURCE_DIR\" and \"$CMAKE_BINARY_DIR\"," + , "respectively." ] , "out_files": [ "Paths to the produced output files. The paths are considered relative" @@ -226,7 +232,12 @@ } } , "library": - { "doc": ["Library produced by CMake configure, build, and install."] + { "doc": + [ "Library produced by CMake configure, build, and install." + , "" + , "Commands have access to a unique temporary directory via \"$TMPDIR\"" + , "and to the installed \"deps\" via \"$LOCALBASE\"." + ] , "target_fields": ["project", "deps"] , "string_fields": [ "subdir" @@ -296,17 +307,17 @@ , "pre_cmds": [ "List of commands executed in the project directory before calling" , "CMake. Useful for renaming files or directories. Note that data" - , "between \"pre_cmds\" and \"post_cmds\" can be exchanged via $TMPDIR," - , "which is uniquely reserved for this action." + , "between \"pre_cmds\" and \"post_cmds\" can be exchanged via" + , "\"$TMPDIR\" which is uniquely reserved for this action." ] , "post_cmds": [ "List of commands executed in the install directory after successful" , "installation but before the output files are collected. Useful for" , "renaming files or directories (e.g., in case of SONAME mismatch). Note" , "that data between \"pre_cmds\" and \"post_cmds\" can be exchanged via" - , "$TMPDIR, which is uniquely reserved for this action. The CMake source" - , "and build directory can be accessed via $CMAKE_SOURCE_DIR and" - , "$CMAKE_BINARY_DIR, respectively." + , "\"$TMPDIR\", which is uniquely reserved for this action. The CMake" + , "source and build directory can be accessed via \"$CMAKE_SOURCE_DIR\"" + , "and \"$CMAKE_BINARY_DIR\", respectively." ] , "out_hdrs": [ "Paths to produced public header files. The path is considered" diff --git a/CC/foreign/make/EXPRESSIONS b/CC/foreign/make/EXPRESSIONS index e4db90c..373520b 100644 --- a/CC/foreign/make/EXPRESSIONS +++ b/CC/foreign/make/EXPRESSIONS @@ -253,6 +253,7 @@ [ [ "set -eu" , "mkdir scratch" , "readonly TMPDIR=\"$(pwd)/scratch\"" + , "readonly LOCALBASE=\"$(pwd)/localbase\"" ] , { "type": "if" , "cond": {"type": "var", "name": "pre_cmds"} diff --git a/CC/foreign/make/RULES b/CC/foreign/make/RULES index 2ea74b2..d04ac9b 100644 --- a/CC/foreign/make/RULES +++ b/CC/foreign/make/RULES @@ -1,5 +1,10 @@ { "data": - { "doc": ["Data produced by Configure and Make build and install."] + { "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\"." + ] , "target_fields": ["project"] , "string_fields": [ "subdir" @@ -68,16 +73,16 @@ ] , "pre_cmds": [ "List of commands executed in the project directory before calling" - , "Make. Useful for renaming files or directories. Note that data" - , "between \"pre_cmds\" and \"post_cmds\" can be exchanged via $TMPDIR," - , "which is uniquely reserved for this action." + , "Configure or Make. Useful for renaming files or directories. Note" + , "that data between \"pre_cmds\" and \"post_cmds\" can be exchanged via" + , "\"$TMPDIR\", which is uniquely reserved for this action." ] , "post_cmds": [ "List of commands executed in the install directory after successful" , "installation but before the output files are collected. Useful for" , "renaming files or directories. Note that data between \"pre_cmds\" and" - , "\"post_cmds\" can be exchanged via $TMPDIR, which is uniquely reserved" - , "for this action." + , "\"post_cmds\" can be exchanged via \"$TMPDIR\", which is uniquely" + , "reserved for this action." ] , "out_files": [ "Paths to the produced output files. The paths are considered relative" @@ -276,7 +281,12 @@ } } , "library": - { "doc": ["Library produced by Configure and Make build and install."] + { "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\"." + ] , "target_fields": ["project", "deps"] , "string_fields": [ "subdir" @@ -357,7 +367,7 @@ , "taken, with the default value being \"/\"." ] , "options": - [ "Make options for the configuration phase." + [ "Make options for the build phase." , "(e.g., [\"-f\", \"Makefile\", \"ARCH=x86\"])" ] , "jobs": @@ -366,16 +376,16 @@ ] , "pre_cmds": [ "List of commands executed in the project directory before calling" - , "Make. Useful for renaming files or directories. Note that data" - , "between \"pre_cmds\" and \"post_cmds\" can be exchanged via $TMPDIR," - , "which is uniquely reserved for this action." + , "Configure or Make. Useful for renaming files or directories. Note" + , "that data between \"pre_cmds\" and \"post_cmds\" can be exchanged via" + , "\"$TMPDIR\", which is uniquely reserved for this action." ] , "post_cmds": [ "List of commands executed in the install directory after successful" , "installation but before the output files are collected. Useful for" , "renaming files or directories (e.g., in case of SONAME mismatch). Note" , "that data between \"pre_cmds\" and \"post_cmds\" can be exchanged via" - , "$TMPDIR, which is uniquely reserved for this action." + , "\"$TMPDIR\", which is uniquely reserved for this action." ] , "out_hdrs": [ "Paths to produced public header files. The path is considered" |