0

In jemalloc, autogen.sh has following code snippet:

for i in autoconf; do
    echo "$i"
    $i
    if [ $? -ne 0 ]; then
        echo "Error $? in $i"
        exit 1
    fi
done

I dont know why not directly write as:

echo "autoconf"
autoconf
if [ $? -ne 0 ]; then
    echo "Error $? in autoconf"
    exit 1
fi

I think the two code snippets are the same. And the second abviously cleared. I cannot understand why the first. Does it have any other meanings? Thanks~

persuez
  • 110
  • 6

1 Answers1

0

My guess would be that this makes it easier to add an additional name to try instead of autoreconf, and then just tries one after the other until one has succeeded.

ndim
  • 35,870
  • 12
  • 47
  • 57