summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Luiz Tiago Soares <andre.soares@altxtech.net>2025-07-23 08:23:38 -0300
committerGitHub <noreply@github.com>2025-07-23 11:23:38 +0000
commit85221800ca1f5237c87fc151f5cb839c9a2a41c8 (patch)
tree4ec0369f9c474b900c71698356d179f57b97aa11
parent7e64a68252d03412f1ac6c8b70d7139c377941a3 (diff)
Add comments to autogen script
-rwxr-xr-xautogen.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/autogen.sh b/autogen.sh
index f8cdf3c0c1..f11a471a08 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,17 +1,22 @@
#!/bin/sh
+# Clear PWD to force commands to recompute working directory
PWD=
+
+# Figure out the source directory for this script
+# configure.ac should be in the same place
case "$0" in
-*/*) srcdir=`dirname $0`;;
-*) srcdir="";;
+ */* ) srcdir=`dirname "$0"` ;; # Called with path
+ * ) srcdir="";; # Otherwise
esac
-symlink='--install --symlink'
+# If install-only is explicitly requested, disbale symlink flags
case " $* " in
- *" -i "*|*" --install "*)
- # reset to copy missing standard auxiliary files, instead of symlinks
- symlink=
- ;;
+ *" -i "* | *" --install"* ) symlink_flags="" ;;
+ * ) symlink_flags="--install --symlink" ;;
esac
-exec ${AUTORECONF:-autoreconf} ${symlink} "$@" ${srcdir:+"$srcdir"}
+exec ${AUTORECONF:-autoreconf} \
+ $symlink_flags \
+ "$@" \
+ $srcdir