[PATCH ucspi-vsock] Makefile: use $@ where possible
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
On Thu Mar 18, 2021 at 12:04 PM PDT, Alyssa Ross wrote:
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(-)
Reviewed-by: Cole Helbling
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(-)
Reviewed-by: Cole Helbling
Committed as e718a97. :)
participants (2)
-
Alyssa Ross
-
Cole Helbling