MODULES = confirmDialog.js constants.js extension.js keyboard.js LICENSE.rst metadata.json prefs.js README.rst registry.js schemas/ stylesheet.css locale/
INSTALLPATH=$(DESTDIR)/usr/share/gnome-shell/extensions/clipboard-indicator@tudmotu.com/
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: build
	rm -rf $(INSTALLPATH)
	mkdir -p $(INSTALLPATH)
	cp -r $(MODULES) $(INSTALLPATH)/
