From 4bb9a11a4d91931bd549fc5d52b3163821df9106 Mon Sep 17 00:00:00 2001 From: Patrick Kelsey <4480447+pkelsey@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:40:40 -0400 Subject: [PATCH] Generate headers in the build directory, not the source directory (#223) The existing behavior was to generate two headers in the source directory and copy one of them to the build directory. Now, both headers are generated in the build directory. This allows a single source tree to properly support multiple, independently configured out of tree builds. Note that the terminology in this configure script is currently such that "BUILD_DIR" is actually the source dir (root of the source tree), and "P_PWD" is the build dir (root of the build products tree). Co-authored-by: Patrick Kelsey --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index acf966b7..7a58be81 100755 --- a/configure +++ b/configure @@ -882,22 +882,22 @@ PROFILE="${PROFILE:-$PLATFORM}" PLATFORM="__${PLATFORM}__" printf "Generating header files.........." -generate include/ck_md.h.in include/ck_md.h -generate include/freebsd/ck_md.h.in include/freebsd/ck_md.h +mkdir -p $P_PWD/include +mkdir -p $P_PWD/include/freebsd +generate include/ck_md.h.in $P_PWD/include/ck_md.h +generate include/freebsd/ck_md.h.in $P_PWD/include/freebsd/ck_md.h echo "success" printf "Generating build files..........." mkdir -p $P_PWD/doc mkdir -p $P_PWD/build -mkdir -p $P_PWD/include mkdir -p $P_PWD/src if test "$P_PWD" '!=' "$BUILD_DIR"; then mkdir -p $P_PWD/regressions cp $BUILD_DIR/regressions/Makefile.unsupported $P_PWD/regressions/Makefile &> /dev/null cp $BUILD_DIR/build/ck.build.$PROFILE $P_PWD/build/ck.build.$PROFILE &> /dev/null - cp $BUILD_DIR/include/ck_md.h $P_PWD/include/ck_md.h &> /dev/null fi generate src/Makefile.in $P_PWD/src/Makefile