Submakefile
1 TOUCHY_MODULES = mdi emc_interface hal_interface filechooser listing preferences 2 3 PYTARGETS += ../bin/touchy ../lib/python/touchy/__init__.py $(patsubst %,../lib/python/touchy/%.py,$(TOUCHY_MODULES)) \ 4 ../share/linuxcnc/touchy.glade 5 PYI18NSRCS += emc/usr_intf/touchy/touchy.py $(patsubst %,emc/usr_intf/touchy/%.py,$(TOUCHY_MODULES)) \ 6 emc/usr_intf/touchy/touchy.glade 7 8 ../lib/python/touchy/__init__.py: 9 @mkdir -p ../lib/python/touchy 10 @touch $@ 11 12 ../lib/python/touchy/%: emc/usr_intf/touchy/% 13 @$(ECHO) Syntax checking python script $(notdir $@) 14 $(Q)$(PYTHON) -c 'import sys; compile(open(sys.argv[1]).read(), sys.argv[1], "exec")' $< 15 $(ECHO) Copying python script $(notdir $@) 16 $(Q)mkdir -p ../lib/python/touchy 17 $(Q)cp $< $@ 18 19 ../share/linuxcnc/touchy.glade: emc/usr_intf/touchy/touchy.glade 20 $(ECHO) Copying glade file $(notdir $@) 21 $(Q)mkdir -p $(dir $@) 22 $(Q)cp -f $< $@ 23 24 ../bin/touchy: emc/usr_intf/touchy/touchy.py 25 @$(ECHO) Syntax checking python script $(notdir $@) 26 $(Q)$(PYTHON) -c 'import sys; compile(open(sys.argv[1]).read(), sys.argv[1], "exec")' $< 27 $(ECHO) Copying python script $(notdir $@) 28 $(Q)(echo '#!$(PYTHON)'; sed '1 { /^#!/d; }' $<) > $@.tmp && chmod +x $@.tmp && mv -f $@.tmp $@