Mercurial > hg
annotate contrib/chg/Makefile @ 33648:47ea28293d30 stable
tests: show cache of audited paths is never invalidated
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 01 Aug 2017 21:03:25 +0900 |
parents | 5544af862286 |
children | 884855ce5e63 |
rev | line source |
---|---|
28062
1000ccf804a6
chg: use in-tree hg executable to start server for testing
Yuya Nishihara <yuya@tcha.org>
parents:
28060
diff
changeset
|
1 HG = $(CURDIR)/../../hg |
28060 | 2 |
3 TARGET = chg | |
30693 | 4 SRCS = chg.c hgclient.c procutil.c util.c |
28060 | 5 OBJS = $(SRCS:.c=.o) |
6 | |
7 CFLAGS ?= -O2 -Wall -Wextra -pedantic -g | |
33629
5544af862286
chg: define _GNU_SOURCE to allow CentOS 5 compilation
Mathias De Maré <mathias.de_mare@nokia.com>
parents:
30738
diff
changeset
|
8 CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE |
28060 | 9 override CFLAGS += -std=gnu99 |
28605
baa073200ba2
chg: allows default hg path to be overridden
Jun Wu <quark@fb.com>
parents:
28327
diff
changeset
|
10 ifdef HGPATH |
baa073200ba2
chg: allows default hg path to be overridden
Jun Wu <quark@fb.com>
parents:
28327
diff
changeset
|
11 override CPPFLAGS += -DHGPATH=\"$(HGPATH)\" |
baa073200ba2
chg: allows default hg path to be overridden
Jun Wu <quark@fb.com>
parents:
28327
diff
changeset
|
12 endif |
28060 | 13 |
14 DESTDIR = | |
15 PREFIX = /usr/local | |
16 MANDIR = $(PREFIX)/share/man/man1 | |
17 | |
18 CHGSOCKDIR = /tmp/chg$(shell id -u) | |
19 CHGSOCKNAME = $(CHGSOCKDIR)/server | |
20 | |
21 .PHONY: all | |
22 all: $(TARGET) | |
23 | |
24 $(TARGET): $(OBJS) | |
25 $(CC) $(LDFLAGS) -o $@ $(OBJS) | |
26 | |
30693 | 27 chg.o: hgclient.h procutil.h util.h |
30738
a45c0f42271f
chg: handle pager request client-side
Jun Wu <quark@fb.com>
parents:
30693
diff
changeset
|
28 hgclient.o: hgclient.h procutil.h util.h |
30693 | 29 procutil.o: procutil.h util.h |
28060 | 30 util.o: util.h |
31 | |
32 .PHONY: install | |
33 install: $(TARGET) | |
34 install -d $(DESTDIR)$(PREFIX)/bin | |
35 install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin | |
36 install -d $(DESTDIR)$(MANDIR) | |
37 install -m 644 chg.1 $(DESTDIR)$(MANDIR) | |
38 | |
39 .PHONY: serve | |
40 serve: | |
41 [ -d $(CHGSOCKDIR) ] || ( umask 077; mkdir $(CHGSOCKDIR) ) | |
42 $(HG) serve --cwd / --cmdserver chgunix \ | |
43 --address $(CHGSOCKNAME) \ | |
44 --config cmdserver.log=/dev/stderr | |
45 | |
46 .PHONY: clean | |
47 clean: | |
48 $(RM) $(OBJS) | |
49 | |
50 .PHONY: distclean | |
51 distclean: | |
52 $(RM) $(OBJS) $(TARGET) |