[Dnsmasq-discuss] Fwd: [PATCH] Makefile: make variables overridable
betaboon
betaboon at 0x80.ninja
Sat Jul 11 13:33:36 BST 2020
Hello Simon, hello everyone.
when cross-compiling dnsmasq for armv7 in nixos we ran into the
Makefile not picking up the variables properly.
for now we are maintaining the attached patch in our package-tree to
get around this issue, but would love to upstream this to you.
The issue in question can be found here:
https://github.com/NixOS/nixpkgs/pull/91422
>From 41d49b07a32625839f267a45379297066a7879ca Mon Sep 17 00:00:00 2001
From: betaboon <betaboon at 0x80.ninja>
Date: Tue, 30 Jun 2020 12:13:41 +0200
Subject: [PATCH] Makefile: make variables overridable
---
Makefile | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index 78e25f0..8e44354 100644
--- a/Makefile
+++ b/Makefile
@@ -18,31 +18,31 @@
# Variables you may well want to override.
-PREFIX = /usr/local
-BINDIR = $(PREFIX)/sbin
-MANDIR = $(PREFIX)/share/man
-LOCALEDIR = $(PREFIX)/share/locale
-BUILDDIR = $(SRC)
-DESTDIR =
-CFLAGS = -Wall -W -O2
-LDFLAGS =
-COPTS =
-RPM_OPT_FLAGS =
-LIBS =
+PREFIX ?= /usr/local
+BINDIR ?= $(PREFIX)/sbin
+MANDIR ?= $(PREFIX)/share/man
+LOCALEDIR ?= $(PREFIX)/share/locale
+BUILDDIR ?= $(SRC)
+DESTDIR ?=
+CFLAGS ?= -Wall -W -O2
+LDFLAGS ?=
+COPTS ?=
+RPM_OPT_FLAGS ?=
+LIBS ?=
#################################################################
# Variables you might want to override.
-PKG_CONFIG = pkg-config
-INSTALL = install
-MSGMERGE = msgmerge
-MSGFMT = msgfmt
-XGETTEXT = xgettext
+PKG_CONFIG ?= pkg-config
+INSTALL ?= install
+MSGMERGE ?= msgmerge
+MSGFMT ?= msgfmt
+XGETTEXT ?= xgettext
-SRC = src
-PO = po
-MAN = man
+SRC ?= src
+PO ?= po
+MAN ?= man
#################################################################
--
2.27.0
More information about the Dnsmasq-discuss
mailing list