summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-05-05 19:43:06 +0000
committermidipix <writeonce@midipix.org>2021-05-05 19:57:26 +0000
commit04b5c8008287b8d390556dda9a4006bca9d0822d (patch)
treef5e810cac1821235a150ba505543cab5815c7960 /src
parent5a20d9f7dfbefe2ed568a60c3c1653473226b4ad (diff)
downloadslibtool-04b5c8008287b8d390556dda9a4006bca9d0822d.tar.bz2
slibtool-04b5c8008287b8d390556dda9a4006bca9d0822d.tar.xz
install mode: driver: added (referential) --sysroot support.
Diffstat (limited to 'src')
-rw-r--r--src/internal/slibtool_install_impl.h1
-rw-r--r--src/logic/slbt_exec_install.c9
-rw-r--r--src/skin/slbt_skin_install.c3
3 files changed, 12 insertions, 1 deletions
diff --git a/src/internal/slibtool_install_impl.h b/src/internal/slibtool_install_impl.h
index 86c7cfc..7c8e234 100644
--- a/src/internal/slibtool_install_impl.h
+++ b/src/internal/slibtool_install_impl.h
@@ -17,6 +17,7 @@ enum install_tags {
TAG_INSTALL_GROUP,
TAG_INSTALL_MODE,
TAG_INSTALL_DSTDIR,
+ TAG_INSTALL_SYSROOT,
};
#endif
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index 5e5d440..b86e979 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -709,6 +709,9 @@ int slbt_exec_install(
for (entry=meta->entries; entry->fopt || entry->arg; entry++) {
if (entry->fopt) {
switch (entry->tag) {
+ case TAG_INSTALL_SYSROOT:
+ break;
+
case TAG_INSTALL_COPY:
*argv++ = "-c";
copy = entry;
@@ -754,8 +757,12 @@ int slbt_exec_install(
break;
}
- if (entry->fval)
+ if (entry->tag == TAG_INSTALL_SYSROOT) {
+ (void)0;
+
+ } else if (entry->fval) {
*argv++ = (char *)entry->arg;
+ }
} else
last = entry;
}
diff --git a/src/skin/slbt_skin_install.c b/src/skin/slbt_skin_install.c
index f0d92a2..e8feb59 100644
--- a/src/skin/slbt_skin_install.c
+++ b/src/skin/slbt_skin_install.c
@@ -5,6 +5,9 @@ const struct argv_option slbt_install_options[] = {
{"help", 'h',TAG_INSTALL_HELP,ARGV_OPTARG_NONE,0,0,0,
"display install mode help"},
+ {"sysroot", 0,TAG_INSTALL_SYSROOT,ARGV_OPTARG_REQUIRED,0,0,"<sysroot>",
+ "reference only: the target's sysroot directory"},
+
{0, 'c',TAG_INSTALL_COPY,ARGV_OPTARG_NONE,0,0,0,
"copy"},