package/pmake: force argv[0]=${0} in the pmake wrapper

This forces bmake to call the wrapper, not itself.
Also, use consistent "${0/*}" instead of "${0/pmake}".

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Yann E. MORIN 2013-05-14 11:45:57 +00:00 committed by Peter Korsgaard
parent ac23d50496
commit 3e037134a4
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ define HOST_PMAKE_INSTALL_CMDS
for mk in $(@D)/mk/*; do \
$(INSTALL) -m 0644 $${mk} $(HOST_DIR)/usr/share/pmake/mk; \
done
printf '#!/bin/sh\nexec $${0%%/*}/bmake -m $${0%%/pmake}/../../usr/share/pmake/mk "$$@"\n' \
printf '#!/bin/bash\nexec -a "$${0}" $${0%%/*}/bmake -m $${0%%/*}/../../usr/share/pmake/mk "$$@"\n' \
>$(HOST_DIR)/usr/bin/pmake
chmod 0755 $(HOST_DIR)/usr/bin/pmake
endef