comparison contrib/chg/Makefile @ 28605:baa073200ba2

chg: allows default hg path to be overridden Before this patch, chg will fall back to "hg" if neither CHGHG nor HG are set. This may have trouble if the "hg" in PATH is not compatible with chg, which can happen, for example, an old hg is installed in a virtualenv. Since it's very hard to do a quick hg version check from chg, after discussion in IRC with smf and marmoute, the quickest solution is to build a package with a hardcoded absolute hg path in chg. This patch makes it possible by adding a C macro HGPATH.
author Jun Wu <quark@fb.com>
date Sun, 20 Mar 2016 15:43:20 -0700
parents 3ab370f84a23
children ff7df4bb75de
comparison
equal deleted inserted replaced
28604:d4d8a3c89e6d 28605:baa073200ba2
5 OBJS = $(SRCS:.c=.o) 5 OBJS = $(SRCS:.c=.o)
6 6
7 CFLAGS ?= -O2 -Wall -Wextra -pedantic -g 7 CFLAGS ?= -O2 -Wall -Wextra -pedantic -g
8 CPPFLAGS ?= -D_FORTIFY_SOURCE=2 8 CPPFLAGS ?= -D_FORTIFY_SOURCE=2
9 override CFLAGS += -std=gnu99 9 override CFLAGS += -std=gnu99
10 ifdef HGPATH
11 override CPPFLAGS += -DHGPATH=\"$(HGPATH)\"
12 endif
10 13
11 DESTDIR = 14 DESTDIR =
12 PREFIX = /usr/local 15 PREFIX = /usr/local
13 MANDIR = $(PREFIX)/share/man/man1 16 MANDIR = $(PREFIX)/share/man/man1
14 17