Skip to contentSkip to conversation

xen/build: Fix dependency for the MAP rule

PATCH Superseded Andrew Cooper 4 participants 5 messages Apr 14, 2022 – Apr 20, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/build: Fix dependency for the MAP rule

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Anthony PERARD <[email protected]>

---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/Makefile +1 -1
index dd05672ff42d..02a274f56dc0 100644
@@ -599,7 +599,7 @@ cscope:
 	cscope -k -b -q
 
 .PHONY: _MAP
-_MAP:
+_MAP: $(TARGET)-syms
 	$(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map
 
 %.o %.i %.s: %.c tools_fixdep FORCE
Signature · 1 line
2.11.0
#1 lore raw

xen/Makefile cscope: · line 602

Quoted 10 lines · Andrew Cooper
xen/Makefile +1 -1
index dd05672ff42d..02a274f56dc0 100644
@@ -599,7 +599,7 @@ cscope:
 	cscope -k -b -q
 
 .PHONY: _MAP
-_MAP:
+_MAP: $(TARGET)-syms

That's not going to work well as make isn't going to know how to build $(TARGET)-syms. I guess you want to have $(TARGET) as prerequisite or add somewhere "$(TARGET)-syms: $(TARGET)".

xen/Makefile cscope: · line 605

Quoted 3 lines
xen/Makefile +0 -0
 	$(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map
 
 %.o %.i %.s: %.c tools_fixdep FORCE

Thanks,

Signature · 1 line
Anthony PERARD
#2 lore raw
Quoted 8 lines · Anthony PERARD
Quoted 7 lines · Andrew Cooper
xen/Makefile +0 -0
index dd05672ff42d..02a274f56dc0 100644
@@ -599,7 +599,7 @@ cscope:
 	cscope -k -b -q
 
Quoted 5 lines

xen/Makefile cscope: · line 602

Quoted 3 lines
xen/Makefile +1 -1
 .PHONY: _MAP
-_MAP:
+_MAP: $(TARGET)-syms

That's not going to work well as make isn't going to know how to build $(TARGET)-syms.

Huh... It appears to work for me, but it's parallel build so who knows.

Quoted 2 lines

I guess you want to have $(TARGET) as prerequisite or
add somewhere "$(TARGET)-syms: $(TARGET)".

That becomes cyclic with arch/*/Makefile which has:

$(TARGET): $(TARGET)-syms

The _install rule does make the implication that a dependency on $(TARGET) builds $(TARGET)-syms so I guess that's good enough for _MAP too.

~Andrew

#3 lore raw

PATCH v2 1/1 xen/build: Fix dependency for the MAP rule

In reply to Andrew Cooper

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Anthony PERARD <[email protected]>

v2:
* Use $(TARGET) not $(TARGET)-syms

---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/Makefile +1 -1
index dd05672ff42d..3a4e3bdd0f95 100644
@@ -599,7 +599,7 @@ cscope:
 	cscope -k -b -q
 
 .PHONY: _MAP
-_MAP:
+_MAP: $(TARGET)
 	$(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map
 
 %.o %.i %.s: %.c tools_fixdep FORCE
Signature · 1 line
2.11.0