Speeds up a no-op build from 500ms to 60ms and significantly improves dependency tracking.
27 lines
860 B
Makefile
27 lines
860 B
Makefile
include $(dir $(lastword $(MAKEFILE_LIST)))../../header.mk
|
|
DESKTOP_SRC := $(d)
|
|
|
|
ICONS = $(wildcard $(d)*.png) $(wildcard $(d)*.svg)
|
|
ICONS_INSTALLED = $(DESTDIR)$(P_ICON)/hicolor/%/aegisub.
|
|
|
|
DESKTOP_FILE := $(d)aegisub.desktop
|
|
DESKTOP_FILE_PO := $(d)../../po
|
|
DESKTOP_FILE_INSTALLED = $(DESTDIR)$(P_DESKTOP)/$(notdir $(DESKTOP_FILE))
|
|
|
|
DISTCLEANFILES += $(DESKTOP_FILE)
|
|
|
|
%.desktop: %.desktop.template $(DESKTOP_FILE_PO)
|
|
intltool-merge --quiet --desktop-style $(DESKTOP_FILE_PO) $< $@
|
|
|
|
$(ICONS_INSTALLED)png: $(d)%.png ; $(MKDIR_INSTALL)
|
|
$(ICONS_INSTALLED)svg: $(d)%.svg ; $(MKDIR_INSTALL)
|
|
$(DESKTOP_FILE_INSTALLED): $(DESKTOP_FILE) ; $(MKDIR_INSTALL)
|
|
|
|
ifneq (yes, $(BUILD_DARWIN))
|
|
install: \
|
|
$(DESKTOP_FILE_INSTALLED) \
|
|
$(patsubst %.png, $(ICONS_INSTALLED)png, $(patsubst %.svg, $(ICONS_INSTALLED)svg, $(notdir $(ICONS))))
|
|
endif
|
|
|
|
include $(TOP)Makefile.target
|