|author||Thomas Orgis||2020-09-08 01:14:56 +0200|
|committer||Thomas Orgis||2020-09-08 01:28:17 +0200|
libtool-nola, la_remove_up_trigger.function: infrastructure for dropping .la
As long as we do not have central filters for libtool archives, spells that have non-trivial lists of those files need some help: - libtool-nola: Inject that into the libtool calls of the build (sed Makefiles) to have it call the real libtool, but remove the .la files afterwards. - la_remove_up_trigger.function: Use that in UP_TRIGGERS to safely re-cast spells that reference the removed .la files in theirs.
Diffstat (limited to 'libtool-nola')
1 files changed, 50 insertions, 0 deletions
diff --git a/libtool-nola b/libtool-nola
new file mode 100755
@@ -0,0 +1,50 @@
+# This wraps over the actual libtool script (given as first argument)
+# and tries to remove any .la files that libtool script creates.
+# The expected call is
+# libtool [options] --mode=install [options] <library files> <directory>
+# The script runs libtool with /bin/sh (assuming it's compatible to whatever
+# we have there) and then tries to clean up after it.
+# Run the full libtool command.
+# Assumption: file list comes after --mode=install.
+# Let's ingore anything before that.
+for arg in "$@"
+ case "$arg" in
+ if $installing; then
+if $installing; then
+ for dir in "$@"; do :; done;
+ echo "$(basename $0): Cleaning up after libtool: no .la files, please."
+ for f in "$@"
+ case "$f" in
+ rm -vf "$dir/$(basename "$f")"