How to compile bash?

左心房为你撑大大i 提交于 2021-02-18 16:58:09

问题


How to compile bash? I did small modifications to the code I got from http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz. I want to see those changes. Can anyone please point to me simple steps to compile bash?


回答1:


You can first run

cd bash-4.2

./configure --prefix=/usr                     \
        --bindir=/bin                     \
        --htmldir=/usr/share/doc/bash-4.2 \
        --without-bash-malloc             \
        --with-installed-readline

make

make install

Also refer http://www.linuxfromscratch.org/lfs/view/development/chapter06/bash.html for more information




回答2:


The simplest way to compile Bash is:

cd to the directory containing the source code and type ./configure' to configure Bash for your system. If you're using csh on an old version of System V, you might need to type sh ./configure' instead to prevent csh from trying to execute configure itself. Running configure takes some time. While running, it prints messages telling which features it is checking for.

like

/bash-4.2$ ./configure

Type `make' to compile Bash and build the bashbug bug reporting script.

 /bash-4.2$ make

Optionally, type `make tests' to run the Bash test suite.

/bash-4.2$ make tests

Type `make install' to install bash and bashbug. This will also install the manual pages and Info file.

/bash-4.2$ make install

The configure shell script attempts to guess correct values for various system-dependent variables used during compilation.



来源:https://stackoverflow.com/questions/21644870/how-to-compile-bash

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!