Install only a few GNU coreutils

compilingcoreutilsgnu

Is there a way to build and install only a few of the GNU coreutils?

The README in coreutils-8.19.tar.xz lists 100-odd, but the INSTALL doesn't say how to install only a few, and the Makefile is (to me) opaque.

Best Answer

  ./configure
  cd ./lib
  make
  cd ../src
  make version.h
  make cat
  make ls

HTH

===

UPDATE as of February 26, 2015:

The recipe above doesn't work in at least coreutils-8.23. I would not recommended building separate files.

The following shows the complexity of internal dependencies for cat and ls:

./configure
make src/version.h
make lib/configmake.h
make lib/arg-nonnull.h
make lib/warn-on-use.h
make lib/fcntl.h
make lib/sys/stat.h
make lib/selinux/context.h
make lib/selinux/selinux.h
make lib/unitypes.h
make lib/unistr.h
make lib/uniwidth.h
make lib/getopt.h
make src/cat
make src/ls
Related Question