summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-23 16:46:24 +0000
committermidipix <writeonce@midipix.org>2024-03-23 22:08:37 +0000
commitaf48d3eca38ff4116eea71b805311ce9ed4cf0ad (patch)
tree4227be2d254022674f1b8ca01233f6b6c9c286fb /src
parentbbc13d492947ef58bf7901e42e1fbed0a5ac1eda (diff)
downloadslibtool-af48d3eca38ff4116eea71b805311ce9ed4cf0ad.tar.bz2
slibtool-af48d3eca38ff4116eea71b805311ce9ed4cf0ad.tar.xz
slibtoolize: driver: added support for --copy, --force, and --install.
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c10
-rw-r--r--src/internal/slibtool_driver_impl.h3
-rw-r--r--src/logic/slbt_exec_stoolie.c12
-rw-r--r--src/skin/slbt_skin_stoolie.c12
4 files changed, 35 insertions, 2 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 956c435..85c75d2 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -23,6 +23,7 @@
#include "slibtool_errinfo_impl.h"
#include "slibtool_lconf_impl.h"
#include "slibtool_txtline_impl.h"
+#include "slibtool_stoolie_impl.h"
#include "slibtool_ar_impl.h"
#include "argv/argv.h"
@@ -416,10 +417,15 @@ int slbt_lib_get_driver_ctx(
const char * cfgmeta_ranlib;
const char * cfgmeta_dlltool;
- if (flags & SLBT_DRIVER_MODE_AR)
+ if (flags & SLBT_DRIVER_MODE_AR) {
argv_optv_init(slbt_ar_options,optv);
- else
+
+ } else if (flags & SLBT_DRIVER_MODE_STOOLIE) {
+ argv_optv_init(slbt_stoolie_options,optv);
+
+ } else {
argv_optv_init(slbt_default_options,optv);
+ }
if (!fdctx)
fdctx = &slbt_default_fdctx;
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 458f74f..b726f32 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -105,6 +105,9 @@ enum app_tags {
/* slibtoolize (stoolie) mode */
TAG_STLE_VERSION,
TAG_STLE_HELP,
+ TAG_STLE_COPY,
+ TAG_STLE_FORCE,
+ TAG_STLE_INSTALL,
};
struct slbt_split_vector {
diff --git a/src/logic/slbt_exec_stoolie.c b/src/logic/slbt_exec_stoolie.c
index 6b2f883..99b1ca1 100644
--- a/src/logic/slbt_exec_stoolie.c
+++ b/src/logic/slbt_exec_stoolie.c
@@ -145,6 +145,18 @@ int slbt_exec_stoolie(const struct slbt_driver_ctx * dctx)
case TAG_STLE_VERSION:
ictx->cctx.drvflags |= SLBT_DRIVER_VERSION;
break;
+
+ case TAG_STLE_COPY:
+ ictx->cctx.drvflags |= SLBT_DRIVER_STOOLIE_COPY;
+ break;
+
+ case TAG_STLE_FORCE:
+ ictx->cctx.drvflags |= SLBT_DRIVER_STOOLIE_FORCE;
+ break;
+
+ case TAG_STLE_INSTALL:
+ ictx->cctx.drvflags |= SLBT_DRIVER_STOOLIE_INSTALL;
+ break;
}
if (entry->fval) {
diff --git a/src/skin/slbt_skin_stoolie.c b/src/skin/slbt_skin_stoolie.c
index c4a10b8..be417e5 100644
--- a/src/skin/slbt_skin_stoolie.c
+++ b/src/skin/slbt_skin_stoolie.c
@@ -9,5 +9,17 @@ const slbt_hidden struct argv_option slbt_stoolie_options[] = {
{"help", 'h',TAG_STLE_HELP,ARGV_OPTARG_NONE,0,0,0,
"display slibtoolize (stoolie) mode help"},
+ {"copy", 'c',TAG_STLE_COPY,ARGV_OPTARG_NONE,0,0,0,
+ "copy build-auxiliary m4 files "
+ "(create symbolic links otherwise."},
+
+ {"force", 'f',TAG_STLE_FORCE,ARGV_OPTARG_NONE,0,0,0,
+ "replace existing build-auxiliary and m4 "
+ "files and/or symbolic links."},
+
+ {"install", 'i',TAG_STLE_INSTALL,ARGV_OPTARG_NONE,0,0,0,
+ "create symbolic links to, or otherwise copy "
+ "missing build-auxiliary and m4 files."},
+
{0,0,0,0,0,0,0,0}
};