-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (35 loc) · 1.37 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
prefix = /usr
bindir = ${prefix}/bin
mandir = ${prefix}/share/man
localedir = ${prefix}/share/locale
INSTALL = /usr/bin/install -c
UNINSTALL = rm -f
MKDIR = mkdir -p
PO_FILES = po/tr.po
.PHONY: i18n
i18n: $(PO_FILES:po=mo)
%.mo: %.po
msgfmt $< -o $@
makedir:
test -d "$(DESTDIR)${bindir}" || $(MKDIR) "$(DESTDIR)${bindir}"
test -d "$(DESTDIR)${mandir}/man1" || $(MKDIR) "$(DESTDIR)${mandir}/man1"
test -d "$(DESTDIR)${mandir}/tr/man1" || $(MKDIR) "$(DESTDIR)${mandir}/tr/man1"
test -d "$(DESTDIR)${localedir}/tr/LC_MESSAGES" || $(MKDIR) "$(DESTDIR)${localedir}/tr/LC_MESSAGES"
install: makedir
$(INSTALL) -m 755 src/bootableusb \
"$(DESTDIR)$(bindir)/bootableusb"
$(INSTALL) -m 644 man/bootableusb.1.en \
"$(DESTDIR)$(mandir)/man1/bootableusb.1"
$(INSTALL) -m 644 man/bootableusb.1.tr \
"$(DESTDIR)$(mandir)/tr/man1/bootableusb.1"
$(INSTALL) -m 644 po/tr.mo \
"$(DESTDIR)$(localedir)/tr/LC_MESSAGES/bootableusb.mo"
uninstall:
-$(UNINSTALL) "$(DESTDIR)$(bindir)/bootableusb"
-$(UNINSTALL) "$(DESTDIR)$(mandir)/man1/bootableusb.1"
-$(UNINSTALL) "$(DESTDIR)$(mandir)/man1/bootableusb.1.gz"
-$(UNINSTALL) "$(DESTDIR)$(mandir)/tr/man1/bootableusb.1"
-$(UNINSTALL) "$(DESTDIR)$(mandir)/tr/man1/bootableusb.1.gz"
-$(UNINSTALL) "$(DESTDIR)$(localedir)/tr/LC_MESSAGES/bootableusb.mo"
clean:
-$(UNINSTALL) po/*.mo