ScriptRules.make 750 B

1234567891011121314151617181920212223242526272829303132
  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. $(ETCDIR)/%: % | $(ETCDIR)
  10. $(INSTALL_DATA) $< $@
  11. $(ETCDIR):
  12. $(MKDIR) $(ETCDIR)
  13. # Make strings in a fake .c file so that they get picked up by the internationalizer stuff.
  14. # These are only the options (parser.c) type things.
  15. # See locale/scriptstrings/README for more information
  16. strings = $(call run_grass,g.parser -t $(1) | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' > $(2))
  17. $(STRINGDIR)/%_to_translate.c: %.py
  18. -$(call strings,$<,$@)
  19. $(STRINGDIR)/%_to_translate.c: %
  20. -$(call strings,$<,$@)