PageRenderTime 46ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/system-config-services-0.101.7/desktop_rules.mk

#
Makefile | 45 lines | 33 code | 12 blank | 0 comment | 0 complexity | 16db2d7e5c7c2780949a8fb29151441e MD5 | raw file
Possible License(s): GPL-2.0
  1. ifdef PO_RULES_INCLUDED
  2. $(error po_rules.mk must be included after $(lastword $(MAKEFILE_LIST)))
  3. endif
  4. ifndef PKGNAME
  5. $(error PKGNAME must be set before including $(lastword $(MAKEFILE_LIST)))
  6. endif
  7. ifndef PO_INTLTOOLEXTRACT
  8. PO_INTLTOOLEXTRACT = intltool-extract
  9. endif
  10. ifndef PO_INTLTOOLMERGE
  11. PO_INTLTOOLMERGE = intltool-merge
  12. endif
  13. ifndef DESKTOP_DIR
  14. DESKTOP_DIR = $(DATADIR)/applications
  15. endif
  16. ifndef DESKTOP_INSTALL
  17. DESKTOP_INSTALL = $(if $(INSTALL),$(INSTALL),install --verbose)
  18. endif
  19. ifndef DESKTOP_INSTALL_D
  20. DESKTOP_INSTALL_D = $(DESKTOP_INSTALL) -D
  21. endif
  22. DESKTOPIN_FILES = $(wildcard *.desktop.in)
  23. DESKTOPINH_FILES = $(patsubst %.desktop.in,%.desktop.in.h,$(DESKTOPIN_FILES))
  24. DESKTOP_FILES = $(patsubst %.in,%,$(DESKTOPIN_FILES))
  25. %.desktop: %.desktop.in po-update-pot po/*.po
  26. $(PO_INTLTOOLMERGE) -u -d po/ $< $@
  27. %.desktop.in.h: %.desktop.in
  28. $(PO_INTLTOOLEXTRACT) -t gettext/ini $<
  29. desktop-all: $(DESKTOP_FILES)
  30. desktop-install: $(DESKTOP_FILES)
  31. @$(foreach file,$(DESKTOP_FILES),$(DESKTOP_INSTALL_D) -m 0644 $(PKGNAME).desktop $(DESTDIR)$(DESKTOP_DIR)/$(file); )
  32. desktop-clean:
  33. @rm -fv $(DESKTOP_FILES) $(DESKTOPINH_FILES)