File: Makefile

package info (click to toggle)
gnome-shell-mailnag 3.28.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 140 kB
  • sloc: xml: 50; makefile: 46
file content (57 lines) | stat: -rw-r--r-- 1,471 bytes parent folder | download | duplicates (2)
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
CC = valac
LIBS = folks
UUID = mailnag@pulb.github.com
FILES = aggregate-avatars.vala
DATA = extension.js indicator.js utils.js convenience.js prefs.js opts.js stylesheet.css metadata.json
DATADIR = share/gnome-shell/extensions/$(UUID)
SCHEMAS = schemas/org.gnome.shell.extensions.mailnag.gschema.xml
SCHEMASDIR = share/glib-2.0/schemas
PROGRAMS = aggregate-avatars

prefix = /usr

$(PROGRAMS): $(FILES)
	$(CC) --pkg $(LIBS) $(FILES)


.PHONY: install
install: $(PROGRAMS) $(DATA) $(SCHEMAS)
	test -d $(prefix)/bin || mkdir --parents $(prefix)/bin
	for p in $(PROGRAMS); do \
		install -m 0755 $$p $(prefix)/bin; \
	done
	
	test -d $(prefix)/$(DATADIR) || mkdir --parents $(prefix)/$(DATADIR)
	for d in $(DATA); do \
		install -m 0644 $$d $(prefix)/$(DATADIR); \
	done
	
	test -d $(prefix)/$(SCHEMASDIR) || mkdir --parents $(prefix)/$(SCHEMASDIR)
	for d in $(SCHEMAS); do \
		install -m 0644 $$d $(prefix)/$(SCHEMASDIR); \
	done


install-local: $(PROGRAMS) $(DATA) $(SCHEMAS)
	test -d ~/.local/$(DATADIR) || mkdir --parents ~/.local/$(DATADIR)
	
	for p in $(PROGRAMS); do \
		install -m 0755 $$p ~/.local/$(DATADIR); \
	done
	
	for d in $(DATA); do \
		install -m 0644 $$d ~/.local/$(DATADIR); \
	done
	
	test -d $(prefix)/$(DATADIR)/schemas || mkdir --parents ~/.local/$(DATADIR)/schemas
	for d in $(SCHEMAS); do \
		install -m 0644 $$d ~/.local/$(DATADIR)/schemas; \
	done
	
	glib-compile-schemas ~/.local/$(DATADIR)/schemas


.PHONY: clean
clean:
	rm -f $(PROGRAMS)