-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile.am
63 lines (41 loc) · 1.75 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
additional_files = src/redshift-prefs.ui
uuid = @PACKAGE_NAME@
# blatantly stolen from http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
extension_files_pattern := *.js *.css *.png *.svg *.jpg *.wav *.mp3
extension_files = $(foreach ext,$(extension_files_pattern),$(call rwildcard,src/,$(ext)))
opt_files_pattern := README.rst README.md README COPYING AUTHORS LICENSE ChangeLog
opt_files = $(foreach file,$(opt_files_pattern),$(wildcard $(file)))
extensionbase = $(datadir)/gnome-shell/extensions
extensiondir = $(extensionbase)/$(uuid)
nobase_dist_extension_DATA = src/metadata.json $(extension_files) $(additional_files) $(opt_files)
.PHONY: zip local-install local-helper
zip:
$(MAKE) local-helper DESTDIR=$(abs_builddir)/_build
(cd $(abs_builddir)/_build/$(uuid)/ && \
zip -qr $(abs_builddir)/$(uuid).zip . \
)
-rm -rf $(abs_builddir)/_build
CLEANFILES = $(abs_builddir)/$(uuid).zip
DISTCLEANFILES = $(uuid).zip
local-install:
$(MAKE) local-helper DESTDIR=$(HOME)/.local/share/gnome-shell/extensions
local-helper: all
$(MAKE) install prefix='' DATADIRNAME='$(uuid)' extensionbase=''
install-data-hook:
-mv $(DESTDIR)$(extensiondir)/src/* $(DESTDIR)$(extensiondir)
-rmdir $(DESTDIR)$(extensiondir)/src
if HAVE_GSETTINGS
schemasdir = $(extensiondir)/schemas
schemas_DATA = src/schemas/gschemas.compiled
CLEANFILES += $(schemas_DATA)
DISTCLEANFILES += $(sort $(GSETTINGS_SCHEMAS_CONFIGURE))
.SECONDARY: $(GSETTINGS_SCHEMAS)
%gschemas.compiled: $(sort $(GSETTINGS_SCHEMAS))
$(GLIB_COMPILE_SCHEMAS) $(dir $@)
endif
if HAVE_I18N
# until intltool plays nicely with non-recursive make
SUBDIRS = @CONFIGURE_SUBDIRS@
@INTLTOOL_XML_NOMERGE_RULE@
endif