Next: , Previous: , Up: GNU Gnulib   [Contents][Index]


20 Build Infrastructure Files

Gnulib contains also a small number of files that are not part of modules. They are meant to be imported into packages by means of ‘gnulib-tool --copy-file’, not ‘gnulib-tool --import’. For example, the commands to import the files config.guess and config.sub are

for file in config.guess config.sub; do
  $GNULIB_TOOL --copy-file build-aux/$file \
    && chmod a+x build-aux/$file \
    || exit $?
done

Packages that don’t use Gnulib can get hold of these files through direct download from Gnulib’s git repository. The commands to do this look as follows:

for file in config.guess config.sub; do
  echo "$0: getting $file..."
  wget -q --timeout=5 -O build-aux/$file.tmp "https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/${file};hb=HEAD" \
    && mv build-aux/$file.tmp build-aux/$file \
    && chmod a+x build-aux/$file
  retval=$?
  rm -f build-aux/$file.tmp
  test $retval -eq 0 || exit $retval
done