[CRIU] [PATCH 1/9] nmk: rules.mk -- Drop @CFLAGS_ and @ASFLAGS_ but add ability to bring them via param

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 21 05:12:13 PDT 2016


Both are never worked, we need to pass them as explicit parameter.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 scripts/nmk/scripts/rules.mk | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/scripts/nmk/scripts/rules.mk b/scripts/nmk/scripts/rules.mk
index e589e449954d..04c9a7e49547 100644
--- a/scripts/nmk/scripts/rules.mk
+++ b/scripts/nmk/scripts/rules.mk
@@ -3,49 +3,49 @@ ifndef ____nmk_defined__rules
 #
 # Accumulate common flags.
 define nmk-ccflags
-        $(CFLAGS) $(ccflags-y) $(CFLAGS_$@)
+        $(CFLAGS) $(ccflags-y)
 endef
 
 define nmk-asflags
-        $(CFLAGS) $(ASFLAGS) $(asflags-y) $(ASFLAGS_$@)
+        $(CFLAGS) $(ASFLAGS) $(asflags-y)
 endef
 
 #
 # General rules.
 define gen-rule-o-from-c-by-name
-$(1).o: $(2).c
+$(1).o: $(2).c $(3)
 	$$(call msg-cc, $$@)
-	$$(Q) $$(CC) -c $$(strip $$(nmk-ccflags)) $$< -o $$@
+	$$(Q) $$(CC) -c $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
 endef
 define gen-rule-i-from-c-by-name
-$(1).i: $(2).c
+$(1).i: $(2).c $(3)
 	$$(call msg-cc, $$@)
-	$$(Q) $$(CC) -E $$(strip $$(nmk-ccflags)) $$< -o $$@
+	$$(Q) $$(CC) -E $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
 endef
 define gen-rule-s-from-c-by-name
-$(1).s: $(2).c
+$(1).s: $(2).c $(3)
 	$$(call msg-cc, $$@)
-	$$(Q) $$(CC) -S -fverbose-asm $$(strip $$(nmk-ccflags)) $$< -o $$@
+	$$(Q) $$(CC) -S -fverbose-asm $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
 endef
 define gen-rule-o-from-S-by-name
-$(1).o: $(2).S
+$(1).o: $(2).S $(3)
 	$$(call msg-cc, $$@)
-	$$(Q) $$(CC) -c $$(strip $$(nmk-asflags)) $$< -o $$@
+	$$(Q) $$(CC) -c $$(strip $$(nmk-asflags)) $(4) $$< -o $$@
 endef
 define gen-rule-d-from-c-by-name
-$(1).d: $(2).c
+$(1).d: $(2).c $(3)
 	$$(call msg-dep, $$@)
-	$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-ccflags)) $$< -o $$@
+	$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-ccflags)) $(4) $$< -o $$@
 endef
 define gen-rule-d-from-S-by-name
-$(1).d: $(2).S
+$(1).d: $(2).S $(3)
 	$$(call msg-dep, $$@)
-	$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-asflags)) $$< -o $$@
+	$$(Q) $$(CC) -M -MT $$@ -MT $$(patsubst %.d,%.o,$$@) $$(strip $$(nmk-asflags)) $(4) $$< -o $$@
 endef
 define gen-rule-i-from-S-by-name
-$(1).i: $(2).S
+$(1).i: $(2).S $(3)
 	$$(call msg-cc, $$@)
-	$$(Q) $$(CC) -E $$(strip $$(nmk-asflags)) $$< -o $$@
+	$$(Q) $$(CC) -E $$(strip $$(nmk-asflags)) $(4) $$< -o $$@
 endef
 
 #
-- 
2.5.0



More information about the CRIU mailing list