Makefile: allow build without gettext
The msgfmt command is part of the gettext package, and is used to generate
binary translation files. When gettext is not installed, build fails.
Translation files are not always needed on size constrained embedded targets.
Add an option to disable translation files generation using the NO_GETTEXT
variable.
Baruch Siach
6 years ago
54 | 54 | ARCHIVE=/bin/tar cf - |
55 | 55 | COMPRESS=/bin/gzip -9 |
56 | 56 | |
57 | ifneq ($(NO_GETTEXT),yes) | |
57 | 58 | TRANSLATIONS=nl.mo ru.mo |
59 | endif | |
58 | 60 | |
59 | 61 | OBJS=gen.o http.o io.o error.o utils.o main.o tcp.o res.o socks5.o kalman.o cookies.o help.o colors.o |
60 | 62 | |
117 | 119 | ifneq ($(DEBUG),yes) |
118 | 120 | $(STRIP) $(DESTDIR)/$(BINDIR)/$(TARGET) |
119 | 121 | endif |
122 | ifneq ($(NO_GETTEXT),yes) | |
120 | 123 | mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES |
121 | 124 | cp nl.mo $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES/httping.mo |
122 | 125 | mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES |
123 | 126 | cp ru.mo $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES/httping.mo |
127 | endif | |
124 | 128 | |
125 | 129 | |
126 | 130 | makefile.inc: |