From 0f655414711a6d873d31bf0fb7e7af7cb52f9ede Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 20 Jan 2001 12:01:56 +0000 Subject: [PATCH] Add new option to disable reading standard libraries. --- mkaclocal.in | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/mkaclocal.in b/mkaclocal.in index 24c4983..8a56ac4 100755 --- a/mkaclocal.in +++ b/mkaclocal.in @@ -42,6 +42,7 @@ datadir=@datadir@/@PACKAGE@ mode=x out="aclocal.m4" in="configure.in" +stdlib=true while [ $# -gt 0 ]; do case $1 in @@ -69,6 +70,7 @@ Options: -v, --version Print the program's version number. -l, --list List chunks defined in text libraries. -x, --extract Extract chunks from text libraries (default). +-n, --no-stdlib Don't read from the standard libraries. -c, --config=CONFIG Read CONFIG, not \`configure.in', to decide which macros need extracting. -o, --output=OUTPUT Extract chunks to OUTPUT, not \`aclocal.m4'. @@ -101,6 +103,10 @@ EOF --o=* | --ou=* | --out=* | --outp=* | --outpu=* | --output=*) out=`echo $1 | sed -e 's/^--[a-z]*=//'` ;; + -n | --no-s* | --no-st* | --no-std* | --no-stdl* | \ + --no-stdli* | --no-stdlib) + stdlib=false + ;; -l | --l | --li | --lis | --list) mode=l ;; @@ -125,11 +131,17 @@ EOF shift done -set \ - "$datadir/aclocal.glob" \ - `test -r $datadir/aclocal.site && echo "$datadir/aclocal.site"` \ - `test -r ./aclocal.lib && echo "./aclocal.lib"` \ - "$@" +if $stdlib; then + set \ + "$datadir/aclocal.glob" \ + `test -r $datadir/aclocal.site && echo "$datadir/aclocal.site"` \ + `test -r ./aclocal.lib && echo "./aclocal.lib"` \ + "$@" +else + set \ + `test -r ./aclocal.lib && echo "./aclocal.lib"` \ + "$@" +fi # --- Now do the job --- @@ -140,10 +152,10 @@ case $mode in ;; x) - t=/tmp/mkaclocal.$$ - if mkdir -m 700 $t; then : + t=${TMPDIR-/tmp}/mkaclocal.$$ + if mkdir -m700 $t; then : else - echo >&2 "mkaclocal: cculd not creat etemporary directory" + echo >&2 "mkaclocal: cculd not create temporary directory" exit 1 fi echo -NOTICE- >$t/a -- 2.11.0