test/configure

changeset 134
95ae5973c142
parent 133
59b14b75f12b
--- a/test/configure	Sun Jan 12 12:45:11 2025 +0100
+++ b/test/configure	Sun Jan 12 13:23:35 2025 +0100
@@ -524,6 +524,16 @@
     break
 done
 
+# build type
+if [ "$BUILD_TYPE" = "debug" ]; then
+    TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS"
+	TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+if [ "$BUILD_TYPE" = "release" ]; then
+	TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS"
+	TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+
 # add general dependency flags to flags.mk
 echo "# general flags" >> "$TEMP_DIR/flags.mk"
 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
@@ -599,22 +609,6 @@
 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
     echo "CXXFLAGS  += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
 fi
-if [ "$BUILD_TYPE" = "debug" ]; then
-    if [ -n "$lang_c" ]; then
-        echo 'CFLAGS += ${DEBUG_CFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo 'CXXFLAGS += ${DEBUG_CXXFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
-if [ "$BUILD_TYPE" = "release" ]; then
-    if [ -n "$lang_c" ]; then
-        echo 'CFLAGS += ${RELEASE_CFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo 'CXXFLAGS += ${RELEASE_CXXFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
 if [ -n "${TEMP_LDFLAGS}" ]; then
     echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
 fi
@@ -647,7 +641,7 @@
 #
 # config.mk generated by:
 # pwd: $pwd
-# cmd: $0 $@
+# $0 $@
 #
 
 __EOF__

mercurial