Mercurial > hg
annotate contrib/chg/Makefile @ 47333:69530e5d4fe5
dirstate-tree: Add `NodeRef` and `ChildNodesRef` enums
They are used instead of `&Node` and `&ChildNodes` respectively.
The `ChildNodes` type alias also becomes a similar enum.
For now they only have one variant each, to be extended later.
Adding enums now forces various use sites go through new methods
instead of manipulating the underlying data structure directly.
Differential Revision: https://phab.mercurial-scm.org/D10747
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 19 May 2021 13:15:00 +0200 |
parents | 4c8d9b53b1c7 |
children |
rev | line source |
---|---|
28060 | 1 TARGET = chg |
30693 | 2 SRCS = chg.c hgclient.c procutil.c util.c |
28060 | 3 OBJS = $(SRCS:.c=.o) |
4 | |
5 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
|
6 CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE |
28060 | 7 override CFLAGS += -std=gnu99 |
28605
baa073200ba2
chg: allows default hg path to be overridden
Jun Wu <quark@fb.com>
parents:
28327
diff
changeset
|
8 ifdef HGPATH |
baa073200ba2
chg: allows default hg path to be overridden
Jun Wu <quark@fb.com>
parents:
28327
diff
changeset
|
9 override CPPFLAGS += -DHGPATH=\"$(HGPATH)\" |
baa073200ba2
chg: allows default hg path to be overridden
Jun Wu <quark@fb.com>
parents:
28327
diff
changeset
|
10 endif |
45551
4c8d9b53b1c7
chg: make is possible to call by default an hg binary located next to chg
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
34655
diff
changeset
|
11 ifdef HGPATHREL |
4c8d9b53b1c7
chg: make is possible to call by default an hg binary located next to chg
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
34655
diff
changeset
|
12 override CPPFLAGS += -DHGPATHREL=\"$(HGPATHREL)\" |
4c8d9b53b1c7
chg: make is possible to call by default an hg binary located next to chg
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
34655
diff
changeset
|
13 endif |
28060 | 14 |
15 DESTDIR = | |
16 PREFIX = /usr/local | |
17 MANDIR = $(PREFIX)/share/man/man1 | |
18 | |
19 .PHONY: all | |
20 all: $(TARGET) | |
21 | |
22 $(TARGET): $(OBJS) | |
23 $(CC) $(LDFLAGS) -o $@ $(OBJS) | |
24 | |
30693 | 25 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
|
26 hgclient.o: hgclient.h procutil.h util.h |
30693 | 27 procutil.o: procutil.h util.h |
28060 | 28 util.o: util.h |
29 | |
30 .PHONY: install | |
31 install: $(TARGET) | |
34624
884855ce5e63
build: chg build was failing when the base directory contained spaces
muxator <a.mux@inwind.it>
parents:
33629
diff
changeset
|
32 install -d "$(DESTDIR)$(PREFIX)"/bin |
884855ce5e63
build: chg build was failing when the base directory contained spaces
muxator <a.mux@inwind.it>
parents:
33629
diff
changeset
|
33 install -m 755 "$(TARGET)" "$(DESTDIR)$(PREFIX)"/bin |
884855ce5e63
build: chg build was failing when the base directory contained spaces
muxator <a.mux@inwind.it>
parents:
33629
diff
changeset
|
34 install -d "$(DESTDIR)$(MANDIR)" |
884855ce5e63
build: chg build was failing when the base directory contained spaces
muxator <a.mux@inwind.it>
parents:
33629
diff
changeset
|
35 install -m 644 chg.1 "$(DESTDIR)$(MANDIR)" |
28060 | 36 |
37 .PHONY: clean | |
38 clean: | |
39 $(RM) $(OBJS) | |
40 | |
41 .PHONY: distclean | |
42 distclean: | |
43 $(RM) $(OBJS) $(TARGET) |