Skip to content

Commit

Permalink
Move the configure.sh script to the more expected configure
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Howard committed Jan 8, 2019
1 parent 33b6b45 commit 8302ea8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For the default build with optimization, use the following commands in the root
directory:

```
./configure.sh -O3
./configure -O3
make
```

Expand All @@ -41,7 +41,7 @@ make
For debug builds, use the following commands in the root directory:

```
./configure.sh -g
./configure -g
make
```

Expand Down Expand Up @@ -105,7 +105,7 @@ This `bc` uses [semantic versioning](http://semver.org/).
Files:

.clang-format Clang-format file, used only for cutting a release for busybox.
configure.sh The custom configure script.
configure The custom (non-autotools-generated) configure script.
install.sh Install script.
karatsuba.py Script for package maintainers to find the optimal Karatsuba number.
LICENSE.md A Markdown form of the BSD 0-clause License.
Expand Down
File renamed without changes.
35 changes: 18 additions & 17 deletions manuals/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
This `bc` attempts to be as portable as possible. It can be built on any
POSIX-compliant system.

To accomplish that, a POSIX-compatible `configure.sh` script is used to select
build options, compiler, and compiler flags and generate a `Makefile`.
To accomplish that, a POSIX-compatible, custom `configure`
(non-autotools-generated) script is used to select build options, compiler, and
compiler flags and generate a `Makefile`.

The general form of configuring, building, and installing this `bc` is as
follows:

```
[ENVIRONMENT_VARIABLE=<value>...] ./configure.sh [build_options...]
[ENVIRONMENT_VARIABLE=<value>...] ./configure [build_options...]
make
make install
```
Expand All @@ -19,11 +20,11 @@ To get all of the options, including any useful environment variables, use the
following command:

```
./configure.sh -h
./configure -h
```

To learn the available `make` targets run the following command after running
the `configure.sh` script:
the `configure` script:

```
make help
Expand All @@ -44,7 +45,7 @@ file(s), if the architectures are not compatible (i.e., unlike i686 on x86_64).
Thus, the approach is:

```
HOSTCC="/path/to/native/compiler" ./configure.sh
HOSTCC="/path/to/native/compiler" ./configure
make
make install
```
Expand Down Expand Up @@ -135,8 +136,8 @@ To build `bc` only (no `dc`), use either one of the following commands for the
configure step:

```
./configure.sh -b
./configure.sh -D
./configure -b
./configure -D
```

Those two commands are equivalent.
Expand All @@ -150,8 +151,8 @@ To build `dc` only (no `bc`), use either one of the following commands for the
configure step:

```
./configure.sh -d
./configure.sh -B
./configure -d
./configure -B
```

Those two commands are equivalent.
Expand All @@ -166,7 +167,7 @@ disabled (see above).
To disable signal handling, use the `-S` flag in the configure step:

```
./configure.sh -S
./configure -S
```

<a name="build-history"/>
Expand All @@ -176,7 +177,7 @@ To disable signal handling, use the `-S` flag in the configure step:
To disable signal handling, use the `-H` flag in the configure step:

```
./configure.sh -H
./configure -H
```

***WARNING***: Of all of the code in the `bc`, this is the only code that is not
Expand All @@ -192,7 +193,7 @@ Array references are an extension to the [standard][1] first implemented by the
step:

```
./configure.sh -R
./configure -R
```

<a name="build-extra-math"/>
Expand All @@ -209,7 +210,7 @@ operators `$`, `@`, `H`, and `h`, respectively.
Extra operators can be disabled using the `-E` flag in the configure step:

```
./configure.sh -E
./configure -E
```

This `bc` also has a larger library that is only enabled if extra operators are.
Expand All @@ -225,7 +226,7 @@ recommend package and distro maintainers pass the highest optimization level
available in `CC` to the configure script, as follows:

```
./configure.sh -O3
./configure -O3
make
make install
```
Expand All @@ -234,7 +235,7 @@ As usual, the configure script will also accept additional `CFLAGS` on the
command line, so for SSE4 architectures, the following can add a bit more speed:

```
CFLAGS="-march=native -msse4" ./configure.sh -O3
CFLAGS="-march=native -msse4" ./configure -O3
make
make install
```
Expand All @@ -250,7 +251,7 @@ Debug builds (which also disable optimization if no optimization level is given
and if no extra `CFLAGS` are given) can be enabled with:

```
./configure.sh -g
./configure -g
make
make install
```
Expand Down
4 changes: 2 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ configure() {
local configure_flags="$1"
shift

header "Running \"./configure.sh $configure_flags\" with CC=\"$CC\" and CFLAGS=\"$CFLAGS\""
CFLAGS="$CFLAGS" CC="$CC" ./configure.sh $configure_flags > /dev/null
header "Running \"./configure $configure_flags\" with CC=\"$CC\" and CFLAGS=\"$CFLAGS\""
CFLAGS="$CFLAGS" CC="$CC" ./configure $configure_flags > /dev/null

}

Expand Down

0 comments on commit 8302ea8

Please sign in to comment.