scripts-targets.mk: Now correctly installing python scripts with build.py

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2013-10-15 14:58:18 +00:00
commit 2ed223c636

View file

@ -9,11 +9,16 @@ install: install-home-bin
endif endif
HOME_BIN_EXE_SH = $(addprefix $(HOME)/bin/, $(notdir $(EXE_SH))) HOME_BIN_EXE_SH = $(addprefix $(HOME)/bin/, $(notdir $(EXE_SH)))
$(HOME)/bin/%: % $(HOME)/bin/%.sh: %.sh
echo -e "#!/bin/sh\n. $(shell pwd)/$<" '"$$@"' > $@.tmp echo -e "#!/bin/sh\n. $(shell pwd)/$<" '"$$@"' > $@.tmp
chmod 755 $@.tmp chmod 755 $@.tmp
mv $@.tmp $@ mv $@.tmp $@
$(HOME)/bin/%.py: %.py
echo -e "#!/bin/sh\nexec /usr/bin/python $(shell pwd)/$<" '"$$@"' > $@.tmp
chmod 755 $@.tmp
mv $@.tmp $@
install-home-bin: $(HOME_BIN_EXE_SH) install-home-bin: $(HOME_BIN_EXE_SH)
clean.init: clean.init: