-
Notifications
You must be signed in to change notification settings - Fork 60
/
Makefile
49 lines (34 loc) · 1.24 KB
/
Makefile
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
LOCALES := nautilus_open_any_terminal/locale
ifneq ($(shell id -u),0)
export DESTDIR ?= ${HOME}
endif
ifeq ($(DESTDIR),${HOME})
export PREFIX ?= /.local
endif
export PREFIX ?= /usr
DEST := $(DESTDIR)$(PREFIX)
EXTSRC := nautilus_open_any_terminal/nautilus_open_any_terminal.py
SCHEMASRC := nautilus_open_any_terminal/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml
SCHEMADEST := $(DEST)/share/glib-2.0/schemas
FILE_MANAGERS := nautilus caja
INSTALLS := $(patsubst %,install-%,$(FILE_MANAGERS))
UNINSTALLS := $(patsubst %,uninstall-%,$(FILE_MANAGERS))
build:
$(MAKE) -C $(LOCALES)
clean:
$(MAKE) -C $(LOCALES) clean
schema:
glib-compile-schemas $(SCHEMADEST)
install: $(INSTALLS)
$(INSTALLS): install-common
install -Dm644 $(EXTSRC) -t $(DEST)/share/$(patsubst install-%,%-python,$@)/extensions
install-common:
$(MAKE) -C $(LOCALES) install
install -Dm644 $(SCHEMASRC) -t $(SCHEMADEST)
uninstall: $(UNINSTALLS)
$(UNINSTALLS): uninstall-common
$(RM) $(DEST)/share/$(patsubst uninstall-%,%-python,$@)/extensions/$(notdir $(EXTSRC))
uninstall-common:
$(MAKE) -C $(LOCALES) uninstall
$(RM) $(SCHEMADEST)/$(notdir $(SCHEMASRC))
.PHONY: build clean schema install $(INSTALLS) install-common uninstall $(UNINSTALLS) uninstall-common