podomain.mak 884 B

12345678910111213141516171819202122232425262728
  1. # -*- make -*-
  2. # This creates the file listing used by xgettext and friends based on the
  3. # declared domain of the make file. It also arranges to set the DOMAIN
  4. # CPPFLAG for the compilation.
  5. ifneq ($(APT_DOMAIN),none)
  6. MY_DOMAIN := $(PACKAGE)
  7. ifdef APT_DOMAIN
  8. $($(LOCAL)-OBJS): CPPFLAGS := $(CPPFLAGS) -DAPT_DOMAIN='"$(APT_DOMAIN)"'
  9. MY_DOMAIN := $(APT_DOMAIN)
  10. endif
  11. MKDIRS += $(PO_DOMAINS)/$(MY_DOMAIN)
  12. $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: SRC := $(addprefix $(SUBDIR)/,$(SOURCE))
  13. $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: makefile dirs
  14. (echo $(SRC) | xargs -n1 echo) > $@.tmp
  15. cmp --silent $@.tmp $@ || mv $@.tmp $@
  16. startup binary program clean update-po: $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
  17. veryclean: veryclean/$(LOCAL)
  18. veryclean/po/$(LOCAL): LIST := $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
  19. veryclean/po/$(LOCAL):
  20. rm -f $(LIST)
  21. endif