summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-11-02 18:27:53 +0000
committerLaurent Bercot <ska@appnovation.com>2023-11-02 18:27:53 +0000
commit813a7ae859c0563f87c2afef79d346b853c20e36 (patch)
tree36ae2db624345f0298e7070dfb5c27d44587a2d2
parent61d68e5efd9b81f0df3303c1a1bdefcf7688d3f1 (diff)
downloadexecline-813a7ae859c0563f87c2afef79d346b853c20e36.tar.xz
Tentative workaround for make bug
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--Makefile2
-rw-r--r--package/targets.mak6
2 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f08ea8b..bf8f053 100644
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,7 @@ RANLIB := $(CROSS_COMPILE)ranlib
STRIP := $(CROSS_COMPILE)strip
INSTALL := ./tools/install.sh
-$(foreach var,$(BIN_TARGETS),$(eval $(call binary_installation_rule,$(bindir),$(var))))
+$(foreach var,$(filter-out define,$(BIN_TARGETS)),$(eval $(call binary_installation_rule,$(bindir),$(var))))
$(foreach var,$(LIBEXEC_TARGETS),$(eval $(call binary_installation_rule,$(libexecdir),$(var))))
$(foreach var,$(BIN_SYMLINKS),$(eval $(call symlink_installation_rule,$(bindir),$(var))))
diff --git a/package/targets.mak b/package/targets.mak
index 8fc04a1..a7a1fd9 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -32,4 +32,10 @@ SYMLINK_TARGET_cd := execline-cd
SYMLINK_TARGET_umask := execline-umask
endif
+$(DESTDIR)$(bindir)/define: ./define package/modes
+ exec $(INSTALL) -D -m 600 $< $@
+ grep -- ^$(@F) < package/modes | { read name mode owner && \
+ if [ x$$owner != x ] ; then chown -- $$owner $@ ; fi && \
+ chmod $$mode $@ ; }
+
endif