Skip to content

Commit e66e09a

Browse files
committed
templates/autosetup: add support for ABSHADOW
1 parent 5ea5e7f commit e66e09a

1 file changed

Lines changed: 20 additions & 8 deletions

File tree

templates/12-autosetup.sh

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ build_autosetup_probe(){
99
}
1010

1111
build_autosetup_configure() {
12-
mkdir -vp "$BLDDIR" \
13-
|| abdie "Failed to create build directory: $?."
14-
cd "$BLDDIR" \
15-
|| abdie "Failed to enter build directory: $?."
12+
export ABSHADOW
13+
14+
if bool "$ABSHADOW"
15+
then
16+
mkdir -vp "$BLDDIR" \
17+
|| abdie "Failed to create build directory: $?."
18+
cd "$BLDDIR" \
19+
|| abdie "Failed to enter build directory: $?."
20+
fi
1621

1722
if [[ "x${AUTOTOOLS_TARGET[*]}" != "x" ]]
1823
then
@@ -40,8 +45,11 @@ build_autosetup_configure() {
4045

4146
build_autosetup_build() {
4247
BUILD_READY
43-
cd "$BLDDIR" \
44-
|| abdie "Failed to enter build directory: $?."
48+
if bool "$ABSHADOW"
49+
then
50+
cd "$BLDDIR" \
51+
|| abdie "Failed to enter build directory: $?."
52+
fi
4553

4654
abinfo "Building binaries ..."
4755
make \
@@ -53,8 +61,12 @@ build_autosetup_install() {
5361
abinfo "Installing binaries ..."
5462
make install DESTDIR="$PKGDIR" \
5563
|| abdie "Failed to install binaries: $?."
56-
cd "$SRCDIR" \
57-
|| abdie "Failed to return to source directory: $?."
64+
65+
if bool "$ABSHADOW"
66+
then
67+
cd "$SRCDIR" \
68+
|| abdie "Failed to return to source directory: $?."
69+
fi
5870
}
5971

6072
ab_register_template autosetup -- tclsh

0 commit comments

Comments
 (0)