patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Subject: [PATCH ucspi-vsock] Makefile: use $@ where possible
Date: Thu, 18 Mar 2021 19:04:51 +0000	[thread overview]
Message-ID: <20210318190451.15182-1-hi@alyssa.is> (raw)

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

             reply	other threads:[~2021-03-18 19:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 19:04 Alyssa Ross [this message]
2021-03-18 19:19 ` Cole Helbling
2021-03-19  3:28   ` Alyssa Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210318190451.15182-1-hi@alyssa.is \
    --to=hi@alyssa.is \
    --cc=devel@spectrum-os.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).