jw-pkg/make/scripts-targets.mk
Jan Lindemann 13fa28e23f make, scripts: Flip some more switches from pathon 2 to 3 (untested!)
This commit flips some more switches from Python 2 to Python 3 in makefiles and
Python code. Build runs through, but it's still likely to break things.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-02 12:28:13 +00:00

36 lines
907 B
Makefile

all.done: $(BUILD_SCRIPT)
all: build_EXE build_CGI
install: install_files_INIT install_EXE install_files_CGI install_files_SYSCFG
clean:allclean localclean doneclean textclean clean.init
test:
ifeq ($(INSTALL_HOME_BIN_WRAPPERS),true)
install: install-home-bin
endif
HOME_BIN_EXE_SH = $(addprefix $(HOME)/bin/, $(notdir $(EXE_SH)))
$(HOME)/bin/%.py: %.py
echo -e "#!/bin/bash\nexec $(PYTHON) $(shell $(PWD))/$<" '"$$@"' > $@.tmp
chmod 755 $@.tmp
mv $@.tmp $@
$(HOME)/bin/%.pl: %.pl
echo -e "#!/bin/bash\nexec /usr/bin/perl $(shell $(PWD))/$<" '"$$@"' > $@.tmp
chmod 755 $@.tmp
mv $@.tmp $@
$(HOME)/bin/%.sh: %.sh
echo -e "#!/bin/bash\n. $(shell $(PWD))/$<" '"$$@"' > $@.tmp
chmod 755 $@.tmp
mv $@.tmp $@
$(HOME)/bin/%: %
echo -e "#!/bin/bash\n. $(shell $(PWD))/$<" '"$$@"' > $@.tmp
chmod 755 $@.tmp
mv $@.tmp $@
install-home-bin: $(HOME_BIN_EXE_SH)
clean.init:
$(RM) -f $(_INIT_SCRIPTS)