--- a/src/test/resources/golden-sample/configure2 Sun Sep 24 18:37:30 2023 +0200 +++ b/src/test/resources/golden-sample/configure2 Mon Oct 02 16:23:33 2023 +0200 @@ -464,10 +464,10 @@ # add general dependency flags to flags.mk echo "# general flags" >> "$TEMP_DIR/flags.mk" -if [ -n "${TEMP_CFLAGS}" ]; then +if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" ]; then +if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ -n "${TEMP_LDFLAGS}" ]; then @@ -652,19 +652,27 @@ fi fi -if [ -n "${TEMP_CFLAGS}" ]; then +if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" ]; then +if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ "$BUILD_TYPE" = "debug" ]; then - echo 'DAV_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" - echo 'DAV_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + if [ -n "$lang_c" ]; then + echo 'DAV_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi + if [ -n "$lang_cpp" ]; then + echo 'DAV_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi fi if [ "$BUILD_TYPE" = "release" ]; then - echo 'DAV_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" - echo 'DAV_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + if [ -n "$lang_c" ]; then + echo 'DAV_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi + if [ -n "$lang_cpp" ]; then + echo 'DAV_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi fi if [ -n "${TEMP_LDFLAGS}" ]; then echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" @@ -685,19 +693,27 @@ # Features -if [ -n "${TEMP_CFLAGS}" ]; then +if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" fi -if [ -n "${TEMP_CXXFLAGS}" ]; then +if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" fi if [ "$BUILD_TYPE" = "debug" ]; then - echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" - echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + if [ -n "$lang_c" ]; then + echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi + if [ -n "$lang_cpp" ]; then + echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi fi if [ "$BUILD_TYPE" = "release" ]; then - echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" - echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + if [ -n "$lang_c" ]; then + echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi + if [ -n "$lang_cpp" ]; then + echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" + fi fi if [ -n "${TEMP_LDFLAGS}" ]; then echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"