From e7e13aa0749e408cc80c71f5f2d4e37c9c9ec1ea Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 23 Jan 2023 00:49:13 +0000 Subject: Makefile: Use install instead of cp and mkdir. The --parents flag of cp is not portable to macOS. Besides, install correctly replaces destination files when they already exist. * Makefile (install): Use install instead of cp and mkdir. --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3e8359b..640e24f 100644 --- a/Makefile +++ b/Makefile @@ -54,9 +54,12 @@ check: install: install -D $(scripts) --target-directory $(bindir) - mkdir -p $(scmdir) $(godir) - cp --parents -vr $(sources) $(scmdir) - cp --parents -vr $(objects) $(godir) + for source in $(sources); do \ + install -D $$source $(scmdir)/$$source; \ + done + for object in $(objects); do \ + install -D $$object $(godir)/$$object; \ + done clean: rm -f $(objects) -- cgit v1.2.3