build-unit-test-docker: Make common flags for autotools
This change explicitly specifies the install prefix for all autotools
based builds. /usr/local should already be the implicit prefix so this
will not change anything functionally yet.
Change-Id: Ia47d20595b7f452a68cb4fab8ed2cdc300b7022e
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 16ce201..644189d 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -78,11 +78,15 @@
done
wait
-# Define common flags used for cmake builds
+# Define common flags used for builds
+PREFIX="/usr/local"
+CONFIGURE_FLAGS=(
+ "--prefix=${PREFIX}"
+)
CMAKE_FLAGS=(
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
"-DBUILD_SHARED_LIBS=ON"
- "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}"
)
################################# docker img # #################################
@@ -218,49 +222,49 @@
RUN git clone https://github.com/openbmc/sdbusplus && \
cd sdbusplus && \
./bootstrap.sh && \
-./configure --enable-transaction && \
+./configure ${CONFIGURE_FLAGS[@]} --enable-transaction && \
make -j$(nproc) && \
make install
RUN git clone https://github.com/openbmc/sdeventplus && \
cd sdeventplus && \
./bootstrap.sh && \
-./configure --disable-tests --disable-examples && \
+./configure ${CONFIGURE_FLAGS[@]} --disable-tests --disable-examples && \
make -j$(nproc) && \
make install
RUN git clone https://github.com/openbmc/gpioplus && \
cd gpioplus && \
./bootstrap.sh && \
-./configure --disable-tests --disable-examples && \
+./configure ${CONFIGURE_FLAGS[@]} --disable-tests --disable-examples && \
make -j$(nproc) && \
make install
RUN git clone https://github.com/openbmc/phosphor-dbus-interfaces && \
cd phosphor-dbus-interfaces && \
./bootstrap.sh && \
-./configure && \
+./configure ${CONFIGURE_FLAGS[@]} && \
make -j$(nproc) && \
make install
RUN git clone https://github.com/openbmc/openpower-dbus-interfaces && \
cd openpower-dbus-interfaces && \
./bootstrap.sh && \
-./configure && \
+./configure ${CONFIGURE_FLAGS[@]} && \
make -j$(nproc) && \
make install
RUN git clone https://github.com/openbmc/phosphor-logging && \
cd phosphor-logging && \
./bootstrap.sh && \
-./configure --enable-metadata-processing YAML_DIR=/usr/local/share/phosphor-dbus-yaml/yaml && \
+./configure ${CONFIGURE_FLAGS[@]} --enable-metadata-processing YAML_DIR=/usr/local/share/phosphor-dbus-yaml/yaml && \
make -j$(nproc) && \
make install
RUN git clone https://github.com/openbmc/phosphor-objmgr && \
cd phosphor-objmgr && \
./bootstrap.sh && \
-./configure --enable-unpatched-systemd && \
+./configure ${CONFIGURE_FLAGS[@]} --enable-unpatched-systemd && \
make -j$(nproc) && \
make install