remove trailing whitespaces
[dpdk.git] / mk / internal / rte.compile-pre.mk
index ab9a4a8..b9bff4a 100644 (file)
@@ -1,12 +1,12 @@
 #   BSD LICENSE
-# 
-#   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+#
+#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
 #   All rights reserved.
-# 
+#
 #   Redistribution and use in source and binary forms, with or without
 #   modification, are permitted provided that the following conditions
 #   are met:
-# 
+#
 #     * Redistributions of source code must retain the above copyright
 #       notice, this list of conditions and the following disclaimer.
 #     * Redistributions in binary form must reproduce the above copyright
@@ -16,7 +16,7 @@
 #     * Neither the name of Intel Corporation nor the names of its
 #       contributors may be used to endorse or promote products derived
 #       from this software without specific prior written permission.
-# 
+#
 #   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 #   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 #   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -84,7 +84,7 @@ C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
 C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
 C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)","  CC $(@)")
 endif
-C_TO_O_CMD = "cmd_$@ = $(C_TO_O_STR)"
+C_TO_O_CMD = 'cmd_$@ = $(C_TO_O_STR)'
 C_TO_O_DO = @set -e; \
        echo $(C_TO_O_DISP); \
        $(C_TO_O) && \
@@ -99,7 +99,7 @@ compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1)))
 file_missing = $(call compare,$(wildcard $@),$@)
 
 # return a non-empty string if cmdline changed
-cmdline_changed = $(call compare,$(cmd_$@),$(1))
+cmdline_changed = $(call compare,$(strip $(cmd_$@)),$(strip $(1)))
 
 # return a non-empty string if a dependency file does not exist
 depfile_missing = $(call compare,$(wildcard $(dep_$@)),$(dep_$@))
@@ -127,12 +127,12 @@ boolean = $(if $1,1,0)
        $(if $(D),\
                @echo -n "$< -> $@ " ; \
                echo -n "file_missing=$(call boolean,$(file_missing)) " ; \
-               echo -n "cmdline_changed=$(call boolean,$(call cmdline_changed,$(C_TO_O_STR))) " ; \
+               echo -n "cmdline_changed=$(call boolean,$(call cmdline_changed,$(C_TO_O))) " ; \
                echo -n "depfile_missing=$(call boolean,$(depfile_missing)) " ; \
                echo "depfile_newer=$(call boolean,$(depfile_newer))")
        $(if $(or \
                $(file_missing),\
-               $(call cmdline_changed,$(C_TO_O_STR)),\
+               $(call cmdline_changed,$(C_TO_O)),\
                $(depfile_missing),\
                $(depfile_newer)),\
                $(C_TO_O_DO))