GSCREEN_MODULES = mdi emc_interface preferences keybindings PYTARGETS += ../bin/gscreen ../lib/python/gscreen/__init__.py $(patsubst %,../lib/python/gscreen/%.py,$(GSCREEN_MODULES)) \ ../share/linuxcnc/gscreen.glade \ ../share/linuxcnc/gscreen2.glade PYI18NSRCS += emc/usr_intf/gscreen/gscreen.py $(patsubst %,emc/usr_intf/gscreen/%.py,$(GSCREEN_MODULES)) \ emc/usr_intf/gscreen/gscreen.glade \ emc/usr_intf/gscreen/gscreen2.glade ../lib/python/gscreen/__init__.py: @mkdir -p ../lib/python/gscreen @touch $@ ../lib/python/gscreen/%: emc/usr_intf/gscreen/% @$(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)mkdir -p ../lib/python/gscreen $(Q)cp $< $@ ../share/linuxcnc/gscreen.glade: emc/usr_intf/gscreen/gscreen.glade $(ECHO) Copying glade file $(notdir $@) $(Q)mkdir -p $(dir $@) $(Q)cp -f $< $@ ../share/linuxcnc/gscreen2.glade: emc/usr_intf/gscreen/gscreen2.glade $(ECHO) Copying glade file $(notdir $@) $(Q)mkdir -p $(dir $@) $(Q)cp -f $< $@ ../bin/gscreen: emc/usr_intf/gscreen/gscreen.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 $@