1From fe7d6c5a0e5dfe129f228498037393d23d6ae890 Mon Sep 17 00:00:00 2001 2From: Baruch Siach <baruch@tkos.co.il> 3Date: Tue, 18 Jul 2017 19:09:03 +0300 4Subject: [PATCH] Makefile: allow build without gettext 5 6The msgfmt command is part of the gettext package, and is used to generate 7binary translation files. When gettext is not installed, build fails. 8Translation files are not always needed on size constrained embedded targets. 9Add an option to disable translation files generation using the NO_GETTEXT 10variable. 11 12Signed-off-by: Baruch Siach <baruch@tkos.co.il> 13--- 14Upstream status: https://github.com/flok99/httping/pull/36 15 16 Makefile | 4 ++++ 17 1 file changed, 4 insertions(+) 18 19diff --git a/Makefile b/Makefile 20index 46127f4cdde1..160cc1794ec8 100644 21--- a/Makefile 22+++ b/Makefile 23@@ -55,7 +55,9 @@ MKDIR=/bin/mkdir 24 ARCHIVE=/bin/tar cf - 25 COMPRESS=/bin/gzip -9 26 27+ifneq ($(NO_GETTEXT),yes) 28 TRANSLATIONS=nl.mo ru.mo 29+endif 30 31 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 32 33@@ -118,10 +120,12 @@ install: $(TARGET) $(TRANSLATIONS) 34 ifneq ($(DEBUG),yes) 35 $(STRIP) $(DESTDIR)/$(BINDIR)/$(TARGET) 36 endif 37+ifneq ($(NO_GETTEXT),yes) 38 mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES 39 cp nl.mo $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES/httping.mo 40 mkdir -p $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES 41 cp ru.mo $(DESTDIR)/$(PREFIX)/share/locale/ru/LC_MESSAGES/httping.mo 42+endif 43 44 45 makefile.inc: 46-- 472.13.2 48 49