summaryrefslogtreecommitdiff
path: root/src/emc/usr_intf/gremlin/Submakefile
blob: efee43f35b5754dae6759898058f19549b08b649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PYTARGETS += ../bin/gremlin ../lib/python/gremlin.py
PYI18NSRCS += emc/usr_intf/gremlin/gremlin.py

../lib/python/%: emc/usr_intf/gremlin/%
	@$(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)cp $< $@

../bin/gremlin: emc/usr_intf/gremlin/gremlin-run
	@$(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 $@