about summary refs log tree commit diff
diff options
context:
space:
mode:
-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