Skip to contentSkip to conversation

tools: correct tools/tests/depriv/Makefile

PATCH In review Juergen Gross 3 participants 3 messages Sep 7, 2018 – Sep 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: correct tools/tests/depriv/Makefile

tools/tests/depriv/Makefile directly builds the target program from its C-source. This is problematic when an incremental build is needed after a header the program is depending on has been modified: in this case all headers are added into the gcc call and the build will fail.

Correct that by adding a rule for building the program from its .o file.

---
 tools/tests/depriv/Makefile | 3 +++
 1 file changed, 3 insertions(+)
tools/tests/depriv/Makefile +3 -0
index 11e07b7c03..3cba28da25 100644
@@ -40,6 +40,9 @@ clean:
 .PHONY: distclean
 distclean: clean
 
+depriv-fd-checker: depriv-fd-checker.o
+	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS)
+
 install: all
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN)
Signature · 7 lines
2.16.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw

Juergen Gross writes ("[PATCH] tools: correct tools/tests/depriv/Makefile"):

Quoted 2 lines

tools/tests/depriv/Makefile directly builds the target program from its C-source.

Oh. That was not my intent.

Quoted 6 lines

This is problematic when an incremental build is needed
after a header the program is depending on has been modified: in this case all headers are added into the gcc call and the build will fail.

Correct that by adding a rule for building the program from its .o file.

That I omitted this was unintentional. It just worked for me without it...

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Juergen Gross
Quoted 9 lines · Juergen Gross

tools/tests/depriv/Makefile directly builds the target program from its C-source. This is problematic when an incremental build is needed after a header the program is depending on has been modified: in this case all headers are added into the gcc call and the build will fail.

Correct that by adding a rule for building the program from its .o file.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel