patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH ucspi-vsock] Makefile: use $@ where possible
@ 2021-03-18 19:04 Alyssa Ross
  2021-03-18 19:19 ` Cole Helbling
  0 siblings, 1 reply; 3+ messages in thread
From: Alyssa Ross @ 2021-03-18 19:04 UTC (permalink / raw)
  To: devel

This is, unfortunately, the only "internal macro" POSIX requires to be
available for target rules, and I do want to keep the Makefile
POSIX-compatible.  But this is at least a slight improvement.
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 2045cdd..e05e32f 100644
--- a/Makefile
+++ b/Makefile
@@ -21,9 +21,9 @@ install: $(PROGRAMS)
 .PHONY: install
 
 vsockclient: vsockclient.o env.o log.o num.o vsock.o
-	$(CC) $(LDFLAGS) -o vsockclient vsockclient.o env.o log.o num.o vsock.o $(LDLIBS)
+	$(CC) $(LDFLAGS) -o $@ $@.o env.o log.o num.o vsock.o $(LDLIBS)
 vsockserver: vsockserver.o env.o log.o num.o vsock.o
-	$(CC) $(LDFLAGS) -o vsockserver vsockserver.o env.o log.o num.o vsock.o $(LDLIBS)
+	$(CC) $(LDFLAGS) -o $@ $@.o env.o log.o num.o vsock.o $(LDLIBS)
 
 vsockclient.o: env.h log.h num.h vsock.h
 vsockserver.o: env.h log.h num.h vsock.h
-- 
2.30.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-19  3:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 19:04 [PATCH ucspi-vsock] Makefile: use $@ where possible Alyssa Ross
2021-03-18 19:19 ` Cole Helbling
2021-03-19  3:28   ` Alyssa Ross

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).