Skip to content

Commit

Permalink
Add EXTRA_AUTORECONF_VARS
Browse files Browse the repository at this point in the history
  • Loading branch information
Periklis Akritidis committed Jan 27, 2022
1 parent 8f09a17 commit 5ce5604
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ The following shortcuts can be used instead of the manual method:
* `rbuild -A` runs `autoreconf --install` in the remote source directory.
* `rbuild -a` runs `configure --prefix=$INSTALL_DIR` in the remote build directory.

The only environment variable passed to `autoreconf` by default is `ACLOCAL_PATH`.
You can point `ACLOCAL_PATH` in `.rbuild.conf` to directories with custom `m4` macros.
To pass additional variables through `.rbuild.conf`, use:

EXTRA_AUTORECONF_VARS="..."

The environment variables passed to `configure` by default are `CC`, `CFLAGS`,
`CXX`, `CXXFLAGS` and `PKG_CONFIG_PATH`. To pass additional variables through
`.rbuild.conf`:
Expand Down
5 changes: 4 additions & 1 deletion rbuild
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function stage {

function autoreconf {
echo Remote autoreconf in $BUILD_HOST:$STAGING_DIR
$SSH $BUILD_HOST "cd \"$STAGING_DIR\" && autoreconf --install"
$SSH $BUILD_HOST "cd \"$STAGING_DIR\" && eval $AUTORECONF_VARS autoreconf --install"
}

function configure {
Expand Down Expand Up @@ -264,6 +264,9 @@ if [ -n "$deploy_host" ]; then
DEPLOY_HOST=$deploy_host
fi

AUTORECONF_VARS="${AUTORECONF_VARS:-ACLOCAL_PATH=\'$ACLOCAL_PATH\'}"
AUTORECONF_VARS+=" $EXTRA_AUTORECONF_VARS"

CONFIGURE_VARS="${CONFIGURE_VARS:-PKG_CONFIG_PATH=\'$PKG_CONFIG_PATH\' CC=\'$CC\' CFLAGS=\'$CFLAGS\' CXX=\'$CXX\' CXXFLAGS=\'$CXXFLAGS\' CCAS=gcc CCASFLAGS=}"
CONFIGURE_VARS+=" $EXTRA_CONFIGURE_VARS"

Expand Down

0 comments on commit 5ce5604

Please sign in to comment.