summaryrefslogtreecommitdiff
path: root/rules/build-prog.mk
diff options
context:
space:
mode:
Diffstat (limited to 'rules/build-prog.mk')
-rw-r--r--rules/build-prog.mk18
1 files changed, 13 insertions, 5 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 1a497078c5..8352d88412 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -48,7 +48,6 @@ endef
-
define build-prog-vars
# $1 = dir
# $2 = distdir
@@ -92,18 +91,27 @@ else
ifneq "$$($$($1_$2_PROGNAME)_INPLACE)" ""
$$(error $$($1_$2_PROGNAME)_INPLACE defined twice)
endif
+#
+# Where do we install the wrapper and the binary?
+# $$($1_$2_PROGNAME)_INPLACE The thing we run (script or binary)
+# $1_$2_INPLACE The binary
+#
ifeq "$$($1_$2_TOPDIR)" "YES"
-$$($1_$2_PROGNAME)_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
+$$($1_$2_PROGNAME)_INPLACE = $$(INPLACE_LIB)/bin/$$($1_$2_PROG)
+ifeq "$$($1_$2_WANT_INPLACE_WRAPPER)" "YES"
+$1_$2_INPLACE = $$(INPLACE_LIB)/bin/$$($1_$2_PROG).bin
else
-$$($1_$2_PROGNAME)_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
+$1_$2_INPLACE = $$(INPLACE_LIB)/bin/$$($1_$2_PROG)
endif
-# Where do we install the inplace version?
+else
+$$($1_$2_PROGNAME)_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
ifeq "$$($1_$2_WANT_INPLACE_WRAPPER)" "YES"
$1_$2_INPLACE = $$(INPLACE_LIB)/bin/$$($1_$2_PROG)
else
$1_$2_INPLACE = $$($$($1_$2_PROGNAME)_INPLACE)
endif
endif
+endif
endef
@@ -297,7 +305,7 @@ endif
ifeq "$$($1_$2_WANT_INSTALLED_WRAPPER)" "YES"
INSTALL_LIBEXECS += $1/$2/build/tmp/$$($1_$2_PROG)
else ifeq "$$($1_$2_TOPDIR)" "YES"
-INSTALL_TOPDIR_BINS += $1/$2/build/tmp/$$($1_$2_PROG)
+INSTALL_LIBEXECS += $1/$2/build/tmp/$$($1_$2_PROG)
else
INSTALL_BINS += $1/$2/build/tmp/$$($1_$2_PROG)
endif