]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
only use -M when cf_cctype==gcc
authorWolfgang Bumiller <wry.git@bumiller.com>
Sun, 15 Dec 2013 20:30:39 +0000 (21:30 +0100)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sun, 15 Dec 2013 20:30:39 +0000 (21:30 +0100)
configure

index 40dd5887b6ac8e197f881b9ce01ead4c8491eecf..56f1233235831f2c1b63310e0f3370463cd89e5e 100755 (executable)
--- a/configure
+++ b/configure
@@ -260,12 +260,17 @@ print_targets() {
     local c_src="${cf_dir}/${obj%.o}.c"
     local d_inc="${obj}.d"
     echo "${obj}: ${c_src}"
-    echo $'\t'"\$(CC) \$(CFLAGS) \$(CPPFLAGS) -c -o \$@ \"${c_src}\" -MMD -MF \"${d_inc}\" -MT \$@"
+    printf '\t$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ "%s"' "${c_src}"
+    if [[ $cf_cctype == gcc ]]; then
+      printf ' -MMD -MF "%s" -MT $@\n' "${d_inc}"
+    else
+      echo
+    fi
   done
 
   for exe in "${executables[@]}"; do
     echo "\$(${exe}): \$(${exe}_OBJ)"
-    echo $'\t'"\$(CC) \$(LDFLAGS) -o \$(${exe}) \$(${exe}_OBJ) \$(LIBS)"
+    printf '\t$(CC) $(LDFLAGS) -o $(%s) $(%s_OBJ) $(LIBS)\n' "${exe}" "${exe}"
   done
 }