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 <cole.e.helbling@outlook.com>
[-- Attachment #1: Type: text/plain, Size: 370 bytes --] >> 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 <cole.e.helbling@outlook.com> Committed as e718a97. :) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --]