summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-08-13 18:10:27 +0000
committermidipix <writeonce@midipix.org>2018-08-13 19:26:25 -0400
commit2942830e75435066596bd9e612cac8102b5331f4 (patch)
tree49db7ca81f008a69abe8ec2e383637aa9ec8a5a8
parent499a718d986776354bbd4e7787ea1c30c851e384 (diff)
downloadslibtool-2942830e75435066596bd9e612cac8102b5331f4.tar.bz2
slibtool-2942830e75435066596bd9e612cac8102b5331f4.tar.xz
utility: --heuristics support: added the 'rlibtool' convenience symlink.
-rw-r--r--project/extras.mk7
-rw-r--r--src/driver/slbt_amain.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/project/extras.mk b/project/extras.mk
index 9b69c28..b69dfbc 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -12,6 +12,7 @@ src/driver/slbt_driver_ctx.lo: CFLAGS += $(CFLAGS_MACHINE)
install-app-extras: DBGNAME = dlibtool
install-app-extras: LEGABITS = clibtool
+install-app-extras: RAPUNZEL = rlibtool
install-app-extras:
mkdir -p $(DESTDIR)$(BINDIR)
@@ -27,6 +28,8 @@ install-app-extras:
rm -f bin/$(LEGABITS)-shared$(OS_APP_SUFFIX).tmp
rm -f bin/$(LEGABITS)-static$(OS_APP_SUFFIX).tmp
+ rm -f bin/$(RAPUNZEL)$(OS_APP_SUFFIX).tmp
+
ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(NICKNAME)-shared$(OS_APP_SUFFIX).tmp
ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(NICKNAME)-static$(OS_APP_SUFFIX).tmp
@@ -38,6 +41,8 @@ install-app-extras:
ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(LEGABITS)-shared$(OS_APP_SUFFIX).tmp
ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(LEGABITS)-static$(OS_APP_SUFFIX).tmp
+ ln -s ./$(NICKNAME)$(OS_APP_SUFFIX) bin/$(RAPUNZEL)$(OS_APP_SUFFIX).tmp
+
mv bin/$(NICKNAME)-shared$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(NICKNAME)-shared$(OS_APP_SUFFIX)
mv bin/$(NICKNAME)-static$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(NICKNAME)-static$(OS_APP_SUFFIX)
@@ -48,3 +53,5 @@ install-app-extras:
mv bin/$(LEGABITS)$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(LEGABITS)$(OS_APP_SUFFIX)
mv bin/$(LEGABITS)-shared$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(LEGABITS)-shared$(OS_APP_SUFFIX)
mv bin/$(LEGABITS)-static$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(LEGABITS)-static$(OS_APP_SUFFIX)
+
+ mv bin/$(RAPUNZEL)$(OS_APP_SUFFIX).tmp $(DESTDIR)$(BINDIR)/$(RAPUNZEL)$(OS_APP_SUFFIX)
diff --git a/src/driver/slbt_amain.c b/src/driver/slbt_amain.c
index e0d6bb9..c060021 100644
--- a/src/driver/slbt_amain.c
+++ b/src/driver/slbt_amain.c
@@ -154,6 +154,10 @@ int slbt_main(char ** argv, char ** envp, const struct slbt_fd_ctx * fdctx)
if ((program[8] == '-') || (program[8] == '.'))
flags |= SLBT_DRIVER_LEGABITS;
+ /* heuristics */
+ if (!(strcmp(program,"rlibtool")))
+ flags |= SLBT_DRIVER_HEURISTICS;
+
/* driver context */
if ((ret = slbt_get_driver_ctx(argv,envp,flags,fdctx,&dctx)))
return (ret == SLBT_USAGE)