MODULES = extension.js confirmDialog.js locale/ metadata.json stylesheet.css LICENSE.rst README.rst prefs.js schemas/ utils.js
INSTALLPATH=$(DESTDIR)/usr/share/gnome-shell/extensions/clipboard-indicator@tudmotu.com/
LOCALEPATH = $(DESTDIR)/usr/share/locale/
build: compile-locales compile-settings

compile-settings:
	glib-compile-schemas --strict --targetdir=schemas/ schemas

compile-locales:
	$(foreach file, $(wildcard locale/*/LC_MESSAGES/*.po), \
		msgfmt $(file) -o $(subst .po,.mo,$(file));)

install: 
	rm -rf $(INSTALLPATH)
	mkdir -p $(INSTALLPATH)
	cp -r $(MODULES) $(INSTALLPATH)/
	rsync -a locale/ $(LOCALEPATH)
