summaryrefslogtreecommitdiff
path: root/src/hal/user_comps/vismach/Submakefile
blob: 56f017db2997a7b34fc72b0c1f5deb9390e815c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22


VISMACH_PY :=  \
	pumagui.py \
	puma560gui.py \
	scaragui.py \
	hexagui.py \
	5axisgui.py \
	max5gui.py \
	maho600gui.py \
	hbmgui.py

VISMACH_PYBIN := $(patsubst %.py,../bin/%,$(VISMACH_PY))
PYTARGETS += $(VISMACH_PYBIN)


$(VISMACH_PYBIN): ../bin/%: hal/user_comps/vismach/%.py
	@$(ECHO) Syntax checking python script $(notdir $@)
	$(Q)$(PYTHON) -c 'import sys; compile(open(sys.argv[1]).read(), sys.argv[1], "exec")' $<
	$(ECHO) Copying python script $(notdir $@)
	$(Q)(echo '#!$(PYTHON)'; sed '1 { /^#!/d; }' $<) > $@.tmp && chmod +x $@.tmp && mv -f $@.tmp $@