ScriptRules.make 667 B

1234567891011121314151617181920212223242526
  1. # common dependencies and rules for building scripts
  2. STRINGDIR = $(GRASS_HOME)/locale/scriptstrings
  3. $(SCRIPTDIR)/%: %.py | $(SCRIPTDIR)
  4. $(INSTALL) $< $@
  5. $(SCRIPTDIR)/%.py: %.py | $(SCRIPTDIR)
  6. $(INSTALL) $< $@
  7. $(SCRIPTDIR):
  8. $(MKDIR) $(SCRIPTDIR)
  9. # Make strings in a fake .c file so that they get picked up by the internationalizer stuff.
  10. # These are only the options (parser.c) type things.
  11. # See locale/scriptstrings/README for more information
  12. strings = $(call run_grass,g.parser -t $(1) | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' > $(2))
  13. $(STRINGDIR)/%_to_translate.c: %.py
  14. -$(call strings,$<,$@)
  15. $(STRINGDIR)/%_to_translate.c: %
  16. -$(call strings,$<,$@)